Header
And More


org.jfree.chart
Class ChartFactory

java.lang.Object
  extended by org.jfree.chart.ChartFactory

public abstract class ChartFactory
extends java.lang.Object

A collection of utility methods for creating some standard charts with JFreeChart.


Constructor Summary
ChartFactory()
           
 
Method Summary
static JFreeChart createAreaChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates an area chart with default settings.
static JFreeChart createBarChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a bar chart.
static JFreeChart createBarChart3D(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a bar chart with a 3D effect.
static JFreeChart createBoxAndWhiskerChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, BoxAndWhiskerCategoryDataset dataset, boolean legend)
          Creates and returns a default instance of a box and whisker chart based on data from a BoxAndWhiskerCategoryDataset.
static JFreeChart createBoxAndWhiskerChart(java.lang.String title, java.lang.String timeAxisLabel, java.lang.String valueAxisLabel, BoxAndWhiskerXYDataset dataset, boolean legend)
          Creates and returns a default instance of a box and whisker chart.
static JFreeChart createBubbleChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYZDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a bubble chart with default settings.
static JFreeChart createCandlestickChart(java.lang.String title, java.lang.String timeAxisLabel, java.lang.String valueAxisLabel, OHLCDataset dataset, boolean legend)
          Creates and returns a default instance of a candlesticks chart.
static JFreeChart createGanttChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String dateAxisLabel, IntervalCategoryDataset dataset, boolean legend, boolean tooltips, boolean urls)
          Creates a Gantt chart using the supplied attributes plus default values where required.
static JFreeChart createHighLowChart(java.lang.String title, java.lang.String timeAxisLabel, java.lang.String valueAxisLabel, OHLCDataset dataset, boolean legend)
          Creates and returns a default instance of a high-low-open-close chart.
static JFreeChart createHighLowChart(java.lang.String title, java.lang.String timeAxisLabel, java.lang.String valueAxisLabel, OHLCDataset dataset, Timeline timeline, boolean legend)
          Creates and returns a default instance of a high-low-open-close chart with a special timeline.
static JFreeChart createHistogram(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, IntervalXYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a histogram chart.
static JFreeChart createLineChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a line chart with default settings.
static JFreeChart createLineChart3D(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a line chart with default settings.
static JFreeChart createMultiplePieChart(java.lang.String title, CategoryDataset dataset, org.jfree.util.TableOrder order, boolean legend, boolean tooltips, boolean urls)
          Creates a chart that displays multiple pie plots.
static JFreeChart createMultiplePieChart3D(java.lang.String title, CategoryDataset dataset, org.jfree.util.TableOrder order, boolean legend, boolean tooltips, boolean urls)
          Creates a chart that displays multiple pie plots.
static JFreeChart createPieChart(java.lang.String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls)
          Creates a pie chart with default settings.
static JFreeChart createPieChart(java.lang.String title, PieDataset dataset, boolean legend, boolean tooltips, java.util.Locale locale)
          Creates a pie chart with default settings.
static JFreeChart createPieChart(java.lang.String title, PieDataset dataset, PieDataset previousDataset, int percentDiffForMaxScale, boolean greenForIncrease, boolean legend, boolean tooltips, boolean urls, boolean subTitle, boolean showDifference)
          Creates a pie chart with default settings that compares 2 datasets.
static JFreeChart createPieChart(java.lang.String title, PieDataset dataset, PieDataset previousDataset, int percentDiffForMaxScale, boolean greenForIncrease, boolean legend, boolean tooltips, java.util.Locale locale, boolean subTitle, boolean showDifference)
          Creates a pie chart with default settings that compares 2 datasets.
static JFreeChart createPieChart3D(java.lang.String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls)
          Creates a 3D pie chart using the specified dataset.
static JFreeChart createPieChart3D(java.lang.String title, PieDataset dataset, boolean legend, boolean tooltips, java.util.Locale locale)
          Creates a 3D pie chart using the specified dataset.
static JFreeChart createPolarChart(java.lang.String title, XYDataset dataset, boolean legend, boolean tooltips, boolean urls)
          Creates a polar plot for the specified dataset (x-values interpreted as angles in degrees).
static JFreeChart createRingChart(java.lang.String title, PieDataset dataset, boolean legend, boolean tooltips, boolean urls)
          Creates a ring chart with default settings.
static JFreeChart createRingChart(java.lang.String title, PieDataset dataset, boolean legend, boolean tooltips, java.util.Locale locale)
          Creates a ring chart with default settings.
static JFreeChart createScatterPlot(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a scatter plot with default settings.
static JFreeChart createStackedAreaChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a stacked area chart with default settings.
static JFreeChart createStackedBarChart(java.lang.String title, java.lang.String domainAxisLabel, java.lang.String rangeAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a stacked bar chart with default settings.
static JFreeChart createStackedBarChart3D(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a stacked bar chart with a 3D effect and default settings.
static JFreeChart createStackedXYAreaChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, TableXYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a stacked XY area plot.
static JFreeChart createTimeSeriesChart(java.lang.String title, java.lang.String timeAxisLabel, java.lang.String valueAxisLabel, XYDataset dataset, boolean legend, boolean tooltips, boolean urls)
          Creates and returns a time series chart.
static JFreeChart createWaferMapChart(java.lang.String title, WaferMapDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a wafer map chart.
static JFreeChart createWaterfallChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a waterfall chart.
static JFreeChart createWindPlot(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, WindDataset dataset, boolean legend, boolean tooltips, boolean urls)
          Creates a wind plot with default settings.
static JFreeChart createXYAreaChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates an area chart using an XYDataset.
static JFreeChart createXYBarChart(java.lang.String title, java.lang.String xAxisLabel, boolean dateAxis, java.lang.String yAxisLabel, IntervalXYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates and returns a default instance of an XY bar chart.
static JFreeChart createXYLineChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a line chart (based on an XYDataset) with default settings.
static JFreeChart createXYStepAreaChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a filled stepped XY plot with default settings.
static JFreeChart createXYStepChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls)
          Creates a stepped XY plot with default settings.
static ChartTheme getChartTheme()
          Returns the current chart theme used by the factory.
static void setChartTheme(ChartTheme theme)
          Sets the current chart theme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartFactory

public ChartFactory()
Method Detail

getChartTheme

public static ChartTheme getChartTheme()
Returns the current chart theme used by the factory.

Returns:
The chart theme.
Since:
1.0.11
See Also:
setChartTheme(ChartTheme), ChartUtilities.applyCurrentTheme(JFreeChart)

setChartTheme

public static void setChartTheme(ChartTheme theme)
Sets the current chart theme. This will be applied to all new charts created via methods in this class.

Parameters:
theme - the theme (null not permitted).
Since:
1.0.11
See Also:
getChartTheme(), ChartUtilities.applyCurrentTheme(JFreeChart)

createPieChart

public static JFreeChart createPieChart(java.lang.String title,
                                        PieDataset dataset,
                                        boolean legend,
                                        boolean tooltips,
                                        java.util.Locale locale)
Creates a pie chart with default settings.

The chart object returned by this method uses a PiePlot instance as the plot.

Parameters:
title - the chart title (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
locale - the locale (null not permitted).
Returns:
A pie chart.
Since:
1.0.7

createPieChart

public static JFreeChart createPieChart(java.lang.String title,
                                        PieDataset dataset,
                                        boolean legend,
                                        boolean tooltips,
                                        boolean urls)
Creates a pie chart with default settings.

The chart object returned by this method uses a PiePlot instance as the plot.

Parameters:
title - the chart title (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A pie chart.

createPieChart

public static JFreeChart createPieChart(java.lang.String title,
                                        PieDataset dataset,
                                        PieDataset previousDataset,
                                        int percentDiffForMaxScale,
                                        boolean greenForIncrease,
                                        boolean legend,
                                        boolean tooltips,
                                        java.util.Locale locale,
                                        boolean subTitle,
                                        boolean showDifference)
Creates a pie chart with default settings that compares 2 datasets. The colour of each section will be determined by the move from the value for the same key in previousDataset. ie if value1 > value2 then the section will be in green (unless greenForIncrease is false, in which case it would be red). Each section can have a shade of red or green as the difference can be tailored between 0% (black) and percentDiffForMaxScale% (bright red/green).

For instance if percentDiffForMaxScale is 10 (10%), a difference of 5% will have a half shade of red/green, a difference of 10% or more will have a maximum shade/brightness of red/green.

The chart object returned by this method uses a PiePlot instance as the plot.

Written by Benoit Xhenseval.

Parameters:
title - the chart title (null permitted).
dataset - the dataset for the chart (null permitted).
previousDataset - the dataset for the last run, this will be used to compare each key in the dataset
percentDiffForMaxScale - scale goes from bright red/green to black, percentDiffForMaxScale indicate the change required to reach top scale.
greenForIncrease - an increase since previousDataset will be displayed in green (decrease red) if true.
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
locale - the locale (null not permitted).
subTitle - displays a subtitle with colour scheme if true
showDifference - create a new dataset that will show the % difference between the two datasets.
Returns:
A pie chart.
Since:
1.0.7

createPieChart

public static JFreeChart createPieChart(java.lang.String title,
                                        PieDataset dataset,
                                        PieDataset previousDataset,
                                        int percentDiffForMaxScale,
                                        boolean greenForIncrease,
                                        boolean legend,
                                        boolean tooltips,
                                        boolean urls,
                                        boolean subTitle,
                                        boolean showDifference)
Creates a pie chart with default settings that compares 2 datasets. The colour of each section will be determined by the move from the value for the same key in previousDataset. ie if value1 > value2 then the section will be in green (unless greenForIncrease is false, in which case it would be red). Each section can have a shade of red or green as the difference can be tailored between 0% (black) and percentDiffForMaxScale% (bright red/green).

For instance if percentDiffForMaxScale is 10 (10%), a difference of 5% will have a half shade of red/green, a difference of 10% or more will have a maximum shade/brightness of red/green.

The chart object returned by this method uses a PiePlot instance as the plot.

Written by Benoit Xhenseval.

Parameters:
title - the chart title (null permitted).
dataset - the dataset for the chart (null permitted).
previousDataset - the dataset for the last run, this will be used to compare each key in the dataset
percentDiffForMaxScale - scale goes from bright red/green to black, percentDiffForMaxScale indicate the change required to reach top scale.
greenForIncrease - an increase since previousDataset will be displayed in green (decrease red) if true.
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
subTitle - displays a subtitle with colour scheme if true
showDifference - create a new dataset that will show the % difference between the two datasets.
Returns:
A pie chart.

createRingChart

public static JFreeChart createRingChart(java.lang.String title,
                                         PieDataset dataset,
                                         boolean legend,
                                         boolean tooltips,
                                         java.util.Locale locale)
Creates a ring chart with default settings.

The chart object returned by this method uses a RingPlot instance as the plot.

Parameters:
title - the chart title (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
locale - the locale (null not permitted).
Returns:
A ring chart.
Since:
1.0.7

createRingChart

public static JFreeChart createRingChart(java.lang.String title,
                                         PieDataset dataset,
                                         boolean legend,
                                         boolean tooltips,
                                         boolean urls)
Creates a ring chart with default settings.

The chart object returned by this method uses a RingPlot instance as the plot.

Parameters:
title - the chart title (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A ring chart.

createMultiplePieChart

public static JFreeChart createMultiplePieChart(java.lang.String title,
                                                CategoryDataset dataset,
                                                org.jfree.util.TableOrder order,
                                                boolean legend,
                                                boolean tooltips,
                                                boolean urls)
Creates a chart that displays multiple pie plots. The chart object returned by this method uses a MultiplePiePlot instance as the plot.

Parameters:
title - the chart title (null permitted).
dataset - the dataset (null permitted).
order - the order that the data is extracted (by row or by column) (null not permitted).
legend - include a legend?
tooltips - generate tooltips?
urls - generate URLs?
Returns:
A chart.

createPieChart3D

public static JFreeChart createPieChart3D(java.lang.String title,
                                          PieDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          java.util.Locale locale)
Creates a 3D pie chart using the specified dataset. The chart object returned by this method uses a PiePlot3D instance as the plot.

Parameters:
title - the chart title (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
locale - the locale (null not permitted).
Returns:
A pie chart.
Since:
1.0.7

createPieChart3D

public static JFreeChart createPieChart3D(java.lang.String title,
                                          PieDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls)
Creates a 3D pie chart using the specified dataset. The chart object returned by this method uses a PiePlot3D instance as the plot.

Parameters:
title - the chart title (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A pie chart.

createMultiplePieChart3D

public static JFreeChart createMultiplePieChart3D(java.lang.String title,
                                                  CategoryDataset dataset,
                                                  org.jfree.util.TableOrder order,
                                                  boolean legend,
                                                  boolean tooltips,
                                                  boolean urls)
Creates a chart that displays multiple pie plots. The chart object returned by this method uses a MultiplePiePlot instance as the plot.

Parameters:
title - the chart title (null permitted).
dataset - the dataset (null permitted).
order - the order that the data is extracted (by row or by column) (null not permitted).
legend - include a legend?
tooltips - generate tooltips?
urls - generate URLs?
Returns:
A chart.

createBarChart

public static JFreeChart createBarChart(java.lang.String title,
                                        java.lang.String categoryAxisLabel,
                                        java.lang.String valueAxisLabel,
                                        CategoryDataset dataset,
                                        PlotOrientation orientation,
                                        boolean legend,
                                        boolean tooltips,
                                        boolean urls)
Creates a bar chart. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis for the domain axis, a NumberAxis as the range axis, and a BarRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - the label for the category axis (null permitted).
valueAxisLabel - the label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null not permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A bar chart.

createStackedBarChart

public static JFreeChart createStackedBarChart(java.lang.String title,
                                               java.lang.String domainAxisLabel,
                                               java.lang.String rangeAxisLabel,
                                               CategoryDataset dataset,
                                               PlotOrientation orientation,
                                               boolean legend,
                                               boolean tooltips,
                                               boolean urls)
Creates a stacked bar chart with default settings. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis for the domain axis, a NumberAxis as the range axis, and a StackedBarRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
domainAxisLabel - the label for the category axis (null permitted).
rangeAxisLabel - the label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the orientation of the chart (horizontal or vertical) (null not permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A stacked bar chart.

createBarChart3D

public static JFreeChart createBarChart3D(java.lang.String title,
                                          java.lang.String categoryAxisLabel,
                                          java.lang.String valueAxisLabel,
                                          CategoryDataset dataset,
                                          PlotOrientation orientation,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls)
Creates a bar chart with a 3D effect. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis3D for the domain axis, a NumberAxis3D as the range axis, and a BarRenderer3D as the renderer.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - the label for the category axis (null permitted).
valueAxisLabel - the label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null not permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A bar chart with a 3D effect.

createStackedBarChart3D

public static JFreeChart createStackedBarChart3D(java.lang.String title,
                                                 java.lang.String categoryAxisLabel,
                                                 java.lang.String valueAxisLabel,
                                                 CategoryDataset dataset,
                                                 PlotOrientation orientation,
                                                 boolean legend,
                                                 boolean tooltips,
                                                 boolean urls)
Creates a stacked bar chart with a 3D effect and default settings. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis3D for the domain axis, a NumberAxis3D as the range axis, and a StackedBarRenderer3D as the renderer.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - the label for the category axis (null permitted).
valueAxisLabel - the label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the orientation (horizontal or vertical) (null not permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A stacked bar chart with a 3D effect.

createAreaChart

public static JFreeChart createAreaChart(java.lang.String title,
                                         java.lang.String categoryAxisLabel,
                                         java.lang.String valueAxisLabel,
                                         CategoryDataset dataset,
                                         PlotOrientation orientation,
                                         boolean legend,
                                         boolean tooltips,
                                         boolean urls)
Creates an area chart with default settings. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis for the domain axis, a NumberAxis as the range axis, and an AreaRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - the label for the category axis (null permitted).
valueAxisLabel - the label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (null not permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
An area chart.

createStackedAreaChart

public static JFreeChart createStackedAreaChart(java.lang.String title,
                                                java.lang.String categoryAxisLabel,
                                                java.lang.String valueAxisLabel,
                                                CategoryDataset dataset,
                                                PlotOrientation orientation,
                                                boolean legend,
                                                boolean tooltips,
                                                boolean urls)
Creates a stacked area chart with default settings. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis for the domain axis, a NumberAxis as the range axis, and a StackedAreaRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - the label for the category axis (null permitted).
valueAxisLabel - the label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null not permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A stacked area chart.

createLineChart

public static JFreeChart createLineChart(java.lang.String title,
                                         java.lang.String categoryAxisLabel,
                                         java.lang.String valueAxisLabel,
                                         CategoryDataset dataset,
                                         PlotOrientation orientation,
                                         boolean legend,
                                         boolean tooltips,
                                         boolean urls)
Creates a line chart with default settings. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis for the domain axis, a NumberAxis as the range axis, and a LineAndShapeRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - the label for the category axis (null permitted).
valueAxisLabel - the label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the chart orientation (horizontal or vertical) (null not permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A line chart.

createLineChart3D

public static JFreeChart createLineChart3D(java.lang.String title,
                                           java.lang.String categoryAxisLabel,
                                           java.lang.String valueAxisLabel,
                                           CategoryDataset dataset,
                                           PlotOrientation orientation,
                                           boolean legend,
                                           boolean tooltips,
                                           boolean urls)
Creates a line chart with default settings. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis3D for the domain axis, a NumberAxis3D as the range axis, and a LineRenderer3D as the renderer.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - the label for the category axis (null permitted).
valueAxisLabel - the label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the chart orientation (horizontal or vertical) (null not permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A line chart.

createGanttChart

public static JFreeChart createGanttChart(java.lang.String title,
                                          java.lang.String categoryAxisLabel,
                                          java.lang.String dateAxisLabel,
                                          IntervalCategoryDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls)
Creates a Gantt chart using the supplied attributes plus default values where required. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis for the domain axis, a DateAxis as the range axis, and a GanttRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - the label for the category axis (null permitted).
dateAxisLabel - the label for the date axis (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A Gantt chart.

createWaterfallChart

public static JFreeChart createWaterfallChart(java.lang.String title,
                                              java.lang.String categoryAxisLabel,
                                              java.lang.String valueAxisLabel,
                                              CategoryDataset dataset,
                                              PlotOrientation orientation,
                                              boolean legend,
                                              boolean tooltips,
                                              boolean urls)
Creates a waterfall chart. The chart object returned by this method uses a CategoryPlot instance as the plot, with a CategoryAxis for the domain axis, a NumberAxis as the range axis, and a WaterfallBarRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - the label for the category axis (null permitted).
valueAxisLabel - the label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null NOT permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A waterfall chart.

createPolarChart

public static JFreeChart createPolarChart(java.lang.String title,
                                          XYDataset dataset,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls)
Creates a polar plot for the specified dataset (x-values interpreted as angles in degrees). The chart object returned by this method uses a PolarPlot instance as the plot, with a NumberAxis for the radial axis.

Parameters:
title - the chart title (null permitted).
dataset - the dataset (null permitted).
legend - legend required?
tooltips - tooltips required?
urls - URLs required?
Returns:
A chart.

createScatterPlot

public static JFreeChart createScatterPlot(java.lang.String title,
                                           java.lang.String xAxisLabel,
                                           java.lang.String yAxisLabel,
                                           XYDataset dataset,
                                           PlotOrientation orientation,
                                           boolean legend,
                                           boolean tooltips,
                                           boolean urls)
Creates a scatter plot with default settings. The chart object returned by this method uses an XYPlot instance as the plot, with a NumberAxis for the domain axis, a NumberAxis as the range axis, and an XYLineAndShapeRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
xAxisLabel - a label for the X-axis (null permitted).
yAxisLabel - a label for the Y-axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null NOT permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A scatter plot.

createXYBarChart

public static JFreeChart createXYBarChart(java.lang.String title,
                                          java.lang.String xAxisLabel,
                                          boolean dateAxis,
                                          java.lang.String yAxisLabel,
                                          IntervalXYDataset dataset,
                                          PlotOrientation orientation,
                                          boolean legend,
                                          boolean tooltips,
                                          boolean urls)
Creates and returns a default instance of an XY bar chart.

The chart object returned by this method uses an XYPlot instance as the plot, with a DateAxis for the domain axis, a NumberAxis as the range axis, and a XYBarRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
xAxisLabel - a label for the X-axis (null permitted).
dateAxis - make the domain axis display dates?
yAxisLabel - a label for the Y-axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the orientation (horizontal or vertical) (null NOT permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
An XY bar chart.

createXYAreaChart

public static JFreeChart createXYAreaChart(java.lang.String title,
                                           java.lang.String xAxisLabel,
                                           java.lang.String yAxisLabel,
                                           XYDataset dataset,
                                           PlotOrientation orientation,
                                           boolean legend,
                                           boolean tooltips,
                                           boolean urls)
Creates an area chart using an XYDataset.

The chart object returned by this method uses an XYPlot instance as the plot, with a NumberAxis for the domain axis, a NumberAxis as the range axis, and a XYAreaRenderer as the renderer.

Parameters:
title - the chart title (null permitted).
xAxisLabel - a label for the X-axis (null permitted).
yAxisLabel - a label for the Y-axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null NOT permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
An XY area chart.

createStackedXYAreaChart

public static JFreeChart createStackedXYAreaChart(java.lang.String title,
                                                  java.lang.String xAxisLabel,
                                                  java.lang.String yAxisLabel,
                                                  TableXYDataset dataset,
                                                  PlotOrientation orientation,
                                                  boolean legend,
                                                  boolean tooltips,
                                                  boolean urls)
Creates a stacked XY area plot. The chart object returned by this method uses an XYPlot instance as the plot, with a NumberAxis for the domain axis, a NumberAxis as the range axis, and a StackedXYAreaRenderer2 as the renderer.

Parameters:
title - the chart title (null permitted).
xAxisLabel - a label for the X-axis (null permitted).
yAxisLabel - a label for the Y-axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null NOT permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A stacked XY area chart.

createXYLineChart

public static JFreeChart createXYLineChart(java.lang.String title,
                                           java.lang.String xAxisLabel,
                                           java.lang.String yAxisLabel,
                                           XYDataset dataset,
                                           PlotOrientation orientation,
                                           boolean legend,
                                           boolean tooltips,
                                           boolean urls)
Creates a line chart (based on an XYDataset) with default settings.

Parameters:
title - the chart title (null permitted).
xAxisLabel - a label for the X-axis (null permitted).
yAxisLabel - a label for the Y-axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null NOT permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
The chart.

createXYStepChart

public static JFreeChart createXYStepChart(java.lang.String title,
                                           java.lang.String xAxisLabel,
                                           java.lang.String yAxisLabel,
                                           XYDataset dataset,
                                           PlotOrientation orientation,
                                           boolean legend,
                                           boolean tooltips,
                                           boolean urls)
Creates a stepped XY plot with default settings.

Parameters:
title - the chart title (null permitted).
xAxisLabel - a label for the X-axis (null permitted).
yAxisLabel - a label for the Y-axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null NOT permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A chart.

createXYStepAreaChart

public static JFreeChart createXYStepAreaChart(java.lang.String title,
                                               java.lang.String xAxisLabel,
                                               java.lang.String yAxisLabel,
                                               XYDataset dataset,
                                               PlotOrientation orientation,
                                               boolean legend,
                                               boolean tooltips,
                                               boolean urls)
Creates a filled stepped XY plot with default settings.

Parameters:
title - the chart title (null permitted).
xAxisLabel - a label for the X-axis (null permitted).
yAxisLabel - a label for the Y-axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the plot orientation (horizontal or vertical) (null NOT permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A chart.

createTimeSeriesChart

public static JFreeChart createTimeSeriesChart(java.lang.String title,
                                               java.lang.String timeAxisLabel,
                                               java.lang.String valueAxisLabel,
                                               XYDataset dataset,
                                               boolean legend,
                                               boolean tooltips,
                                               boolean urls)
Creates and returns a time series chart. A time series chart is an XYPlot with a DateAxis for the x-axis and a NumberAxis for the y-axis. The default renderer is an XYLineAndShapeRenderer.

A convenient dataset to use with this chart is a TimeSeriesCollection.

Parameters:
title - the chart title (null permitted).
timeAxisLabel - a label for the time axis (null permitted).
valueAxisLabel - a label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A time series chart.

createCandlestickChart

public static JFreeChart createCandlestickChart(java.lang.String title,
                                                java.lang.String timeAxisLabel,
                                                java.lang.String valueAxisLabel,
                                                OHLCDataset dataset,
                                                boolean legend)
Creates and returns a default instance of a candlesticks chart.

Parameters:
title - the chart title (null permitted).
timeAxisLabel - a label for the time axis (null permitted).
valueAxisLabel - a label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
Returns:
A candlestick chart.

createHighLowChart

public static JFreeChart createHighLowChart(java.lang.String title,
                                            java.lang.String timeAxisLabel,
                                            java.lang.String valueAxisLabel,
                                            OHLCDataset dataset,
                                            boolean legend)
Creates and returns a default instance of a high-low-open-close chart.

Parameters:
title - the chart title (null permitted).
timeAxisLabel - a label for the time axis (null permitted).
valueAxisLabel - a label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
Returns:
A high-low-open-close chart.

createHighLowChart

public static JFreeChart createHighLowChart(java.lang.String title,
                                            java.lang.String timeAxisLabel,
                                            java.lang.String valueAxisLabel,
                                            OHLCDataset dataset,
                                            Timeline timeline,
                                            boolean legend)
Creates and returns a default instance of a high-low-open-close chart with a special timeline. This timeline can be a SegmentedTimeline such as the Monday through Friday timeline that will remove Saturdays and Sundays from the axis.

Parameters:
title - the chart title (null permitted).
timeAxisLabel - a label for the time axis (null permitted).
valueAxisLabel - a label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
timeline - the timeline.
legend - a flag specifying whether or not a legend is required.
Returns:
A high-low-open-close chart.

createBubbleChart

public static JFreeChart createBubbleChart(java.lang.String title,
                                           java.lang.String xAxisLabel,
                                           java.lang.String yAxisLabel,
                                           XYZDataset dataset,
                                           PlotOrientation orientation,
                                           boolean legend,
                                           boolean tooltips,
                                           boolean urls)
Creates a bubble chart with default settings. The chart is composed of an XYPlot, with a NumberAxis for the domain axis, a NumberAxis for the range axis, and an XYBubbleRenderer to draw the data items.

Parameters:
title - the chart title (null permitted).
xAxisLabel - a label for the X-axis (null permitted).
yAxisLabel - a label for the Y-axis (null permitted).
dataset - the dataset for the chart (null permitted).
orientation - the orientation (horizontal or vertical) (null NOT permitted).
legend - a flag specifying whether or not a legend is required.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A bubble chart.

createHistogram

public static JFreeChart createHistogram(java.lang.String title,
                                         java.lang.String xAxisLabel,
                                         java.lang.String yAxisLabel,
                                         IntervalXYDataset dataset,
                                         PlotOrientation orientation,
                                         boolean legend,
                                         boolean tooltips,
                                         boolean urls)
Creates a histogram chart. This chart is constructed with an XYPlot using an XYBarRenderer. The domain and range axes are NumberAxis instances.

Parameters:
title - the chart title (null permitted).
xAxisLabel - the x axis label (null permitted).
yAxisLabel - the y axis label (null permitted).
dataset - the dataset (null permitted).
orientation - the orientation (horizontal or vertical) (null NOT permitted).
legend - create a legend?
tooltips - display tooltips?
urls - generate URLs?
Returns:
The chart.

createBoxAndWhiskerChart

public static JFreeChart createBoxAndWhiskerChart(java.lang.String title,
                                                  java.lang.String categoryAxisLabel,
                                                  java.lang.String valueAxisLabel,
                                                  BoxAndWhiskerCategoryDataset dataset,
                                                  boolean legend)
Creates and returns a default instance of a box and whisker chart based on data from a BoxAndWhiskerCategoryDataset.

Parameters:
title - the chart title (null permitted).
categoryAxisLabel - a label for the category axis (null permitted).
valueAxisLabel - a label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
Returns:
A box and whisker chart.
Since:
1.0.4

createBoxAndWhiskerChart

public static JFreeChart createBoxAndWhiskerChart(java.lang.String title,
                                                  java.lang.String timeAxisLabel,
                                                  java.lang.String valueAxisLabel,
                                                  BoxAndWhiskerXYDataset dataset,
                                                  boolean legend)
Creates and returns a default instance of a box and whisker chart.

Parameters:
title - the chart title (null permitted).
timeAxisLabel - a label for the time axis (null permitted).
valueAxisLabel - a label for the value axis (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag specifying whether or not a legend is required.
Returns:
A box and whisker chart.

createWindPlot

public static JFreeChart createWindPlot(java.lang.String title,
                                        java.lang.String xAxisLabel,
                                        java.lang.String yAxisLabel,
                                        WindDataset dataset,
                                        boolean legend,
                                        boolean tooltips,
                                        boolean urls)
Creates a wind plot with default settings.

Parameters:
title - the chart title (null permitted).
xAxisLabel - a label for the x-axis (null permitted).
yAxisLabel - a label for the y-axis (null permitted).
dataset - the dataset for the chart (null permitted).
legend - a flag that controls whether or not a legend is created.
tooltips - configure chart to generate tool tips?
urls - configure chart to generate URLs?
Returns:
A wind plot.

createWaferMapChart

public static JFreeChart createWaferMapChart(java.lang.String title,
                                             WaferMapDataset dataset,
                                             PlotOrientation orientation,
                                             boolean legend,
                                             boolean tooltips,
                                             boolean urls)
Creates a wafer map chart.

Parameters:
title - the chart title (null permitted).
dataset - the dataset (null permitted).
orientation - the plot orientation (horizontal or vertical) (null NOT permitted.
legend - display a legend?
tooltips - generate tooltips?
urls - generate URLs?
Returns:
A wafer map chart.

Footer
And More


Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.