Package com.storedobject.chart
Class PieChart
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasAnimation,HasData,HasEmphasis,HasPolarProperty,HasPosition
- Direct Known Subclasses:
DonutChart
Pie chart.
(Future versions will provide more chart-specific methods).
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.chart.Chart
Chart.Emphasis, Chart.Label, Chart.LabelPosition -
Constructor Summary
ConstructorsConstructorDescriptionPieChart()Constructor.PieChart(AbstractDataProvider<?> itemNames, DataProvider values) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidEncode the JSON string with the properties of this.final PolarPropertygetPolarProperty(boolean create) Get the polar property.voidsetData(DataProvider data) Set data for the slices.voidsetItemNames(AbstractDataProvider<?> itemNames) Set names of the slices.final voidsetPolarProperty(PolarProperty polarProperty) Set the polar property.Methods inherited from class com.storedobject.chart.SelfPositioningChart
getPosition, setPositionMethods inherited from class com.storedobject.chart.AbstractChart
setData, setData, setType, validateMethods inherited from class com.storedobject.chart.Chart
addParts, dataToEmbed, 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, 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, setSerialMethods inherited from interface com.storedobject.chart.HasPolarProperty
setHoleRadius, setRadius
-
Constructor Details
-
PieChart
public PieChart()Constructor. -
PieChart
Constructor.- Parameters:
itemNames- Item names of the slices.values- Values of the slices.
-
-
Method Details
-
setItemNames
Set names of the slices.- Parameters:
itemNames- Item names of the slices.
-
setData
-
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.
-
getPolarProperty
Description copied from interface:HasPolarPropertyGet the polar property. (Iftrueis passed as the parameter, a new polar property will be created if not already exists).- Specified by:
getPolarPropertyin interfaceHasPolarProperty- Parameters:
create- Whether to create it or not.- Returns:
- Polar property.
-
setPolarProperty
Description copied from interface:HasPolarPropertySet the polar property.- Specified by:
setPolarPropertyin interfaceHasPolarProperty- Parameters:
polarProperty- Polar property to set. It could benull.
-