Package com.storedobject.chart
Class CoordinateSystem
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.VisiblePart
com.storedobject.chart.CoordinateSystem
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasData,HasPosition,VisibleProperty
- Direct Known Subclasses:
PolarCoordinate,RadarCoordinate,RectangularCoordinate
public abstract class CoordinateSystem
extends VisiblePart
implements Component, HasPosition, HasData
Abstract coordinate system. Most
Charts are plotted on a coordinate system except the charts
such as PieChart, NightingaleRoseChart etc. One or more compatible Charts can be plotted
on the same coordinate system.- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd charts to plot on this coordinate system.voidAdd axes.voidAdd parts of this component to the chart.voiddeclareData(Set<AbstractDataProvider<?>> dataSet) Declare the data set owned by thisComponentPartby adding it to theSetprovided.getAxis(int index) Return an axis of this coordinate system.final PositiongetPosition(boolean create) Get the position of this on the chart display area.voidRemove charts to be removed from this coordinate system.voidremoveAxis(Axis... axes) Remove axes.final voidsetPosition(Position position) Set the position of this.voidvalidate()This method is invoked bySOChartto check if the component or part is valid or not.Methods inherited from class com.storedobject.chart.VisiblePart
isVisible, setVisibleMethods inherited from class com.storedobject.chart.AbstractPart
encodeJSON, 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.ComponentProperty
encodeJSONMethods inherited from interface com.storedobject.chart.VisibleProperty
hide, show
-
Constructor Details
-
CoordinateSystem
public CoordinateSystem()
-
-
Method Details
-
add
Add charts to plot on this coordinate system.- Parameters:
charts- Charts to be added.
-
remove
Remove charts to be removed from this coordinate system.- Parameters:
charts- Charts to be removed.
-
addAxis
-
removeAxis
-
getAxis
Return an axis of this coordinate system.- Parameters:
index- Index of the axis.- Returns:
- Axis at the given index.
-
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 classVisiblePart- Throws:
ChartException- Raises exception if the component or part is not valid.
-
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. -
declareData
Description copied from interface:HasDataDeclare the data set owned by thisComponentPartby adding it to theSetprovided.- Specified by:
declareDatain interfaceHasData- Parameters:
dataSet- Set to which all the data owned by thisComponentPartneeds to be added.
-
getPosition
Description copied from interface:HasPositionGet the position of this on the chart display area. (Iftrueis passed as the parameter, a new position will be created if not already exists).- Specified by:
getPositionin interfaceHasPosition- Parameters:
create- Whether to create it or not.- Returns:
- Position.
-
setPosition
Description copied from interface:HasPositionSet the position of this.- Specified by:
setPositionin interfaceHasPosition- Parameters:
position- Position to set.
-