Package org.zkoss.chart.plotOptions
Class PictorialPlotOptions
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.plotOptions.SeriesPlotOptions
-
- org.zkoss.chart.plotOptions.PictorialPlotOptions
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class PictorialPlotOptions extends SeriesPlotOptions
An options for pictorial plot.All the options in this class support
DynamicalAttribute
.- Since:
- 11.2.0.0
- Author:
- Jamson Chan
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description PictorialPlotOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBorderColor()
Returns the color of the border surrounding each column or bar.Number
getBorderWidth()
Returns the width of the border surrounding each column or bar.List<Color>
getColors()
Returns the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.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.Color
getEdgeColor()
3D columns only.Number
getEdgeWidth()
3D columns only.Number
getGroupZPadding()
Returns the spacing between columns on the Z Axis in a 3D chart.Number
getMaxPointWidth()
Returns the maximum allowed pixel width for a column, translated to the height of a bar in a bar chart.Number
getMinPointLength()
Returns the minimal height for a column or width for a bar.Path
getPaths()
Returns the Path options, if any, Otherwise, create a new one.Path
getPaths(int index)
Returns the Path options from given index, if any, Otherwise, create a new one.int
getPathsSize()
Returns the size of paths.Number
getPointPadding()
Returns padding between each column or bar, in x axis units.Number
getPointRange()
Returns the X axis range that each point is valid for.Number
getPointWidth()
Returns a pixel value specifying a fixed width for each column or bar.boolean
isGrouping()
Returns whether to group non-stacked columns or to let them render independent of each other.boolean
isShowInLegend()
Returns whether to display this particular series or series type in the legend.boolean
isStickyTracking()
Returns sticky tracking of mouse events.void
setBorderColor(String borderColor)
Sets the color of the border surrounding each column or bar.void
setBorderWidth(Number borderWidth)
Sets the width of the border surrounding each column or bar.void
setColors(String... colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.void
setColors(List<Color> colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.void
setColors(Color... colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.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.void
setEdgeColor(String color)
3D columns only.void
setEdgeColor(Color color)
3D columns only.void
setEdgeWidth(Number edgeWidth)
3D columns only.void
setGrouping(boolean grouping)
Sets whether to group non-stacked columns or to let them render independent of each other.void
setGroupZPadding(Number groupZPadding)
Sets the spacing between columns on the Z Axis in a 3D chart.void
setMaxPointWidth(Number maxPointWidth)
Sets the maximum allowed pixel width for a column, translated to the height of a bar in a bar chart.void
setMinPointLength(Number minPointLength)
Sets the minimal height for a column or width for a bar.void
setPointPadding(Number pointPadding)
Sets padding between each column or bar, in x axis units.void
setPointRange(Number pointRange)
Sets the X axis range that each point is valid for.void
setPointWidth(int pointWidth)
Sets a pixel value specifying a fixed width for each column or bar.void
setShowInLegend(boolean showInLegend)
Sets whether to display this particular series or series type in the legend.void
setStickyTracking(boolean stickyTracking)
Sets sticky tracking of mouse events.-
Methods inherited from class org.zkoss.chart.plotOptions.SeriesPlotOptions
addDataLabels, getAccessibility, getAnimation, getAnimationLimit, getBoostBlending, getBoostThreshold, getBorderRadius, getClassName, getColor, getColorAxis, getColorIndex, getColorKey, getConnectorWidth, getCursor, getCustom, getDashStyle, getDataLabels, getDataLabelsList, getDataSorting, getDepth, getDescription, getDragDrop, getFindNearestPointBy, getGroupPadding, getId, getIndex, getKeys, getLabel, getLegendSymbol, getLinecap, getLineWidth, getLinkedTo, getMarker, getName, getNeckHeight, getNeckWidth, getNegativeColor, getOnPoint, getOpacity, getPointDescriptionFormatter, getPointInterval, getPointIntervalUnit, getPointPlacement, getPointStart, getStacking, getStates, getStep, getThreshold, getTooltip, getTurboThreshold, getZoneAxis, getZones, isAllowPointSelect, isAnimation, isCenterInCategory, isClip, isColorByPoint, isConnectEnds, isConnectNulls, isCrisp, isDataAsColumns, isEnableMouseTracking, isGetExtremesFromAll, isIncludeInDataExport, isRelativeXValue, isSelected, isShadow, isShowCheckbox, isSkipKeyboardNavigation, isSoftThreshold, isStacking, isVisible, newDataLabels, setAccessibility, setAllowPointSelect, setAnimation, setAnimation, setAnimationLimit, setBoostBlending, setBoostThreshold, setBorderRadius, setBorderRadius, setCenter, setCenter, setCenterInCategory, setClassName, setClip, setColor, setColor, setColor, setColor, setColorAxis, setColorAxis, setColorAxis, setColorByPoint, setColorIndex, setColorKey, setConnectEnds, setConnectNulls, setConnectorWidth, setCrisp, setCursor, setCustom, setDashStyle, setDataAsColumns, setDataLabels, setDataLabels, setDataSorting, setDepth, setDescription, setDragDrop, setEnableMouseTracking, setFindNearestPointBy, setGetExtremesFromAll, setGroupPadding, setId, setIncludeInDataExport, setIndex, setKeys, setLabel, setLegendSymbol, setLinecap, setLineWidth, setLinkedTo, setMarker, setName, setNeckHeight, setNeckWidth, setNegativeColor, setNegativeColor, setNegativeColor, setNegativeColor, setOnPoint, setOpacity, setPointDescriptionFormatter, setPointInterval, setPointIntervalUnit, setPointPlacement, setPointPlacement, setPointStart, setRelativeXValue, setSelected, setShadow, setShowCheckbox, setSkipKeyboardNavigation, setSoftThreshold, setStacking, setStacking, setStates, setStep, setThreshold, setTooltip, setTurboThreshold, setVisible, setWidth, setZoneAxis, setZones, setZones
-
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
-
getBorderColor
public String getBorderColor()
Returns the color of the border surrounding each column or bar.Default:
#ffffff
-
setBorderColor
public void setBorderColor(String borderColor)
Sets the color of the border surrounding each column or bar.
-
getBorderWidth
public Number getBorderWidth()
Returns the width of the border surrounding each column or bar.Default:
0
when the columns are so dense that a border would cover the next column.- Overrides:
getBorderWidth
in classSeriesPlotOptions
-
setBorderWidth
public void setBorderWidth(Number borderWidth)
Sets the width of the border surrounding each column or bar.- Overrides:
setBorderWidth
in classSeriesPlotOptions
-
setColors
public void setColors(List<Color> colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.
-
setColors
public void setColors(String... colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.
-
setColors
public void setColors(Color... colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.
-
getColors
public List<Color> getColors()
Returns the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.
-
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: 50
- Overrides:
getCropThreshold
in classSeriesPlotOptions
-
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:
setCropThreshold
in classSeriesPlotOptions
-
getEdgeColor
public Color getEdgeColor()
3D columns only. The color of the edges. Similar toborderColor
, except it defaults to the same color as the column.Default:
null
-
setEdgeColor
public void setEdgeColor(Color color)
3D columns only. The color of the edges. Similar toborderColor
, except it defaults to the same color as the column.Default:
null
-
setEdgeColor
public void setEdgeColor(String color)
3D columns only. The color of the edges. Similar toborderColor
, except it defaults to the same color as the column.Default:
null
-
getEdgeWidth
public Number getEdgeWidth()
3D columns only. Returns the width of the colored edges.Default: 1
-
setEdgeWidth
public void setEdgeWidth(Number edgeWidth)
3D columns only. Sets the width of the colored edges.
-
isGrouping
public boolean isGrouping()
Returns whether to group non-stacked columns or to let them render independent of each other. Non-grouped columns will be laid out individually and overlap each other.Default:
true
-
setGrouping
public void setGrouping(boolean grouping)
Sets whether to group non-stacked columns or to let them render independent of each other. Non-grouped columns will be laid out individually and overlap each other.Default:
true
-
getGroupZPadding
public Number getGroupZPadding()
Returns the spacing between columns on the Z Axis in a 3D chart.Default: 1
-
setGroupZPadding
public void setGroupZPadding(Number groupZPadding)
Sets the spacing between columns on the Z Axis in a 3D chart.
-
getMaxPointWidth
public Number getMaxPointWidth()
Returns the maximum allowed pixel width for a column, translated to the height of a bar in a bar chart. This prevents the columns from becoming too wide when there is a small number of points in the chart.Default: null
-
setMaxPointWidth
public void setMaxPointWidth(Number maxPointWidth)
Sets the maximum allowed pixel width for a column, translated to the height of a bar in a bar chart. This prevents the columns from becoming too wide when there is a small number of points in the chart.
-
getMinPointLength
public Number getMinPointLength()
Returns the minimal height for a column or width for a bar. By default, 0 values are not shown. To visualize a 0 (or close to zero) point, set the minimal point length to a pixel value like 3. In stacked column charts, minPointLength might not be respected for tightly packed values.Default: 0
-
setMinPointLength
public void setMinPointLength(Number minPointLength)
Sets the minimal height for a column or width for a bar. By default, 0 values are not shown. To visualize a 0 (or close to zero) point, set the minimal point length to a pixel value like 3. In stacked column charts, minPointLength might not be respected for tightly packed values.
-
getPathsSize
public int getPathsSize()
Returns the size of paths.
-
getPaths
public Path getPaths()
Returns the Path options, if any, Otherwise, create a new one.Returns the first node (index 0) by default.
-
getPaths
public Path getPaths(int index)
Returns the Path options from given index, if any, Otherwise, create a new one.The paths include options describing the point image.
-
getPointPadding
public Number getPointPadding()
Returns padding between each column or bar, in x axis units.Default: 0
-
setPointPadding
public void setPointPadding(Number pointPadding)
Sets padding between each column or bar, in x axis units. 'pointPadding padding between each column or bar, in x axis units.
-
getPointRange
public Number getPointRange()
Returns the X axis range that each point is valid for. This determines the width of the column. On a categorized axis, the range will be 1 by default (one category unit). On linear and datetime axes, the range will be computed as the distance between the two closest data points.Default: null
-
setPointRange
public void setPointRange(Number pointRange)
Sets the X axis range that each point is valid for. This determines the width of the column. On a categorized axis, the range will be 1 by default (one category unit). On linear and datetime axes, the range will be computed as the distance between the two closest data points.
-
getPointWidth
public Number getPointWidth()
Returns a pixel value specifying a fixed width for each column or bar. Whennull
, the width is calculated from thepointPadding
andgroupPadding
.Default: null
-
setPointWidth
public void setPointWidth(int pointWidth)
Sets a pixel value specifying a fixed width for each column or bar. Whennull
, the width is calculated from thepointPadding
andgroupPadding
.
-
isShowInLegend
public boolean isShowInLegend()
Returns whether to display this particular series or series type in the legend. Pies are not shown in the legend by default.- Overrides:
isShowInLegend
in classSeriesPlotOptions
-
setShowInLegend
public void setShowInLegend(boolean showInLegend)
Sets whether to display this particular series or series type in the legend. Pies are not shown in the legend by default.- Overrides:
setShowInLegend
in classSeriesPlotOptions
-
isStickyTracking
public boolean isStickyTracking()
Returns sticky tracking of mouse events. When true, themouseOut
event on a series isn't triggered until the mouse moves over another series, or out of the plot area. When false, themouseOut
event on a series is triggered when the mouse leaves the area around the series' graph or markers. This also implies the tooltip. WhenstickyTracking
is false andTooltip.isShared()
is false, the tooltip will be hidden when moving the mouse between series. Defaults to true for line and area type series, but to false for columns, pies etc.Note: The boost module will force this option because of technical limitations.
Default:
false
- Overrides:
isStickyTracking
in classSeriesPlotOptions
-
setStickyTracking
public void setStickyTracking(boolean stickyTracking)
Sets sticky tracking of mouse events. When true, themouseOut
event on a series isn't triggered until the mouse moves over another series, or out of the plot area. When false, themouseOut
event on a series is triggered when the mouse leaves the area around the series' graph or markers. This also implies the tooltip. WhenstickyTracking
is false andTooltip.isShared()
is false, the tooltip will be hidden when moving the mouse between series. Defaults to true for line and area type series, but to false for columns, pies etc.- Overrides:
setStickyTracking
in classSeriesPlotOptions
-
-