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 TypeMethodDescriptionvoidEncode the JSON string with the properties of this.getPointSymbol(boolean create) Get thePointSymbolthat represents the "bubble".voidsetBubbleSize(double multiplicationFactor) Set the bubble size.voidsetPointSymbol(PointSymbol pointSymbol) Set a differentPointSymbolthat represents the "bubble".voidsetValuePrefix(String valuePrefix) Set a prefix text to the value when the tooltip is displayed for the bubble.voidsetValueSuffix(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, validateMethods 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, 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
-
BubbleChart
Constructor.- Parameters:
xData- Data for X axis.yData- Data for Y axis.
-
-
Method Details
-
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.
-
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 thePointSymbolthat represents the "bubble".- Parameters:
create- Whether to create it if not exists or not.- Returns:
- The instance of the current
PointSymbolor newly created instance if requested.
-
setPointSymbol
Set a differentPointSymbolthat 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.
-