JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart
Interface ChartDataModel

All Known Subinterfaces:
EditableChartDataModel
All Known Implementing Classes:
BaseDataSource, JCChartSwingDataSource, JCEditableDataSource

public interface ChartDataModel

The core data model interface for JClass Chart.

In JClass Chart, data is specified in terms of data series. Chart asks for the x or y data for a particular series, and the data source implementing this class is expected to return an array of double values (double[]).

JClass Chart will attempt to recognize cases in which the same x data is returned for all series and then will re-use that data.

It is recommended that implementors honor the NumSeries property. Thus, be sure you can handle x or y data queries in the range 0 to NumSeries.

Point labels, series labels, and data source names are specified by implementing LabelledChartDataModel.

See Also:
LabelledChartDataModel

Field Summary
static int ALL
          In certain contexts, used to specify all series or all points.
 
Method Summary
 int getNumSeries()
          Retrieves the number of data series.
 double[] getXSeries(int index)
          Retrieves the x values of the specified data series.
 double[] getYSeries(int index)
          Retrieves the y values of the specified data series.
 

Field Detail

ALL

public static final int ALL
In certain contexts, used to specify all series or all points.

See Also:
Constant Field Values
Method Detail

getXSeries

public double[] getXSeries(int index)
Retrieves the x values of the specified data series.

Parameters:
index - data series index
Returns:
array of double values representing x value data

getYSeries

public double[] getYSeries(int index)
Retrieves the y values of the specified data series.

Parameters:
index - data series index
Returns:
array of double values representing y value data

getNumSeries

public int getNumSeries()
Retrieves the number of data series.

Returns:
the number of data series

Copyright © 2004 Quest Software Inc..
All rights reserved.