Search in sources :

Example 36 with JFreeChart

use of org.jfree.chart.JFreeChart in project adempiere by adempiere.

the class MChart method createAreaChart.

private JFreeChart createAreaChart() {
    // create the chart...
    JFreeChart chart = ChartFactory.createAreaChart(// chart title
    getName(), // domain axis label
    getDomainLabel(), // range axis label
    getRangeLabel(), // data
    getCategoryDataset(), X_AD_Chart.CHARTORIENTATION_Horizontal.equals(getChartOrientation()) ? PlotOrientation.HORIZONTAL : // orientation
    PlotOrientation.VERTICAL, // include legend
    isDisplayLegend(), // tooltips?
    true, // URLs?
    true);
    setupCategoryChart(chart);
    return chart;
}
Also used : JFreeChart(org.jfree.chart.JFreeChart)

Example 37 with JFreeChart

use of org.jfree.chart.JFreeChart in project adempiere by adempiere.

the class MChart method createBarChart.

private JFreeChart createBarChart() {
    JFreeChart chart = ChartFactory.createBarChart(// chart title
    getName(), // domain axis label
    getDomainLabel(), // range axis label
    getRangeLabel(), // data
    getCategoryDataset(), X_AD_Chart.CHARTORIENTATION_Horizontal.equals(getChartOrientation()) ? PlotOrientation.HORIZONTAL : // orientation
    PlotOrientation.VERTICAL, // include legend
    isDisplayLegend(), // tooltips?
    true, // URLs?
    true);
    BarRenderer renderer = new BarRenderer();
    renderer.setBarPainter(new StandardBarPainter());
    CategoryPlot plot = chart.getCategoryPlot();
    plot.setRenderer(renderer);
    setupCategoryChart(chart);
    return chart;
}
Also used : StandardBarPainter(org.jfree.chart.renderer.category.StandardBarPainter) BarRenderer(org.jfree.chart.renderer.category.BarRenderer) JFreeChart(org.jfree.chart.JFreeChart) CategoryPlot(org.jfree.chart.plot.CategoryPlot)

Example 38 with JFreeChart

use of org.jfree.chart.JFreeChart in project adempiere by adempiere.

the class MChart method create3DStackedBarChart.

private JFreeChart create3DStackedBarChart() {
    JFreeChart chart = ChartFactory.createStackedBarChart3D(// chart title
    getName(), // domain axis label
    getDomainLabel(), // range axis label
    getRangeLabel(), // data
    getCategoryDataset(), X_AD_Chart.CHARTORIENTATION_Horizontal.equals(getChartOrientation()) ? PlotOrientation.HORIZONTAL : // orientation
    PlotOrientation.VERTICAL, // include legend
    isDisplayLegend(), // tooltips?
    true, // URLs?
    true);
    setupCategoryChart(chart);
    return chart;
}
Also used : JFreeChart(org.jfree.chart.JFreeChart)

Example 39 with JFreeChart

use of org.jfree.chart.JFreeChart in project adempiere by adempiere.

the class MChart method createStackedAreaChart.

private JFreeChart createStackedAreaChart() {
    // create the chart...
    JFreeChart chart = ChartFactory.createStackedAreaChart(// chart title
    getName(), // domain axis label
    getDomainLabel(), // range axis label
    getRangeLabel(), // data
    getCategoryDataset(), X_AD_Chart.CHARTORIENTATION_Horizontal.equals(getChartOrientation()) ? PlotOrientation.HORIZONTAL : // orientation
    PlotOrientation.VERTICAL, // include legend
    isDisplayLegend(), // tooltips?
    true, // URLs?
    true);
    setupCategoryChart(chart);
    return chart;
}
Also used : JFreeChart(org.jfree.chart.JFreeChart)

Example 40 with JFreeChart

use of org.jfree.chart.JFreeChart in project adempiere by adempiere.

the class MChart method create3DBarChart.

private JFreeChart create3DBarChart() {
    JFreeChart chart = ChartFactory.createBarChart3D(// chart title
    getName(), // domain axis label
    getDomainLabel(), // range axis label
    getRangeLabel(), // data
    getCategoryDataset(), X_AD_Chart.CHARTORIENTATION_Horizontal.equals(getChartOrientation()) ? PlotOrientation.HORIZONTAL : // orientation
    PlotOrientation.VERTICAL, // include legend
    isDisplayLegend(), // tooltips?
    true, // URLs?
    true);
    setupCategoryChart(chart);
    return chart;
}
Also used : JFreeChart(org.jfree.chart.JFreeChart)

Aggregations

JFreeChart (org.jfree.chart.JFreeChart)178 XYPlot (org.jfree.chart.plot.XYPlot)40 NumberAxis (org.jfree.chart.axis.NumberAxis)26 Color (java.awt.Color)22 DateAxis (org.jfree.chart.axis.DateAxis)21 DecimalFormat (java.text.DecimalFormat)18 ChartPanel (org.jfree.chart.ChartPanel)17 XYSeries (org.jfree.data.xy.XYSeries)17 XYSeriesCollection (org.jfree.data.xy.XYSeriesCollection)17 RectangleInsets (org.jfree.ui.RectangleInsets)17 NumberFormat (java.text.NumberFormat)16 CategoryAxis (org.jfree.chart.axis.CategoryAxis)16 CategoryPlot (org.jfree.chart.plot.CategoryPlot)16 DefaultCategoryDataset (org.jfree.data.category.DefaultCategoryDataset)13 TimeSeriesCollection (org.jfree.data.time.TimeSeriesCollection)13 HashMap (java.util.HashMap)12 ValueAxis (org.jfree.chart.axis.ValueAxis)12 XYLineAndShapeRenderer (org.jfree.chart.renderer.xy.XYLineAndShapeRenderer)11 CategoryDataset (org.jfree.data.category.CategoryDataset)11 Paint (java.awt.Paint)10