Package org.jfree.chart.demo
Class JFreeChartDemoBase
java.lang.Object
org.jfree.chart.demo.JFreeChartDemoBase
public class JFreeChartDemoBase extends Object
A simple class that allows the swing and servlet chart demonstrations to
share chart generating code. If you would like to add a chart to the swing
and/or servlet demo do so here.
-
Field Summary
Fields Modifier and Type Field Description static String
BASE_RESOURCE_CLASS
Base class name for localised resources.static String[][]
CHART_COMMANDS
CHART_COMMANDS holds information on charts that can be created Format is Name, Creation Method, Resource file prefix Steps To add a chart 1) Create a createChart method which returns a JFreeChart 2) Append details to CHART_COMMANDS 3) Append details to DemoResources -
Constructor Summary
Constructors Constructor Description JFreeChartDemoBase()
Default constructor. -
Method Summary
Modifier and Type Method Description JFreeChart
createCandlestickChart()
Creates a candlestick chart.JFreeChart
createCombinedAndOverlaidChart1()
Creates a combined and overlaid chart.JFreeChart
createCombinedAndOverlaidDynamicXYChart()
Displays an XY chart that is periodically updated by a background thread.JFreeChart
createCompassChart()
Creates a compass chart.JFreeChart
createDynamicXYChart()
Displays an XY chart that is periodically updated by a background thread.JFreeChart
createGanttChart()
Creates a gantt chart.JFreeChart
createHighLowChart()
Displays a vertical bar chart in its own frame.JFreeChart
createHorizontalBarChart()
Create a horizontal bar chart.JFreeChart
createHorizontallyCombinedChart()
Creates a horizontally combined chart.JFreeChart
createLineChart()
Creates and returns a sample line chart.JFreeChart
createMeterChartChord()
Creates and returns a sample meter chart.JFreeChart
createMeterChartCircle()
Creates and returns a sample meter chart.JFreeChart
createMeterChartPie()
Creates and returns a sample meter chart.JFreeChart
createNullXYPlot()
Creates and returns a sample XY chart with null data.JFreeChart
createOverlaidChart()
Creates and returns a sample overlaid chart.JFreeChart
createPieChartOne()
Creates and returns a sample pie chart.JFreeChart
createPieChartThree()
Creates and returns a sample pie chart which compares 2 datasets.JFreeChart
createPieChartTwo()
Creates and returns a sample pie chart.JFreeChart
createScatterPlot()
Creates and returns a sample scatter plot.JFreeChart
createSignalChart()
Creates and returns a sample signal chart.JFreeChart
createSingleSeriesBarChart()
Creates and returns a sample bar chart with just one series.JFreeChart
createStackedHorizontalBarChart()
Creates and returns a sample stacked horizontal bar chart.JFreeChart
createThermometerChart()
Creates and returns a sample thermometer chart.JFreeChart
createTimeSeries1Chart()
Creates and returns a sample time series chart.JFreeChart
createTimeSeries2Chart()
Creates and returns a sample time series chart.JFreeChart
createTimeSeriesChartInScrollPane()
Creates and returns a sample time series chart that will be displayed in a scroll pane.JFreeChart
createTimeSeriesWithMAChart()
Creates and returns a sample time series chart.JFreeChart
createVertical3DBarChart()
Creates and returns a sample vertical 3D bar chart.JFreeChart
createVerticalBarChart()
Creates and returns a sample vertical bar chart.JFreeChart
createVerticallyCombinedChart()
Creates and returns a sample vertically combined chart.JFreeChart
createVerticalStacked3DBarChart()
Creates and returns a sample stacked vertical 3D bar chart.JFreeChart
createVerticalStackedBarChart()
Creates and returns a sample stacked vertical bar chart.JFreeChart
createVerticalXYBarChart()
Creates and returns a sample vertical XY bar chart.JFreeChart
createWaferMapChart()
Creates a basic wafermap chart with a random datasetJFreeChart
createWaferMapChartPositionIndexed()
Creates a basic wafermap chart with a random datasetJFreeChart
createWaferMapChartValueIndexed()
Creates a basic wafermap chart with a random datasetJFreeChart
createWindPlot()
Creates and returns a sample wind plot.JFreeChart
createXYPlot()
Creates and returns a sample XY plot.JFreeChart
createXYPlotZeroData()
Creates a sample XY plot with an empty dataset.JFreeChart
getChart(int i)
Returns a chart.ResourceBundle
getResources()
This makes the resources bundle available.
-
Field Details
-
CHART_COMMANDS
CHART_COMMANDS holds information on charts that can be created Format is Name, Creation Method, Resource file prefix Steps To add a chart 1) Create a createChart method which returns a JFreeChart 2) Append details to CHART_COMMANDS 3) Append details to DemoResources -
BASE_RESOURCE_CLASS
Base class name for localised resources.- See Also:
- Constant Field Values
-
-
Constructor Details
-
JFreeChartDemoBase
public JFreeChartDemoBase()Default constructor.
-
-
Method Details
-
getChart
Returns a chart.- Parameters:
i
- the chart index.- Returns:
- a chart.
-
getResources
This makes the resources bundle available. Basically an optimisation so the demo servlet can access the same resource file.- Returns:
- the resources bundle.
-
createHorizontalBarChart
Create a horizontal bar chart.- Returns:
- a horizontal bar chart.
-
createStackedHorizontalBarChart
Creates and returns a sample stacked horizontal bar chart.- Returns:
- a sample stacked horizontal bar chart.
-
createVerticalBarChart
Creates and returns a sample vertical bar chart.- Returns:
- a sample vertical bar chart.
-
createVertical3DBarChart
Creates and returns a sample vertical 3D bar chart.- Returns:
- a sample vertical 3D bar chart.
-
createVerticalStackedBarChart
Creates and returns a sample stacked vertical bar chart.- Returns:
- a sample stacked vertical bar chart.
-
createVerticalStacked3DBarChart
Creates and returns a sample stacked vertical 3D bar chart.- Returns:
- a sample stacked vertical 3D bar chart.
-
createPieChartOne
Creates and returns a sample pie chart.- Returns:
- a sample pie chart.
-
createPieChartTwo
Creates and returns a sample pie chart.- Returns:
- a sample pie chart.
-
createPieChartThree
Creates and returns a sample pie chart which compares 2 datasets.- Returns:
- a sample pie chart.
- Since:
- 0.9.18
-
createXYPlot
Creates and returns a sample XY plot.- Returns:
- a sample XY plot.
-
createTimeSeries1Chart
Creates and returns a sample time series chart.- Returns:
- a sample time series chart.
-
createTimeSeries2Chart
Creates and returns a sample time series chart.- Returns:
- a sample time series chart.
-
createTimeSeriesWithMAChart
Creates and returns a sample time series chart.- Returns:
- a sample time series chart.
-
createHighLowChart
Displays a vertical bar chart in its own frame.- Returns:
- a high low chart.
-
createCandlestickChart
Creates a candlestick chart.- Returns:
- a candlestick chart.
-
createSignalChart
Creates and returns a sample signal chart.- Returns:
- a sample chart.
-
createThermometerChart
Creates and returns a sample thermometer chart.- Returns:
- a sample thermometer chart.
-
createMeterChartCircle
Creates and returns a sample meter chart.- Returns:
- a meter chart.
-
createMeterChartPie
Creates and returns a sample meter chart.- Returns:
- a meter chart.
-
createMeterChartChord
Creates and returns a sample meter chart.- Returns:
- the meter chart.
-
createCompassChart
Creates a compass chart.- Returns:
- a compass chart.
-
createWindPlot
Creates and returns a sample wind plot.- Returns:
- a sample wind plot.
-
createScatterPlot
Creates and returns a sample scatter plot.- Returns:
- a sample scatter plot.
-
createLineChart
Creates and returns a sample line chart.- Returns:
- a line chart.
-
createVerticalXYBarChart
Creates and returns a sample vertical XY bar chart.- Returns:
- a sample vertical XY bar chart.
-
createNullXYPlot
Creates and returns a sample XY chart with null data.- Returns:
- a chart.
-
createXYPlotZeroData
Creates a sample XY plot with an empty dataset.- Returns:
- a sample XY plot with an empty dataset.
-
createTimeSeriesChartInScrollPane
Creates and returns a sample time series chart that will be displayed in a scroll pane.- Returns:
- a sample time series chart.
-
createSingleSeriesBarChart
Creates and returns a sample bar chart with just one series.- Returns:
- a sample bar chart.
-
createDynamicXYChart
Displays an XY chart that is periodically updated by a background thread. This is to demonstrate the event notification system that automatically updates charts as required.- Returns:
- a chart.
-
createOverlaidChart
Creates and returns a sample overlaid chart.Note: with the introduction of multiple secondary datasets in JFreeChart version 0.9.10, the overlaid chart facility has been removed. You can achieve the same results using a regular XYPlot with multiple datasets.
- Returns:
- an overlaid chart.
-
createHorizontallyCombinedChart
Creates a horizontally combined chart.- Returns:
- a horizontally combined chart.
-
createVerticallyCombinedChart
Creates and returns a sample vertically combined chart.- Returns:
- a sample vertically combined chart.
-
createCombinedAndOverlaidChart1
Creates a combined and overlaid chart.Note: from version 0.9.10, the overlaid chart is no longer supported (you can achieve the same result using a regular XYPlot with multiple datasets and renderers).
- Returns:
- a combined and overlaid chart.
-
createCombinedAndOverlaidDynamicXYChart
Displays an XY chart that is periodically updated by a background thread. This is to demonstrate the event notification system that automatically updates charts as required.- Returns:
- a chart.
-
createGanttChart
Creates a gantt chart.- Returns:
- a gantt chart.
-
createWaferMapChart
Creates a basic wafermap chart with a random dataset- Returns:
- a wafermap chart
-
createWaferMapChartValueIndexed
Creates a basic wafermap chart with a random dataset- Returns:
- a wafermap chart
-
createWaferMapChartPositionIndexed
Creates a basic wafermap chart with a random dataset- Returns:
- a wafermap chart
-