Package com.storedobject.chart
Class AbstractChart
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.Chart
com.storedobject.chart.AbstractChart
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasAnimation,HasData,HasEmphasis
- Direct Known Subclasses:
SelfPositioningChart,XYChart
Abstract base class for creating specific subtypes of charts that requires more axes.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.chart.Chart
Chart.Emphasis, Chart.Label, Chart.LabelPosition -
Constructor Summary
ConstructorsConstructorDescriptionAbstractChart(ChartType type, boolean axesBased, AbstractDataProvider<?>... data) Create a chart of a given type and data.AbstractChart(ChartType type, AbstractDataProvider<?>... data) Create a chart of a given type and data. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidsetData(AbstractDataProvider<?>... data) This method if invoked will raise aRuntimeExceptionif this is an axes-based chart.protected final voidsetData(AbstractDataProvider<?> data, int index) Use this method to set data at a specific index in derived classes.final voidCalling this method does not have any effect.voidvalidate()This method is invoked bySOChartto check if the component or part is valid or not.Methods inherited from class com.storedobject.chart.Chart
addParts, dataToEmbed, dataValue, dataValueIndex, declareData, encodeJSON, getAnimation, getCoordinateSystem, getData, getEmphasis, getItemStyle, getLabel, getLabelName, getMarkArea, getMax, getMin, getName, getTooltip, getType, mainData, plotOn, plotOn, setAnimation, setColors, setCustomRenderer, setEmphasis, setItemStyle, setLabel, setMarkArea, setName, setTooltip, typeValueMethods inherited from class com.storedobject.chart.AbstractPart
equals, getId, getLabelTag, getSerial, getZ, hashCode, hasId, setSerial, setZMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.chart.ComponentPart
className, getId, getRenderingIndex, getSerial, setRenderingIndex, setSerial
-
Constructor Details
-
AbstractChart
Create a chart of a given type and data.- Parameters:
type- type of the chart.data- Data to be used (multiples of them for charts that use multi-axis coordinate systems).
-
AbstractChart
Create a chart of a given type and data.- Parameters:
type- type of the chart.axesBased- Whether this is an axes-based chart or not.data- Data to be used (multiples of them for charts that use multi-axis coordinate systems).
-
-
Method Details
-
setType
-
validate
Description copied from interface:ComponentPartThis method is invoked bySOChartto check if the component or part is valid or not.- Specified by:
validatein interfaceComponentPart- Overrides:
validatein classChart- Throws:
ChartException- Raises exception if the component or part is not valid.
-
setData
This method if invoked will raise aRuntimeExceptionif this is an axes-based chart. However, you can usesetData(AbstractDataProvider, int)to set data at a particular index. -
setData
Use this method to set data at a specific index in derived classes.- Parameters:
data- Data to be set.index- Index position in the data array.
-