Package com.storedobject.chart
Class XYDataChart
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.Chart
com.storedobject.chart.XYDataChart
- All Implemented Interfaces:
Component
,ComponentPart
,ComponentProperty
,HasAnimation
,HasData
,HasEmphasis
- Direct Known Subclasses:
BubbleChart
,HeatmapChart
Represents an abstract chart where data points are plotted based on X and Y coordinates. It is designed to
be used with a rectangular coordinate system and supports managing data points and associated visual representations.
Subclasses implement specific chart types such as heatmaps or bubble charts.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.chart.Chart
Chart.Emphasis, Chart.Label, Chart.LabelPosition
-
Constructor Summary
ConstructorsConstructorDescriptionXYDataChart
(ChartType chartType, AbstractDataProvider<?> xData, AbstractDataProvider<?> yData) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add data point.void
Add data point.void
Add data point.void
Add data point.void
Add parts of this component to the chart.protected AbstractDataProvider
<?> Get the data to embed.protected int
Get the index to get the real data value of this chart.final VisualMap
Get theVisualMap
associated with this chart.void
setVisualMap
(VisualMap visualMap) Set aVisualMap
for this chart.void
validate()
This method is invoked bySOChart
to check if the component or part is valid or not.Methods inherited from class com.storedobject.chart.Chart
dataValue, declareData, encodeJSON, getAnimation, getCoordinateSystem, getData, getEmphasis, getItemStyle, getLabel, getLabelName, getMarkArea, getMax, getMin, getName, getTooltip, getType, mainData, plotOn, plotOn, setAnimation, setColors, setCustomRenderer, setData, setEmphasis, setItemStyle, setLabel, setMarkArea, setName, setTooltip, setType, typeValue
Methods inherited from class com.storedobject.chart.AbstractPart
equals, getId, getLabelTag, getSerial, getZ, hashCode, hasId, setSerial, setZ
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.storedobject.chart.ComponentPart
className, getId, getRenderingIndex, getSerial, setRenderingIndex, setSerial
-
Constructor Details
-
XYDataChart
public XYDataChart(ChartType chartType, AbstractDataProvider<?> xData, AbstractDataProvider<?> yData) Constructor.- Parameters:
chartType
- Chart type.xData
- Labels on the X-axis.yData
- Labels on the Y-axis.
-
-
Method Details
-
validate
Description copied from interface:ComponentPart
This method is invoked bySOChart
to check if the component or part is valid or not.- Specified by:
validate
in interfaceComponentPart
- Overrides:
validate
in classChart
- Throws:
ChartException
- Raises exception if the component or part is not valid.
-
addData
Add data point.- Parameters:
xIndex
- X-index at which data needs to be added.yIndex
- Y-index at which data needs to be added.value
- Value to be added.
-
addData
-
addData
-
addData
-
dataToEmbed
Description copied from class:Chart
Get the data to embed. This is useful only for those special charts that embed data in the chart itself rather than pointing to the dataset. Example:TreeChart
,GaugeChart
etc. If null is returned from this method, no data will be embedded.- Overrides:
dataToEmbed
in classChart
- Returns:
- Data to embed.
-
dataValueIndex
protected int dataValueIndex()Description copied from class:Chart
Get the index to get the real data value of this chart. (In special charts, the actual data value at a data point may be at an index different from 0).- Overrides:
dataValueIndex
in classChart
- Returns:
- Data value index.
-
addParts
Description copied from interface:Component
Add parts of this component to the chart. This will be invoked if the component was already added to the chart, and it is about to be rendered. -
getVisualMap
-
setVisualMap
-