com.rapidminer.gui.new_plotter.engine.jfreechart
Class ChartDatasetFactory

java.lang.Object
  extended by com.rapidminer.gui.new_plotter.engine.jfreechart.ChartDatasetFactory

public class ChartDatasetFactory
extends java.lang.Object

Helper class for converting data delivered by ValueSources into datasets usable by JFreeChart.

Author:
Marius Helf

Method Summary
static org.jfree.data.statistics.DefaultMultiValueCategoryDataset createAnnotatedDefaultMultiValueCategoryDataset(ValueSource valueSource, PlotInstance plotInstance)
          Same as #createDefaultMultiValueCategoryDataset(ValueSource, PlotConfiguration), but instead of storing only the values it stores pairs in the lists, where the first value is the data value, and the second value holds the index of the value in the series in valueSource.
static org.jfree.data.category.CategoryDataset createDefaultCategoryDataset(ValueSource valueSource, PlotInstance plotInstance, boolean fillWithZero, boolean allowValuesLessThanZero)
           
static org.jfree.data.xy.DefaultIntervalXYDataset createDefaultIntervalXYDataset(ValueSource valueSource, PlotInstance plotInstance, boolean createRangeIntervals)
          Creates a dataset which supports custom intervals on both axes.
static org.jfree.data.statistics.DefaultMultiValueCategoryDataset createDefaultMultiValueCategoryDataset(ValueSource valueSource, PlotInstance plotInstance)
          Creates a new DefaultMultiValueCategoryDataset.
static org.jfree.data.statistics.DefaultStatisticalCategoryDataset createDefaultStatisticalCategoryDataset(ValueSource valueSource, PlotInstance plotInstance)
           
static org.jfree.data.xy.DefaultTableXYDataset createDefaultTableXYDataset(ValueSource valueSource, PlotInstance plotInstance)
           
static org.jfree.data.xy.XYDataset createDefaultXYDataset(ValueSource valueSource, int seriesIdx, PlotInstance plotInstance)
           
static org.jfree.data.xy.XYDataset createDefaultXYDataset(ValueSource valueSource, PlotInstance plotInstace)
           
static org.jfree.data.xy.XYSeriesCollection createXYSeriesCollection(ValueSource valueSource, PlotInstance plotInstance, double autoWidthFraction, boolean allowDuplicates, boolean sortByDomain)
           
static java.lang.String generateSeriesName(ValueSource valueSource, GroupCellKey groupCellKey, PlotConfiguration plotConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createXYSeriesCollection

public static org.jfree.data.xy.XYSeriesCollection createXYSeriesCollection(ValueSource valueSource,
                                                                            PlotInstance plotInstance,
                                                                            double autoWidthFraction,
                                                                            boolean allowDuplicates,
                                                                            boolean sortByDomain)
                                                                     throws ChartPlottimeException
Parameters:
valueSource -
plotInstance -
autoWidthFraction - If this value is greater than 0, an auto width for the intervals is calculated such that the intervals nearest to each other touch. This value is then multiplied with the value of autoWidthFtraction. If unset, the intervals have width 0.
allowDuplicates -
sortByDomain - if true, the data is sorted by domain values (useful for bar and area charts)
Returns:
Throws:
ChartPlottimeException

createDefaultIntervalXYDataset

public static org.jfree.data.xy.DefaultIntervalXYDataset createDefaultIntervalXYDataset(ValueSource valueSource,
                                                                                        PlotInstance plotInstance,
                                                                                        boolean createRangeIntervals)
                                                                                 throws ChartPlottimeException
Creates a dataset which supports custom intervals on both axes. Expects a grouping on the domain axis.

Throws:
ChartPlottimeException

createDefaultCategoryDataset

public static org.jfree.data.category.CategoryDataset createDefaultCategoryDataset(ValueSource valueSource,
                                                                                   PlotInstance plotInstance,
                                                                                   boolean fillWithZero,
                                                                                   boolean allowValuesLessThanZero)
                                                                            throws ChartPlottimeException
Throws:
ChartPlottimeException

generateSeriesName

public static java.lang.String generateSeriesName(ValueSource valueSource,
                                                  GroupCellKey groupCellKey,
                                                  PlotConfiguration plotConfiguration)

createDefaultXYDataset

public static org.jfree.data.xy.XYDataset createDefaultXYDataset(ValueSource valueSource,
                                                                 PlotInstance plotInstace)
                                                          throws ChartPlottimeException
Throws:
ChartPlottimeException

createDefaultXYDataset

public static org.jfree.data.xy.XYDataset createDefaultXYDataset(ValueSource valueSource,
                                                                 int seriesIdx,
                                                                 PlotInstance plotInstance)
                                                          throws ChartPlottimeException
Throws:
ChartPlottimeException

createDefaultTableXYDataset

public static org.jfree.data.xy.DefaultTableXYDataset createDefaultTableXYDataset(ValueSource valueSource,
                                                                                  PlotInstance plotInstance)
                                                                           throws ChartPlottimeException
Throws:
ChartPlottimeException

createDefaultStatisticalCategoryDataset

public static org.jfree.data.statistics.DefaultStatisticalCategoryDataset createDefaultStatisticalCategoryDataset(ValueSource valueSource,
                                                                                                                  PlotInstance plotInstance)
                                                                                                           throws ChartPlottimeException
Throws:
ChartPlottimeException

createDefaultMultiValueCategoryDataset

public static org.jfree.data.statistics.DefaultMultiValueCategoryDataset createDefaultMultiValueCategoryDataset(ValueSource valueSource,
                                                                                                                PlotInstance plotInstance)
                                                                                                         throws ChartPlottimeException
Creates a new DefaultMultiValueCategoryDataset. Such a dataset contains a list of values for each datapoint of a series. For each series in valueSource a series in the dataset created. A datapoint in the dataset refers to one x value. In the valueSource there might exist several datapoints for each x value. These are collected in the list for the appropriate datapoint in the dataset.

Throws:
ChartPlottimeException

createAnnotatedDefaultMultiValueCategoryDataset

public static org.jfree.data.statistics.DefaultMultiValueCategoryDataset createAnnotatedDefaultMultiValueCategoryDataset(ValueSource valueSource,
                                                                                                                         PlotInstance plotInstance)
                                                                                                                  throws ChartPlottimeException
Same as #createDefaultMultiValueCategoryDataset(ValueSource, PlotConfiguration), but instead of storing only the values it stores pairs in the lists, where the first value is the data value, and the second value holds the index of the value in the series in valueSource. Must be used for the FormattedScatterRenderer.

Throws:
ChartPlottimeException


Copyright © 2001-2009 by Rapid-I