Package com.storedobject.chart
Class RadarCoordinate
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.VisiblePart
com.storedobject.chart.CoordinateSystem
com.storedobject.chart.RadarCoordinate
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasData,HasPolarProperty,HasPosition,VisibleProperty
Radar coordinate is used by
RadarChart. Each of its leg (radial axis) can be labelled (indicators)
by CategoryData.- Author:
- Syam
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.RadarCoordinate(CategoryDataProvider axisIndicators) Construct with the given set of axis indicators.RadarCoordinate(RadarAxis axis) Constructor.RadarCoordinate(RadarAxis axis, CategoryDataProvider axisIndicators) Construct with the given set of axis indicators. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd axes.voidEncode the JSON string with the properties of this.getAxis()Get the current axis indicators.final AbstractColorgetColor()Get the color of the indicator.final PolarPropertygetPolarProperty(boolean create) Get the polar property.intGet the starting angle.final booleanIs the shape circular?voidvoidsetAxisIndicators(CategoryDataProvider axisIndicators) Set axis indicators.voidsetCircular(boolean circular) Set the shape as circular.voidsetColor(AbstractColor color) Set color of the indicator.final voidsetPolarProperty(PolarProperty polarProperty) Set the polar property.voidsetStartingAngle(int startingAngle) Set the starting angle.voidvalidate()This method is invoked bySOChartto check if the component or part is valid or not.Methods inherited from class com.storedobject.chart.CoordinateSystem
add, addParts, declareData, getAxis, getPosition, remove, removeAxis, setPositionMethods inherited from class com.storedobject.chart.VisiblePart
isVisible, setVisibleMethods inherited from class com.storedobject.chart.AbstractPart
equals, getId, getLabelTag, getName, 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, getName, getRenderingIndex, getSerial, setName, setRenderingIndex, setSerialMethods inherited from interface com.storedobject.chart.HasPolarProperty
setHoleRadius, setRadiusMethods inherited from interface com.storedobject.chart.VisibleProperty
hide, show
-
Constructor Details
-
RadarCoordinate
public RadarCoordinate()Constructor. Axis indicators can be set later. A defaultRadarAxiswill be created. -
RadarCoordinate
Construct with the given set of axis indicators. A defaultRadarAxiswill be created.- Parameters:
axisIndicators- Axis indicators to set.
-
RadarCoordinate
Constructor. Axis indicators can be set later.- Parameters:
axis- Radar axis.
-
RadarCoordinate
Construct with the given set of axis indicators.- Parameters:
axis- Radar axis.axisIndicators- Axis indicators to set.
-
-
Method Details
-
addAxis
Description copied from class:CoordinateSystemAdd axes.- Overrides:
addAxisin classCoordinateSystem- Parameters:
axes- Axes to add.
-
setAxis
-
getAxis
-
setAxisIndicators
Set axis indicators.- Parameters:
axisIndicators- Axis indicators to set.
-
getAxisIndicators
Get the current axis indicators.- Returns:
- Axis indicators.
-
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 classCoordinateSystem- Throws:
ChartException- Raises exception if the component or part is not valid.
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Overrides:
encodeJSONin classAbstractPart- 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.
-
getStartingAngle
public int getStartingAngle()Get the starting angle.- Returns:
- Angle in degrees.
-
setStartingAngle
public void setStartingAngle(int startingAngle) Set the starting angle.- Parameters:
startingAngle- Angle in degrees.
-
getColor
-
setColor
-
setCircular
public void setCircular(boolean circular) Set the shape as circular.- Parameters:
circular- True/false.
-
isCircular
public final boolean isCircular()Is the shape circular?- Returns:
- True/false.
-