Package com.storedobject.chart
Class BubbleChart
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.Chart
com.storedobject.chart.XYDataChart
com.storedobject.chart.BubbleChart
- All Implemented Interfaces:
Component
,ComponentPart
,ComponentProperty
,HasAnimation
,HasData
,HasEmphasis
Bubble chart. A bubble chart is plotted on a
RectangularCoordinate
system and at each (x, y) point, there
can be an associated "value". A "bubble" is drawn for each such data point, and the size of the "bubble" is proportional
to the value. However, the size of the "bubble" can be controlled by setting a "multiplication factor" via
setBubbleSize(double)
.
Internally, the "bubble" is an instance of the PointSymbol
but, it may not be directly customized unless
necessary.
A VisualMap
is automatically created unless you set it explicitly to null
via
XYDataChart.setVisualMap(VisualMap)
.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.chart.Chart
Chart.Emphasis, Chart.Label, Chart.LabelPosition
-
Constructor Summary
ConstructorsConstructorDescriptionBubbleChart
(AbstractDataProvider<?> xData, AbstractDataProvider<?> yData) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Encode the JSON string with the properties of this.getPointSymbol
(boolean create) Get thePointSymbol
that represents the "bubble".void
setBubbleSize
(double multiplicationFactor) Set the bubble size.void
setPointSymbol
(PointSymbol pointSymbol) Set a differentPointSymbol
that represents the "bubble".void
setValuePrefix
(String valuePrefix) Set a prefix text to the value when the tooltip is displayed for the bubble.void
setValueSuffix
(String valueSuffix) Set a suffix text to the value when the tooltip is displayed for the bubble.Methods inherited from class com.storedobject.chart.XYDataChart
addData, addData, addData, addData, addParts, dataToEmbed, dataValueIndex, getVisualMap, setVisualMap, validate
Methods inherited from class com.storedobject.chart.Chart
dataValue, declareData, 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, typeValue
Methods inherited from class com.storedobject.chart.AbstractPart
equals, getId, getLabelTag, getSerial, getZ, hashCode, hasId, setSerial, setZ
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.storedobject.chart.ComponentPart
className, getId, getRenderingIndex, getSerial, setRenderingIndex, setSerial
-
Constructor Details
-
BubbleChart
Constructor.- Parameters:
xData
- Data for X axis.yData
- Data for Y axis.
-
-
Method Details
-
encodeJSON
Description copied from interface:ComponentProperty
Encode the JSON string with the properties of this.- Specified by:
encodeJSON
in interfaceComponentProperty
- Overrides:
encodeJSON
in classChart
- Parameters:
sb
- Encoded JSON string to be appended to this.
-
setBubbleSize
public void setBubbleSize(double multiplicationFactor) Set the bubble size.- Parameters:
multiplicationFactor
- This factor will multiply value at each data point to determine the size of the bubble.
-
setValuePrefix
Set a prefix text to the value when the tooltip is displayed for the bubble.- Parameters:
valuePrefix
- Prefix text.
-
setValueSuffix
Set a suffix text to the value when the tooltip is displayed for the bubble.- Parameters:
valueSuffix
- Suffix text.
-
getPointSymbol
Get thePointSymbol
that represents the "bubble".- Parameters:
create
- Whether to create it if not exists or not.- Returns:
- The instance of the current
PointSymbol
or newly created instance if requested.
-
setPointSymbol
Set a differentPointSymbol
that represents the "bubble". If set via this method, "bubble size" will no more be controlled automatically unless set it again via thesetBubbleSize(double)
method.- Parameters:
pointSymbol
- An instance of thePointSymbol
.
-