Package org.zkoss.chart.plotOptions
Class BubblePlotOptions
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.plotOptions.SeriesPlotOptions
-
- org.zkoss.chart.plotOptions.ColumnPlotOptions
-
- org.zkoss.chart.plotOptions.BubblePlotOptions
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
- Direct Known Subclasses:
PackedBubblePlotOptions
public class BubblePlotOptions extends ColumnPlotOptions
An option for bubble plot.All the options in this class support
DynamicalAttribute.- Author:
- RaymondChao, jumperchen
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description BubblePlotOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NumbergetCropThreshold()Returns when the series contains less points than the crop threshold, all points are drawn, even if the points fall outside the visible plot area at the current zoom.JittergetJitter()Apply a jitter effect for the rendered markers.StringgetMaxSize()Returns maximum bubble size.StringgetMinSize()Returns minimum bubble size.ColorgetNegativeColor()Returns when a point's Z value is below thesetZThreshold(Number)setting, this color is used.StringgetSizeBy()Returns whether the bubble's value should be represented by the area or the width of the bubble.NumbergetZMax()Returns the maximum for the Z value range.NumbergetZMin()Returns the minimum for the Z value range.NumbergetZThreshold()Returns whensetDisplayNegative(boolean)isfalse, bubbles with lower Z values are skipped.booleanisDisplayNegative()Returns whether to display negative sized bubbles.booleanisSizeByAbsoluteValue()When this is true, the absolute value of z determines the size of the bubble.voidsetCropThreshold(Number cropThreshold)Sets when the series contains less points than the crop threshold, all points are drawn, even if the points fall outside the visible plot area at the current zoom.voidsetDisplayNegative(boolean displayNegative)Sets whether to display negative sized bubbles.voidsetJitter(Jitter jitter)Apply a jitter effect for the rendered markers.voidsetMaxSize(String maxSize)Sets maximum bubble size.voidsetMinSize(String minSize)Sets minimum bubble size.voidsetNegativeColor(String color)Sets when a point's Z value is below thesetZThreshold(Number)setting, this color is used.voidsetNegativeColor(Color color)Sets when a point's Z value is below thesetZThreshold(Number)setting, this color is used.voidsetNegativeColor(LinearGradient color)Sets when a point's Z value is below thesetZThreshold(Number)setting, this color is used.voidsetNegativeColor(RadialGradient color)Sets when a point's Z value is below thesetZThreshold(Number)setting, this color is used.voidsetSizeBy(String sizeBy)Sets whether the bubble's value should be represented by the area or the width of the bubble.voidsetSizeByAbsoluteValue(boolean sizeByAbsoluteValue)When this is true, the absolute value of z determines the size of the bubble.voidsetZMax(Number zMax)Sets the maximum for the Z value range.voidsetZMin(Number zMin)Sets the minimum for the Z value range.voidsetZThreshold(Number zThreshold)Sets whensetDisplayNegative(boolean)isfalse, bubbles with lower Z values are skipped.-
Methods inherited from class org.zkoss.chart.plotOptions.ColumnPlotOptions
getBorderColor, getBorderRadius, getBorderWidth, getColors, getEdgeColor, getEdgeWidth, getGroupPadding, getGroupZPadding, getMaxPointWidth, getMinPointLength, getPointPadding, getPointRange, getPointWidth, isCenterInCategory, isCrisp, isGrouping, setBorderColor, setBorderColor, setBorderColor, setBorderColor, setBorderWidth, setCenterInCategory, setColors, setColors, setCrisp, setEdgeColor, setEdgeColor, setEdgeWidth, setGrouping, setGroupPadding, setGroupZPadding, setMaxPointWidth, setMinPointLength, setPointPadding, setPointRange, setPointWidth
-
Methods inherited from class org.zkoss.chart.plotOptions.SeriesPlotOptions
addDataLabels, getAccessibility, getAnimation, getAnimationLimit, getBoostBlending, getBoostThreshold, getClassName, getColor, getColorAxis, getColorIndex, getColorKey, getConnectorWidth, getCursor, getCustom, getDashStyle, getDataLabels, getDataLabelsList, getDataSorting, getDepth, getDescription, getDragDrop, getFindNearestPointBy, getId, getIndex, getKeys, getLabel, getLegendSymbol, getLinecap, getLineWidth, getLinkedTo, getMarker, getName, getNeckHeight, getNeckWidth, getOnPoint, getOpacity, getPointDescriptionFormatter, getPointInterval, getPointIntervalUnit, getPointPlacement, getPointStart, getStacking, getStates, getStep, getThreshold, getTooltip, getTurboThreshold, getZoneAxis, getZones, isAllowPointSelect, isAnimation, isClip, isColorByPoint, isConnectEnds, isConnectNulls, isDataAsColumns, isEnableMouseTracking, isGetExtremesFromAll, isIncludeInDataExport, isRelativeXValue, isSelected, isShadow, isShowCheckbox, isShowInLegend, isSkipKeyboardNavigation, isSoftThreshold, isStacking, isStickyTracking, isVisible, isZoomEnabled, newDataLabels, setAccessibility, setAllowPointSelect, setAnimation, setAnimation, setAnimationLimit, setBoostBlending, setBoostThreshold, setBorderRadius, setBorderRadius, setCenter, setCenter, setClassName, setClip, setColor, setColor, setColor, setColor, setColorAxis, setColorAxis, setColorAxis, setColorByPoint, setColorIndex, setColorKey, setConnectEnds, setConnectNulls, setConnectorWidth, setCursor, setCustom, setDashStyle, setDataAsColumns, setDataLabels, setDataLabels, setDataSorting, setDepth, setDescription, setDragDrop, setEnableMouseTracking, setFindNearestPointBy, setGetExtremesFromAll, setId, setIncludeInDataExport, setIndex, setKeys, setLabel, setLegendSymbol, setLinecap, setLineWidth, setLinkedTo, setMarker, setName, setNeckHeight, setNeckWidth, setOnPoint, setOpacity, setPointDescriptionFormatter, setPointInterval, setPointIntervalUnit, setPointPlacement, setPointPlacement, setPointStart, setPointStart, setRelativeXValue, setSelected, setShadow, setShowCheckbox, setShowInLegend, setSkipKeyboardNavigation, setSoftThreshold, setStacking, setStacking, setStates, setStep, setStickyTracking, setThreshold, setTooltip, setTurboThreshold, setVisible, setWidth, setZoneAxis, setZones, setZones, setZoomEnabled
-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toJSONString, toString
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.zkoss.chart.OptionDataListener
onChange
-
-
-
-
Method Detail
-
getCropThreshold
public Number getCropThreshold()
Returns when the series contains less points than the crop threshold, all points are drawn, even if the points fall outside the visible plot area at the current zoom. The advantage of drawing all points (including markers and columns), is that animation is performed on updates. On the other hand, when the series contains more points than the crop threshold, the series data is cropped to only contain points that fall within the plot area. The advantage of cropping away invisible points is to increase performance on large series.Default: 300
- Overrides:
getCropThresholdin classColumnPlotOptions
-
setCropThreshold
public void setCropThreshold(Number cropThreshold)
Sets when the series contains less points than the crop threshold, all points are drawn, even if the points fall outside the visible plot area at the current zoom. The advantage of drawing all points (including markers and columns), is that animation is performed on updates. On the other hand, when the series contains more points than the crop threshold, the series data is cropped to only contain points that fall within the plot area. The advantage of cropping away invisible points is to increase performance on large series.- Overrides:
setCropThresholdin classColumnPlotOptions
-
isDisplayNegative
public boolean isDisplayNegative()
Returns whether to display negative sized bubbles. The threshold is given by thesetZThreshold(Number)option, and negative bubbles can be visualized by settingsetNegativeColor(String)Default: true
-
setDisplayNegative
public void setDisplayNegative(boolean displayNegative)
Sets whether to display negative sized bubbles. The threshold is given by thesetZThreshold(Number)option, and negative bubbles can be visualized by settingsetNegativeColor(String)Default: true
-
getJitter
public Jitter getJitter()
Apply a jitter effect for the rendered markers. When plotting discrete values, a little random noise may help telling the points apart. The jitter setting applies a random displacement of up to n axis units in either direction. So for example on a horizontal X axis, setting the jitter.x to 0.24 will render the point in a random position between 0.24 units to the left and 0.24 units to the right of the true axis position. On a category axis, setting it to 0.5 will fill up the bin and make the data appear continuous. When rendered on top of a box plot or a column series, a jitter value of 0.24 will correspond to the underlying series' default groupPadding and pointPadding settings.- Since:
- 10.2.1.0
-
setJitter
public void setJitter(Jitter jitter)
Apply a jitter effect for the rendered markers. When plotting discrete values, a little random noise may help telling the points apart. The jitter setting applies a random displacement of up to n axis units in either direction. So for example on a horizontal X axis, setting the jitter.x to 0.24 will render the point in a random position between 0.24 units to the left and 0.24 units to the right of the true axis position. On a category axis, setting it to 0.5 will fill up the bin and make the data appear continuous. When rendered on top of a box plot or a column series, a jitter value of 0.24 will correspond to the underlying series' default groupPadding and pointPadding settings.- Since:
- 10.2.1.0
-
getMaxSize
public String getMaxSize()
Returns maximum bubble size. Bubbles will automatically size between theminSizeandmaxSizeto reflect thezvalue of each bubble. Can be either pixels (when no unit is given), or a percentage of the smallest one of the plot width and height.Default: 20%
-
setMaxSize
public void setMaxSize(String maxSize)
Sets maximum bubble size. Bubbles will automatically size between theminSizeandmaxSizeto reflect thezvalue of each bubble. Can be either pixels (when no unit is given), or a percentage of the smallest one of the plot width and height.
-
getMinSize
public String getMinSize()
Returns minimum bubble size. Bubbles will automatically size between theminSizeandmaxSizeto reflect thezvalue of each bubble. Can be either pixels (when no unit is given), or a percentage of the smallest one of the plot width and height.Default: 8
-
setMinSize
public void setMinSize(String minSize)
Sets minimum bubble size. Bubbles will automatically size between theminSizeandmaxSizeto reflect thezvalue of each bubble. Can be either pixels (when no unit is given), or a percentage of the smallest one of the plot width and height.
-
getNegativeColor
public Color getNegativeColor()
Returns when a point's Z value is below thesetZThreshold(Number)setting, this color is used.Default: null
- Overrides:
getNegativeColorin classSeriesPlotOptions
-
setNegativeColor
public void setNegativeColor(Color color)
Sets when a point's Z value is below thesetZThreshold(Number)setting, this color is used.- Overrides:
setNegativeColorin classSeriesPlotOptions
-
setNegativeColor
public void setNegativeColor(String color)
Sets when a point's Z value is below thesetZThreshold(Number)setting, this color is used.- Overrides:
setNegativeColorin classSeriesPlotOptions
-
setNegativeColor
public void setNegativeColor(LinearGradient color)
Sets when a point's Z value is below thesetZThreshold(Number)setting, this color is used.- Overrides:
setNegativeColorin classSeriesPlotOptions
-
setNegativeColor
public void setNegativeColor(RadialGradient color)
Sets when a point's Z value is below thesetZThreshold(Number)setting, this color is used.- Overrides:
setNegativeColorin classSeriesPlotOptions
-
getSizeBy
public String getSizeBy()
Returns whether the bubble's value should be represented by the area or the width of the bubble.The default,
area, corresponds best to the human perception of the size of each bubble.
-
setSizeBy
public void setSizeBy(String sizeBy)
Sets whether the bubble's value should be represented by the area or the width of the bubble. The default,area, corresponds best to the human perception of the size of each bubble.
-
isSizeByAbsoluteValue
public boolean isSizeByAbsoluteValue()
When this is true, the absolute value of z determines the size of the bubble. This means that with the default zThreshold of 0, a bubble of value -1 will have the same size as a bubble of value 1, while a bubble of value 0 will have a smaller size according to minSize.Defaults to
false.- Since:
- 10.2.1.0
-
setSizeByAbsoluteValue
public void setSizeByAbsoluteValue(boolean sizeByAbsoluteValue)
When this is true, the absolute value of z determines the size of the bubble. This means that with the default zThreshold of 0, a bubble of value -1 will have the same size as a bubble of value 1, while a bubble of value 0 will have a smaller size according to minSize.Defaults to
false.- Since:
- 10.2.1.0
-
getZMax
public Number getZMax()
Returns the maximum for the Z value range. Defaults to the highest Z value in the data.Default: null
-
setZMax
public void setZMax(Number zMax)
Sets the maximum for the Z value range.
-
getZMin
public Number getZMin()
Returns the minimum for the Z value range. Defaults to the lowest Z value in the data.Default: null
-
setZMin
public void setZMin(Number zMin)
Sets the minimum for the Z value range.
-
getZThreshold
public Number getZThreshold()
Returns whensetDisplayNegative(boolean)isfalse, bubbles with lower Z values are skipped. WhendisplayNegativeistrueand asetNegativeColor(String)is given, points with lower Z is colored.Default: 0
-
setZThreshold
public void setZThreshold(Number zThreshold)
Sets whensetDisplayNegative(boolean)isfalse, bubbles with lower Z values are skipped. WhendisplayNegativeistrueand asetNegativeColor(String)is given, points with lower Z is colored.
-
-