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 TypeMethodDescriptionvoidAdd data point.voidAdd data point.voidAdd data point.voidAdd data point.voidAdd parts of this component to the chart.protected AbstractDataProvider<?> Get the data to embed.protected intGet the index to get the real data value of this chart.final VisualMapGet theVisualMapassociated with this chart.voidsetVisualMap(VisualMap visualMap) Set aVisualMapfor this chart.voidvalidate()This method is invoked bySOChartto 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, 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
-
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: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.
-
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:ChartGet 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,GaugeChartetc. If null is returned from this method, no data will be embedded.- Overrides:
dataToEmbedin classChart- Returns:
- Data to embed.
-
dataValueIndex
protected int dataValueIndex()Description copied from class:ChartGet 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:
dataValueIndexin classChart- Returns:
- Data value index.
-
addParts
Description copied from interface:ComponentAdd 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
-