Class SankeyPlotOptions
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.plotOptions.SeriesPlotOptions
-
- org.zkoss.chart.plotOptions.SankeyPlotOptions
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
- Direct Known Subclasses:
DependencyWheelPlotOptions,OrganizationPlotOptions
public class SankeyPlotOptions extends SeriesPlotOptions
An option for sankey plot- Since:
- 7.2.1.0
- Author:
- rudyhuang
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description SankeyPlotOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetBorderColor()Returns the color of the border surrounding each slice.List<Color>getColors()Returns the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()is true.NumbergetCurveFactor()Higher numbers makes the links in a sankey diagram or dependency wheelrender more curved.SankeyDataLabelsgetDataLabels()Returns the first or single option of data labels.List<Level>getLevels()Set options on specific levels.StringgetLinkColorMode()Returns color mode for sankey links.NumbergetLinkOpacity()Returns opacity for the links between nodes in the sankey diagram.NumbergetMinLinkWidth()Returns the minimal width for a line of a sankey.StringgetNodeAlignment()Returns which side of the chart the nodes are to be aligned to.NumbergetNodeDistance()Returns the distance between nodes in a sankey diagram in the longitudinal direction.NumbergetNodePadding()Returns the padding between nodes in a sankey diagram or dependency wheel, in pixels.ObjectgetNodeWidth()Returns the pixel width of each node in a sankey diagram or dependency wheel, or the height in case the chart is inverted.booleanisCenterInCategory()When true, the columns will center in the category, ignoring null or missing points.protected DataLabelsnewDataLabels()Internal method for subclasses to provide specific type of data labels.voidsetBorderColor(String borderColor)Sets the color of the border surrounding each slice.voidsetBorderColor(Color borderColor)Sets the color of the border surrounding each slice.voidsetCenterInCategory(boolean centerInCategory)When true, the columns will center in the category, ignoring null or missing points.voidsetColors(String... colors)Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()is true.voidsetColors(List<Color> colors)Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()is true.voidsetColors(Color... colors)Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()is true.voidsetCurveFactor(Number curveFactor)Higher numbers makes the links in a sankey diagram or dependency wheelrender more curved.voidsetLevels(List<Level> levels)voidsetLevels(Level... levels)Set options on specific levels.voidsetLinkColorMode(String linkColorMode)Sets color mode for sankey links.voidsetLinkOpacity(Number linkOpacity)Sets opacity for the links between nodes in the sankey diagram.voidsetMinLinkWidth(Number minLinkWidth)Sets the minimal width for a line of a sankey.voidsetNodeAlignment(String nodeAlignment)Sets which side of the chart the nodes are to be aligned to.voidsetNodeDistance(Number nodeDistance)Sets the distance between nodes in a sankey diagram in the longitudinal direction.voidsetNodePadding(Number nodePadding)Sets the padding between nodes in a sankey diagram or dependency wheel, in pixels.voidsetNodeWidth(Number nodeWidth)Sets the pixel width of each node in a sankey diagram or dependency wheel, or the height in case the chart is inverted.voidsetNodeWidth(String nodeWidth)Sets the pixel width of each node in a sankey diagram or dependency wheel, or the height in case the chart is inverted.-
Methods inherited from class org.zkoss.chart.plotOptions.SeriesPlotOptions
addDataLabels, getAccessibility, getAnimation, getAnimationLimit, getBoostBlending, getBoostThreshold, getBorderRadius, getBorderWidth, getClassName, getColor, getColorAxis, getColorIndex, getColorKey, getConnectorWidth, getCropThreshold, getCursor, getCustom, getDashStyle, 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, isClip, isColorByPoint, isConnectEnds, isConnectNulls, isCrisp, isDataAsColumns, isEnableMouseTracking, isGetExtremesFromAll, isIncludeInDataExport, isRelativeXValue, isSelected, isShadow, isShowCheckbox, isShowInLegend, isSkipKeyboardNavigation, isSoftThreshold, isStacking, isStickyTracking, isVisible, isZoomEnabled, setAccessibility, setAllowPointSelect, setAnimation, setAnimation, setAnimationLimit, setBoostBlending, setBoostThreshold, setBorderRadius, setBorderRadius, setBorderWidth, setCenter, setCenter, setClassName, setClip, setColor, setColor, setColor, setColor, setColorAxis, setColorAxis, setColorAxis, setColorByPoint, setColorIndex, setColorKey, setConnectEnds, setConnectNulls, setConnectorWidth, setCrisp, setCropThreshold, 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, 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
-
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.- Since:
- 10.2.1.0
-
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.- Since:
- 10.2.1.0
-
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.- Since:
- 10.2.1.0
-
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.- Since:
- 10.2.1.0
-
isCenterInCategory
public boolean isCenterInCategory()
When true, the columns will center in the category, ignoring null or missing points. When false, space will be reserved for null or missing points.Default:
false.- Overrides:
isCenterInCategoryin classSeriesPlotOptions- Since:
- 10.2.1.0
-
setCenterInCategory
public void setCenterInCategory(boolean centerInCategory)
When true, the columns will center in the category, ignoring null or missing points. When false, space will be reserved for null or missing points.- Overrides:
setCenterInCategoryin classSeriesPlotOptions- Since:
- 10.2.1.0
-
getBorderColor
public Color getBorderColor()
Returns the color of the border surrounding each slice.Default: #FFFFFF
- Since:
- 10.2.1.0
-
setBorderColor
public void setBorderColor(Color borderColor)
Sets the color of the border surrounding each slice. Default: #FFFFFF- Since:
- 10.2.1.0
-
setBorderColor
public void setBorderColor(String borderColor)
Sets the color of the border surrounding each slice. Default: #FFFFFF- Since:
- 10.2.1.0
-
getCurveFactor
public Number getCurveFactor()
Higher numbers makes the links in a sankey diagram or dependency wheelrender more curved. A curveFactor of 0 makes the lines straight.Default: 0.33
-
setCurveFactor
public void setCurveFactor(Number curveFactor)
Higher numbers makes the links in a sankey diagram or dependency wheelrender more curved. A curveFactor of 0 makes the lines straight.
-
newDataLabels
protected DataLabels newDataLabels()
Description copied from class:SeriesPlotOptionsInternal method for subclasses to provide specific type of data labels.- Overrides:
newDataLabelsin classSeriesPlotOptions
-
getDataLabels
public SankeyDataLabels getDataLabels()
Description copied from class:SeriesPlotOptionsReturns the first or single option of data labels.- Overrides:
getDataLabelsin classSeriesPlotOptions
-
getLevels
public List<Level> getLevels()
Set options on specific levels. Takes precedence over series options, but not point options.Default: null
-
setLevels
public void setLevels(List<Level> levels)
- Parameters:
levels-- See Also:
getLevels()
-
setLevels
public void setLevels(Level... levels)
Set options on specific levels. Takes precedence over series options, but not node and link options.- Since:
- 10.2.1.0
-
getLinkColorMode
public String getLinkColorMode()
Returns color mode for sankey links. (Can be"from","gradient","to")Available options:
fromcolor of the sankey link will be the same as the 'from node'gradientcolor of the sankey link will be set to gradient between colors of 'from node' and 'to node'tocolor of the sankey link will be same as the 'to node'.
- Since:
- 11.2.0.0
-
setLinkColorMode
public void setLinkColorMode(String linkColorMode)
Sets color mode for sankey links. (Can be"from","gradient","to")Available options:
fromcolor of the sankey link will be the same as the 'from node'gradientcolor of the sankey link will be set to gradient between colors of 'from node' and 'to node'tocolor of the sankey link will be same as the 'to node'.
- Since:
- 11.2.0.0
-
getLinkOpacity
public Number getLinkOpacity()
Returns opacity for the links between nodes in the sankey diagram.Default: 0.5
-
setLinkOpacity
public void setLinkOpacity(Number linkOpacity)
Sets opacity for the links between nodes in the sankey diagram.
-
getMinLinkWidth
public Number getMinLinkWidth()
Returns the minimal width for a line of a sankey. By default, 0 values are not shown.Default: 0
-
setMinLinkWidth
public void setMinLinkWidth(Number minLinkWidth)
Sets the minimal width for a line of a sankey. By default, 0 values are not shown.
-
getNodeAlignment
public String getNodeAlignment()
Returns which side of the chart the nodes are to be aligned to. (Can be"top","center","bottom")When the chart is inverted,
topaligns to the left andbottomto the right.Default: null
- Since:
- 11.2.0.0
-
setNodeAlignment
public void setNodeAlignment(String nodeAlignment)
Sets which side of the chart the nodes are to be aligned to. (Can be"top","center","bottom")When the chart is inverted,
topaligns to the left andbottomto the right.- Since:
- 11.2.0.0
-
getNodeDistance
public Number getNodeDistance()
Returns the distance between nodes in a sankey diagram in the longitudinal direction.Default: 30
- Since:
- 11.4.7.0
-
setNodeDistance
public void setNodeDistance(Number nodeDistance)
Sets the distance between nodes in a sankey diagram in the longitudinal direction.
The longitudinal direction means the direction that the chart flows - in a horizontal chart the distance is horizontal, in an inverted chart (vertical), the distance is vertical. If a number is given, it denotes pixels. If a percentage string is given, the distance is a percentage of the rendered node width. A nodeDistance of 100% will render equal widths for the nodes and the gaps between them.
This option applies only when the nodeWidth option is auto, making the node width respond to the number of columns.
Default: 30
- Since:
- 11.4.7.0
-
getNodePadding
public Number getNodePadding()
Returns the padding between nodes in a sankey diagram or dependency wheel, in pixels.Default: 10
-
setNodePadding
public void setNodePadding(Number nodePadding)
Sets the padding between nodes in a sankey diagram or dependency wheel, in pixels.
-
getNodeWidth
public Object getNodeWidth()
Returns the pixel width of each node in a sankey diagram or dependency wheel, or the height in case the chart is inverted.Default: 20
- Since:
- 10.2.1.0
-
setNodeWidth
public void setNodeWidth(String nodeWidth)
Sets the pixel width of each node in a sankey diagram or dependency wheel, or the height in case the chart is inverted. (Requires arcdiagram or sankey)- Since:
- 10.2.1.0
-
setNodeWidth
public void setNodeWidth(Number nodeWidth)
Sets the pixel width of each node in a sankey diagram or dependency wheel, or the height in case the chart is inverted.- Since:
- 10.2.1.0
-
-