public class StockChartDataSet extends Object implements IStockChartDataSet, HTMLTestable
| Modifier and Type | Field and Description |
|---|---|
private ChartType |
chartType |
private double[] |
close |
private double[] |
high |
private String[] |
legendLabels |
private double[] |
low |
private int |
numberOfDataSets |
private double[] |
open |
private Paint[] |
paints |
private StockChartProperties |
stockChartProperties |
| Constructor and Description |
|---|
StockChartDataSet(double[] high,
String highLegendLabel,
double[] low,
String lowLegendLabel,
Paint highLowPaint,
StockChartProperties stockChartProperties)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
ChartType |
getChartType()
Returns the type constant that this data set should be plotted as.
|
ChartTypeProperties |
getChartTypeProperties()
Returns the chart specific properties
|
double |
getCloseValue(int index) |
double |
getHighValue(int index) |
String |
getLegendLabel(int index)
Returns the legend label for the passed index.
|
double |
getLowValue(int index) |
int |
getNumberOfDataItems()
Returns the number of elements in the data set.
|
int |
getNumberOfDataSets()
Returns the number of IAxisChartDataSet Objects in this series
|
int |
getNumberOfLegendLabels()
Returns the number of Legend Labels to display.
|
double |
getOpenValue(int index) |
Paint |
getPaint(int index)
Returns the number of IAxisChartDataSet Objects in this series
|
boolean |
hasCloseValues() |
boolean |
hasOpenValues() |
void |
setCloseValues(double[] data,
String legendLabel,
Paint paint)
Sets the 'Close' values
|
void |
setOpenValues(double[] data,
String legendLabel,
Paint paint)
Sets the 'Open' values
|
void |
toHTML(HTMLGenerator htmlGenerator)
Enables the testing routines to display the contents of this Object.
|
void |
validate()
Performs a limited validation of data passed to Constructor.
|
private ChartType chartType
private double[] high
private double[] low
private double[] open
private double[] close
private int numberOfDataSets
private String[] legendLabels
private Paint[] paints
private StockChartProperties stockChartProperties
public StockChartDataSet(double[] high,
String highLegendLabel,
double[] low,
String lowLegendLabel,
Paint highLowPaint,
StockChartProperties stockChartProperties)
throws ChartDataException
high - highLegendLabel - low - lowLegendLabel - stockChartProperties - properties Object specific to the type of chart you are rendering.ChartDataException - performs a limited validation of the datapublic void validate()
throws ChartDataException,
PropertyException
validate in interface IAxisPlotDataSetChartDataExceptionPropertyExceptionpublic String getLegendLabel(int index)
getLegendLabel in interface IDataSetindex - public int getNumberOfLegendLabels()
getNumberOfLegendLabels in interface IDataSetpublic int getNumberOfDataItems()
getNumberOfDataItems in interface IDataSetpublic void setCloseValues(double[] data,
String legendLabel,
Paint paint)
data - legendLabel - paint - public void setOpenValues(double[] data,
String legendLabel,
Paint paint)
data - legendLabel - paint - public double getHighValue(int index)
getHighValue in interface IStockChartDataSetindex - public double getLowValue(int index)
getLowValue in interface IStockChartDataSetindex - public double getCloseValue(int index)
getCloseValue in interface IStockChartDataSetindex - public boolean hasCloseValues()
hasCloseValues in interface IStockChartDataSetpublic double getOpenValue(int index)
getOpenValue in interface IStockChartDataSetindex - public boolean hasOpenValues()
hasOpenValues in interface IStockChartDataSetpublic ChartType getChartType()
getChartType in interface IAxisPlotDataSetgetChartType in interface IStockChartDataSetChartTypepublic ChartTypeProperties getChartTypeProperties()
getChartTypeProperties in interface IDataSetpublic int getNumberOfDataSets()
getNumberOfDataSets in interface IAxisPlotDataSetpublic Paint getPaint(int index)
public void toHTML(HTMLGenerator htmlGenerator)
toHTML in interface HTMLTestablehtmlGenerator -