final JFreeChart chart = ChartFactory.createStackedAreaChart(null, // chart
/** * Creates a stacked area chart with default settings. The chart object * returned by this method uses a {@link CategoryPlot} instance as the * plot, with a {@link CategoryAxis} for the domain axis, a * {@link NumberAxis} as the range axis, and a {@link StackedAreaRenderer} * as the renderer. * * @param title the chart title ({@code null} permitted). * @param categoryAxisLabel the label for the category axis * ({@code null} permitted). * @param valueAxisLabel the label for the value axis ({@code null} * permitted). * @param dataset the dataset for the chart ({@code null} permitted). * * @return A stacked area chart. * * @since 1.0.16 */ public static JFreeChart createStackedAreaChart(String title, String categoryAxisLabel, String valueAxisLabel, CategoryDataset dataset) { return createStackedAreaChart(title, categoryAxisLabel, valueAxisLabel, dataset, PlotOrientation.VERTICAL, true, true, false); }
public static JFreeChart createStackedAreaChart(String title, String categoryAxisLabel, String valueAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls) { JFreeChart chart = ChartFactory.createStackedAreaChart(title, categoryAxisLabel, valueAxisLabel, dataset, orientation, legend, tooltips, urls); setAreaChartDefaults(chart); return chart; }
public OverallRelativeAreaPlot(String title , int sizes[] ) { // createAreaChart chart = ChartFactory.createStackedAreaChart( title, // chart title "Size", // domain axis label "Relative Average Speed", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation true, // include legend true, false ); chart.addSubtitle(new TextTitle("Weighted by Operation Speed. Larger is Better.",new Font("SansSerif", Font.ITALIC, 12))); plot = chart.getCategoryPlot(); sizeNames = new String[sizes.length]; for( int i = 0; i < sizes.length; i++ ) { sizeNames[i] = Integer.toString(sizes[i]); } plot.setRangeGridlinePaint(Color.WHITE); plot.setBackgroundPaint(Color.WHITE); plot.setDomainGridlinesVisible(true); }
/** * Creates a stacked area graph from the specified data set. * * @param dataset * the values to display * @return the created graph */ public JFreeChart createAreaChart(final CategoryDataset dataset) { JFreeChart chart = ChartFactory.createStackedAreaChart( null, // chart title null, // unused "count", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation false, // include legend true, // tooltips false // urls ); chart.setBackgroundPaint(Color.white); setCategoryPlotProperties(chart.getCategoryPlot()); chart.getCategoryPlot().getDomainAxis().setCategoryMargin(0.0); return chart; }
/** * Creates a stacked area graph from the specified data set. * * @param dataset * the values to display * @param yAxisLabel * label of the range axis, i.e. y axis * @return the created graph */ public JFreeChart createAreaChart(final CategoryDataset dataset, final String yAxisLabel) { JFreeChart chart = ChartFactory.createStackedAreaChart( null, // chart title null, // unused yAxisLabel, // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation false, // include legend true, // tooltips false // urls ); chart.setBackgroundPaint(Color.white); setCategoryPlotProperties(chart.getCategoryPlot()); chart.getCategoryPlot().getDomainAxis().setCategoryMargin(0.0); return chart; }
private JFreeChart getStackedAreaChart( BaseChart chart, CategoryDataset dataSet ) { JFreeChart stackedAreaChart = ChartFactory.createStackedAreaChart( chart.getName(), chart.getDomainAxisLabel(), chart.getRangeAxisLabel(), dataSet, PlotOrientation.VERTICAL, !chart.isHideLegend(), false, false ); setBasicConfig( stackedAreaChart, chart ); CategoryPlot plot = (CategoryPlot) stackedAreaChart.getPlot(); plot.setOrientation( PlotOrientation.VERTICAL ); plot.setRenderer( getStackedAreaRenderer() ); CategoryAxis xAxis = plot.getDomainAxis(); xAxis.setCategoryLabelPositions( CategoryLabelPositions.UP_45 ); xAxis.setLabelFont( LABEL_FONT ); return stackedAreaChart; }
private JFreeChart createChart(final BuildStatConfiguration config, List<AbstractBuildStatChartDimension> dimensions, String title) { final JFreeChart chart = ChartFactory.createStackedAreaChart(title, null, "", new DataSetBuilder<String, DateRange>().build(), PlotOrientation.VERTICAL, true, true, false); chart.setBackgroundPaint(Color.white);
final JFreeChart chart = ChartFactory.createStackedAreaChart(null, // chart
public JFreeChart createChart(Chart chart) { ChartModel model = (ChartModel) chart.getModel(); if (model instanceof CategoryModel) { return ChartFactory.createStackedAreaChart( chart.getTitle(), chart.getXAxis(), chart.getYAxis(), CategoryModelToCategoryDataset((CategoryModel)model), getOrientation(chart.getOrient()), chart.isShowLegend(), chart.isShowTooltiptext(), true); } else if (model instanceof XYModel) { return ChartFactory.createStackedXYAreaChart( chart.getTitle(), chart.getXAxis(), chart.getYAxis(), XYModelToTableXYDataset((XYModel) model), getOrientation(chart.getOrient()), chart.isShowLegend(), chart.isShowTooltiptext(), true); } else { throw new UiException("model must be a org.zkoss.zul.CategoryModel or a org.zkoss.zul.XYModel"); } } }
return ChartFactory.createStackedAreaChart(null, Constants.AXIS_LABEL, Constants.AXIS_LABEL_VALUE, null, PlotOrientation.VERTICAL, true, false, false);
JFreeChart chart = ChartFactory.createStackedAreaChart(null, Constants.AXIS_LABEL, Constants.AXIS_LABEL_VALUE, null, PlotOrientation.VERTICAL, true, false, false);
JFreeChart chart = ChartFactory.createStackedAreaChart(null, null, yLabel, dataset, PlotOrientation.VERTICAL, true, true, false); chart.setBackgroundPaint(Color.WHITE);
CategoryDataset dataset = buildDataSet(); JFreeChart chart = ChartFactory.createStackedAreaChart(null, // chart
@Override protected JFreeChart createGraph() { final JFreeChart chart = ChartFactory.createStackedAreaChart(
CategoryDataset dataset = buildDataSet(); JFreeChart chart = ChartFactory.createStackedAreaChart(
CategoryDataset dataset = buildDataSet(); JFreeChart chart = ChartFactory.createStackedAreaChart(
protected JFreeChart createGraph() { final CategoryDataset dataset = createDataSet().build(); final JFreeChart chart = ChartFactory.createStackedAreaChart(null, // chart
getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); case STACKED_AREA: return ChartFactory.createStackedAreaChart(getURLTitle(), null, getYaxis(), dataset, PlotOrientation.VERTICAL, hasLegend(), true, false); case STACKED_BAR:
ChartFactory.createStackedAreaChart( (String)evaluateExpression(getChart().getTitleExpression()), (String)evaluateExpression(((JRAreaPlot)getPlot()).getCategoryAxisLabelExpression()),