Package org.jfree.chart.demo
Class DemoDatasetFactory
java.lang.Object
org.jfree.chart.demo.DemoDatasetFactory
public abstract class DemoDatasetFactory extends Object
A utility class for generating sample datasets for the demos.
These datasets are hard-coded so that they are easily accessible for the demonstration applications. In a real application, you would create datasets dynamically by reading data from a file, a database, or some other source.
-
Constructor Summary
Constructors Constructor Description DemoDatasetFactory()
-
Method Summary
Modifier and Type Method Description static CategoryDataset
createCategoryDataset()
Creates and returns aCategoryDataset
for the demo charts.static TimeSeries
createEURTimeSeries()
Returns a time series of the daily EUR/GBP exchange rates in 2001 (to date), for use in the JFreeChart demonstration application.static HighLowDataset
createHighLowDataset()
Creates a sample high low dataset.static IntervalCategoryDataset
createIntervalCategoryDataset()
Returns a null interval category dataset.static TimeSeries
createJPYTimeSeries()
Returns a time series of the daily EUR/GBP exchange rates in 2001 (to date), for use in the JFreeChart demonstration application.static WaferMapDataset
createRandomWaferMapDataset(int values)
Creates a random wafermap datasetstatic SignalsDataset
createSampleSignalDataset()
Returns a sample signal dataset.static XYDataset
createSampleXYDataset()
Returns a sample XY dataset.static HighLowDataset
createSegmentedHighLowDataset(SegmentedTimeline timeline, Date start)
Creates a sample high low dataset for a SegmentedTimelinestatic CategoryDataset
createSingleCategoryDataset()
Creates and returns a category dataset with JUST ONE CATEGORY for the demo charts.static CategoryDataset
createSingleSeriesCategoryDataset()
Creates and returns a category dataset for the demo charts.static TimeSeriesCollection
createTimeSeriesCollection1()
Returns a dataset consisting of one annual series.static TimeSeriesCollection
createTimeSeriesCollection2()
Creates a time series collection containing JPY/GBP exchange rates.static TimeSeriesCollection
createTimeSeriesCollection3()
Creates a time series collection containing USD/GBP and EUR/GBP exchange rates.static TimeSeriesCollection
createTimeSeriesCollection4()
Returns a time series dataset using millisecond data.static TimeSeries
createUSDTimeSeries()
Returns a time series of the daily USD/GBP exchange rates in 2001 (to date), for use in the JFreeChart demonstration application.static WaferMapDataset
createWaferMapDataset()
Creates a sample wafermap dataset.static WindDataset
createWindDataset1()
Creates a sample wind dataset.
-
Constructor Details
-
DemoDatasetFactory
public DemoDatasetFactory()
-
-
Method Details
-
createCategoryDataset
Creates and returns aCategoryDataset
for the demo charts.- Returns:
- a sample dataset.
-
createSingleCategoryDataset
Creates and returns a category dataset with JUST ONE CATEGORY for the demo charts.- Returns:
- a sample category dataset.
-
createSingleSeriesCategoryDataset
Creates and returns a category dataset for the demo charts.- Returns:
- a sample category dataset.
-
createIntervalCategoryDataset
Returns a null interval category dataset.- Returns:
- null.
-
createSampleXYDataset
Returns a sample XY dataset.- Returns:
- a sample XY dataset.
-
createTimeSeriesCollection1
Returns a dataset consisting of one annual series.- Returns:
- a sample time series collection.
-
createTimeSeriesCollection2
Creates a time series collection containing JPY/GBP exchange rates.- Returns:
- a sample time series collection.
-
createTimeSeriesCollection3
Creates a time series collection containing USD/GBP and EUR/GBP exchange rates.- Returns:
- a sample time series collection.
-
createTimeSeriesCollection4
Returns a time series dataset using millisecond data.- Returns:
- a sample time series collection.
-
createUSDTimeSeries
Returns a time series of the daily USD/GBP exchange rates in 2001 (to date), for use in the JFreeChart demonstration application.You wouldn't normally create a time series in this way. Typically, values would be read from a database.
- Returns:
- a time series.
-
createEURTimeSeries
Returns a time series of the daily EUR/GBP exchange rates in 2001 (to date), for use in the JFreeChart demonstration application.You wouldn't normally create a time series in this way. Typically, values would be read from a database.
- Returns:
- a time series.
-
createJPYTimeSeries
Returns a time series of the daily EUR/GBP exchange rates in 2001 (to date), for use in the JFreeChart demonstration application.You wouldn't normally create a time series in this way. Typically, values would be read from a database.
- Returns:
- a sample time series.
-
createSampleSignalDataset
Returns a sample signal dataset.- Returns:
- a sample signal dataset.
-
createHighLowDataset
Creates a sample high low dataset.- Returns:
- a sample high low dataset.
-
createSegmentedHighLowDataset
Creates a sample high low dataset for a SegmentedTimeline- Parameters:
timeline
- SegmenteTimeline that will use this dataset.start
- Date from where the dataset will be generated. Actual dates will be generated dynamically based on the timeline.- Returns:
- a sample high low dataset.
-
createWindDataset1
Creates a sample wind dataset.- Returns:
- a sample wind dataset.
-
createWaferMapDataset
Creates a sample wafermap dataset.- Returns:
- a sample wafermap dataset
-
createRandomWaferMapDataset
Creates a random wafermap dataset- Parameters:
values
- Maximum number of random values- Returns:
- a random wafermap dataset
-