|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.chart.ChartFactory
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 data,
boolean legend,
boolean tooltips,
boolean urls)
Creates an area chart with default settings. |
static JFreeChart |
createAreaXYChart(java.lang.String title,
java.lang.String xAxisLabel,
java.lang.String yAxisLabel,
XYDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates an XY area plot. |
static JFreeChart |
createBubbleChart(java.lang.String title,
java.lang.String xAxisLabel,
java.lang.String yAxisLabel,
XYZDataset data,
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,
HighLowDataset data,
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 data,
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,
HighLowDataset data,
boolean legend)
Creates and returns a default instance of a high-low-open-close chart. |
static JFreeChart |
createHorizontalBarChart(java.lang.String title,
java.lang.String domainAxisLabel,
java.lang.String rangeAxisLabel,
CategoryDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a horizontal bar chart with default settings. |
static JFreeChart |
createHorizontalBarChart3D(java.lang.String title,
java.lang.String categoryAxisLabel,
java.lang.String valueAxisLabel,
CategoryDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a horizontal 3D-effect bar chart with default settings. |
static JFreeChart |
createLineChart(java.lang.String title,
java.lang.String categoryAxisLabel,
java.lang.String valueAxisLabel,
CategoryDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a line chart with default settings. |
static JFreeChart |
createLineXYChart(java.lang.String title,
java.lang.String xAxisLabel,
java.lang.String yAxisLabel,
XYDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a line chart (based on an XYDataset) with default settings. |
static JFreeChart |
createPie3DChart(java.lang.String title,
PieDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a pie chart with default settings. |
static JFreeChart |
createPieChart(java.lang.String title,
CategoryDataset data,
int extractType,
boolean legend,
boolean tooltips,
boolean urls)
Creates a chart containing multiple pie charts, from a TableDataset. |
static JFreeChart |
createPieChart(java.lang.String title,
PieDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a pie chart with default settings. |
static JFreeChart |
createScatterPlot(java.lang.String title,
java.lang.String xAxisLabel,
java.lang.String yAxisLabel,
XYDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a scatter plot with default settings. |
static JFreeChart |
createSignalChart(java.lang.String title,
java.lang.String timeAxisLabel,
java.lang.String valueAxisLabel,
SignalsDataset data,
boolean legend)
Creates and returns a default instance of a signal chart. |
static JFreeChart |
createStackedAreaChart(java.lang.String title,
java.lang.String categoryAxisLabel,
java.lang.String valueAxisLabel,
CategoryDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates an area chart with default settings. |
static JFreeChart |
createStackedHorizontalBarChart(java.lang.String title,
java.lang.String domainAxisLabel,
java.lang.String rangeAxisLabel,
CategoryDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a stacked horizontal bar chart with default settings. |
static JFreeChart |
createStackedVerticalBarChart(java.lang.String title,
java.lang.String domainAxisLabel,
java.lang.String rangeAxisLabel,
CategoryDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a stacked vertical bar chart with default settings. |
static JFreeChart |
createStackedVerticalBarChart3D(java.lang.String title,
java.lang.String categoryAxisLabel,
java.lang.String valueAxisLabel,
CategoryDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a stacked vertical bar chart with default settings. |
static JFreeChart |
createTimeSeriesChart(java.lang.String title,
java.lang.String timeAxisLabel,
java.lang.String valueAxisLabel,
XYDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates and returns a time series chart. |
static JFreeChart |
createVerticalBarChart(java.lang.String title,
java.lang.String categoryAxisLabel,
java.lang.String valueAxisLabel,
CategoryDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a vertical bar chart with default settings. |
static JFreeChart |
createVerticalBarChart3D(java.lang.String title,
java.lang.String categoryAxisLabel,
java.lang.String valueAxisLabel,
CategoryDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a vertical 3D-effect bar chart with default settings. |
static JFreeChart |
createVerticalXYBarChart(java.lang.String title,
java.lang.String xAxisLabel,
java.lang.String yAxisLabel,
IntervalXYDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates and returns a default instance of a vertical XY bar chart. |
static JFreeChart |
createWindPlot(java.lang.String title,
java.lang.String xAxisLabel,
java.lang.String yAxisLabel,
WindDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a wind plot with default settings. |
static JFreeChart |
createXYStepChart(java.lang.String title,
java.lang.String xAxisLabel,
java.lang.String yAxisLabel,
XYDataset data,
boolean legend,
boolean tooltips,
boolean urls)
Creates a stepped XY plot with default settings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ChartFactory()
Method Detail |
public static JFreeChart createPieChart(java.lang.String title, PieDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createPieChart(java.lang.String title, CategoryDataset data, int extractType, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.data
- the dataset for the chart.extractType
- PER_ROW
or PER_COLUMN
(defined in
PiePlot
).legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createPie3DChart(java.lang.String title, PieDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createVerticalBarChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.categoryAxisLabel
- the label for the category axis.valueAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createVerticalBarChart3D(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.categoryAxisLabel
- the label for the category axis.valueAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createStackedVerticalBarChart(java.lang.String title, java.lang.String domainAxisLabel, java.lang.String rangeAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.domainAxisLabel
- the label for the category axis.rangeAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createStackedVerticalBarChart3D(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.categoryAxisLabel
- the label for the category axis.valueAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createHorizontalBarChart(java.lang.String title, java.lang.String domainAxisLabel, java.lang.String rangeAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.domainAxisLabel
- the label for the category axis.rangeAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createHorizontalBarChart3D(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.categoryAxisLabel
- the label for the category axis.valueAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createStackedHorizontalBarChart(java.lang.String title, java.lang.String domainAxisLabel, java.lang.String rangeAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.domainAxisLabel
- the label for the category axis.rangeAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createLineChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.categoryAxisLabel
- the label for the category axis.valueAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createAreaChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.categoryAxisLabel
- the label for the category axis.valueAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createStackedAreaChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.categoryAxisLabel
- the label for the category axis.valueAxisLabel
- the label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createGanttChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String dateAxisLabel, IntervalCategoryDataset data, boolean legend, boolean tooltips, boolean urls)
The chart uses the following classes amongst others:
HorizontalCategoryPlot
VerticalCategoryAxis
HorizontalDateAxis
HorizontalIntervalBarRenderer
title
- the chart title.categoryAxisLabel
- the label for the category axis.dateAxisLabel
- the label for the date axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createLineXYChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.xAxisLabel
- a label for the X-axis.yAxisLabel
- a label for the Y-axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createAreaXYChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.xAxisLabel
- a label for the X-axis.yAxisLabel
- a label for the Y-axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createScatterPlot(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.xAxisLabel
- a label for the X-axis.yAxisLabel
- a label for the Y-axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createBubbleChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYZDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.xAxisLabel
- a label for the X-axis.yAxisLabel
- a label for the Y-axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createWindPlot(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, WindDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.xAxisLabel
- a label for the x-axis.yAxisLabel
- a label for the y-axis.data
- the dataset for the chart.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?
public static JFreeChart createTimeSeriesChart(java.lang.String title, java.lang.String timeAxisLabel, java.lang.String valueAxisLabel, XYDataset data, boolean legend, boolean tooltips, boolean urls)
A time series chart is an XYPlot with a date axis (horizontal) and a number axis (vertical), and each data item is connected with a line.
Note that you can supply a TimeSeriesCollection to this method, as it implements the XYDataset interface.
title
- the chart title.timeAxisLabel
- a label for the time axis.valueAxisLabel
- a label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createVerticalXYBarChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, IntervalXYDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.xAxisLabel
- a label for the X-axis.yAxisLabel
- a label for the Y-axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
public static JFreeChart createHighLowChart(java.lang.String title, java.lang.String timeAxisLabel, java.lang.String valueAxisLabel, HighLowDataset data, boolean legend)
title
- the chart title.timeAxisLabel
- a label for the time axis.valueAxisLabel
- a label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.
public static JFreeChart createCandlestickChart(java.lang.String title, java.lang.String timeAxisLabel, java.lang.String valueAxisLabel, HighLowDataset data, boolean legend)
title
- the chart title.timeAxisLabel
- a label for the time axis.valueAxisLabel
- a label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.
public static JFreeChart createSignalChart(java.lang.String title, java.lang.String timeAxisLabel, java.lang.String valueAxisLabel, SignalsDataset data, boolean legend)
title
- the chart title.timeAxisLabel
- a label for the time axis.valueAxisLabel
- a label for the value axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.
public static JFreeChart createXYStepChart(java.lang.String title, java.lang.String xAxisLabel, java.lang.String yAxisLabel, XYDataset data, boolean legend, boolean tooltips, boolean urls)
title
- the chart title.xAxisLabel
- a label for the X-axis.yAxisLabel
- a label for the Y-axis.data
- the dataset for the chart.legend
- a flag specifying whether or not a legend is required.tooltips
- configure chart to generate tool tips?urls
- configure chart to generate URLs?
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |