Java Code Examples for org.jfree.chart.ChartFactory#createWaterfallChart()
The following examples show how to use
org.jfree.chart.ChartFactory#createWaterfallChart() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WaterfallChartTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Create a bar chart with sample data in the range -3 to +3. * * @return The chart. */ private static JFreeChart createWaterfallChart() { // create a dataset... Number[][] data = new Integer[][] {{new Integer(-3), new Integer(-2)}, {new Integer(-1), new Integer(1)}, {new Integer(2), new Integer(3)}}; CategoryDataset dataset = DatasetUtilities.createCategoryDataset("S", "C", data); // create the chart... return ChartFactory.createWaterfallChart( "Waterfall Chart", "Domain", "Range", dataset, PlotOrientation.HORIZONTAL, true, // include legend true, true ); }
Example 2
Source File: WaterfallChartTests.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Create a bar chart with sample data in the range -3 to +3. * * @return The chart. */ private static JFreeChart createWaterfallChart() { // create a dataset... Number[][] data = new Integer[][] {{new Integer(-3), new Integer(-2)}, {new Integer(-1), new Integer(1)}, {new Integer(2), new Integer(3)}}; CategoryDataset dataset = DatasetUtilities.createCategoryDataset("S", "C", data); return ChartFactory.createWaterfallChart("Waterfall Chart", "Domain", "Range", dataset, true); }
Example 3
Source File: WaterfallChartExpressions.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
protected JFreeChart computeCategoryChart( final CategoryDataset dataset ) { final JFreeChart chart = ChartFactory.createWaterfallChart( computeTitle(), getCategoryAxisLabel(), getValueAxisLabel(), dataset, computePlotOrientation(), isShowLegend(), false, false ); chart.getCategoryPlot().setDomainAxis( new FormattedCategoryAxis( getCategoryAxisLabel(), getCategoricalAxisMessageFormat(), getRuntime().getResourceBundleFactory().getLocale() ) ); return chart; }