Package com.storedobject.chart
Class TreeChart
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.Chart
com.storedobject.chart.SelfPositioningSpecialChart
com.storedobject.chart.TreeChart
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasAnimation,HasData,HasEmphasis,HasPosition
Tree chart.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.chart.Chart
Chart.Emphasis, Chart.Label, Chart.LabelPosition -
Constructor Summary
ConstructorsConstructorDescriptionCreate a tree chart.TreeChart(TreeDataProvider data) Create a tree chart of the set of data. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractDataProvider<?> Get the data to embed.voidEncode the JSON string with the properties of this.final OrientationgetOrientation(boolean create) Get orientation.Get the data associated with this chart.final voidsetData(AbstractDataProvider<?>... data) Set data for the chart.final voidsetOrientation(Orientation orientation) Set orientation.voidsetTreeData(TreeDataProvider data) Set data to the chart.voidvalidate()This method is invoked bySOChartto check if the component or part is valid or not.Methods inherited from class com.storedobject.chart.SelfPositioningSpecialChart
getPosition, setPositionMethods inherited from class com.storedobject.chart.Chart
addParts, dataValue, dataValueIndex, declareData, 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, 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
-
TreeChart
public TreeChart()Create a tree chart. Data can be set later. -
TreeChart
Create a tree chart of the set of data.- Parameters:
data- Data to be used.
-
-
Method Details
-
setData
Description copied from class:ChartSet data for the chart. -
getTreeData
Get the data associated with this chart.- Returns:
- Data provider.
-
setTreeData
Set data to the chart.- Parameters:
data- Data provider to set.
-
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.
-
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.
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Overrides:
encodeJSONin classChart- Parameters:
sb- Encoded JSON string to be appended to this.
-
getOrientation
Get orientation.- Parameters:
create- If passedtrue, a new orientation is created.- Returns:
- Orientation.
-
setOrientation
Set orientation.- Parameters:
orientation- Orientation to set.
-