Package com.storedobject.chart
Class SankeyChart
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.Chart
com.storedobject.chart.SelfPositioningSpecialChart
com.storedobject.chart.SankeyChart
- All Implemented Interfaces:
Component,ComponentPart,ComponentProperty,HasAnimation,HasData,HasEmphasis,HasPosition
Sankey chart.
- Author:
- Syam
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.chart.Chart
Chart.Emphasis, Chart.Label, Chart.LabelPosition -
Constructor Summary
ConstructorsConstructorDescriptionCreate a tree chart of the set of provided data. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractDataProvider<?> Get the data to embed.voidEncode the JSON string with the properties of this.final Chart.LabelgetEdgeLabel(boolean create) Get the label for the edges.final LineStylegetLineStyle(boolean create) Get line style.final AlignmentgetNodeAlignment(boolean create) Get the current node alignment.Get the Sankey data associated with this chart.final voidsetData(AbstractDataProvider<?>... data) Set data for the chart.final voidsetEdgeLabel(Chart.Label edgeLabel) Set the label for the edges.voidsetHeight(int height) Set height.final voidsetLineStyle(LineStyle lineStyle) Set the line style.final voidsetNodeAlignment(Alignment nodeAlignment) Set node alignment.final voidsetNodeGap(int nodeGap) Set node gap.final voidsetNodeWidth(int nodeWidth) Set node width.voidSet the Sankey data associated with this chart.final voidSet the orientation as vertical.final voidsetWidth(int width) Set width.Methods inherited from class com.storedobject.chart.SelfPositioningSpecialChart
getPosition, setPositionMethods inherited from class com.storedobject.chart.Chart
addParts, dataValue, dataValueIndex, declareData, getAnimation, getCoordinateSystem, getData, getEmphasis, getItemStyle, getLabel, getLabelName, getMarkArea, getMax, getMin, getName, getTooltip, getType, mainData, plotOn, plotOn, setAnimation, setColors, setCustomRenderer, setEmphasis, setItemStyle, setLabel, setMarkArea, setName, setTooltip, setType, typeValue, validateMethods 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
-
SankeyChart
Create a tree chart of the set of provided data.- Parameters:
data- Data to be used.
-
-
Method Details
-
setData
Description copied from class:ChartSet data for the chart. -
getSankeyData
Get the Sankey data associated with this chart.- Returns:
- Sankey data.
-
setSankeyData
Set the Sankey data associated with this chart.- Parameters:
data- Sankey data.
-
dataToEmbed
Description copied from class:ChartGet the data to embed. This is useful only for those special charts that embed data in the chart itself rather than pointing to the dataset. Example:TreeChart,GaugeChartetc. If null is returned from this method, no data will be embedded.- Overrides:
dataToEmbedin classChart- Returns:
- Data to embed.
-
setVertical
public final void setVertical()Set the orientation as vertical. -
setHeight
public void setHeight(int height) Set height.- Parameters:
height- Height.
-
setWidth
public final void setWidth(int width) Set width.- Parameters:
width- Width.
-
setNodeWidth
public final void setNodeWidth(int nodeWidth) Set node width.- Parameters:
nodeWidth- The node width of rectangle in Sankey diagram.
-
setNodeGap
public final void setNodeGap(int nodeGap) Set node gap.- Parameters:
nodeGap- The gap between any two rectangles in each column of the Sankey diagram.
-
setNodeAlignment
Set node alignment.- Parameters:
nodeAlignment- Controls the horizontal alignment of nodes in the diagram. When orientation is vertical, it controls vertical alignment.
-
getNodeAlignment
Get the current node alignment. Iftrueis passed as the parameter, a new alignment will be created if it doesn't exist.- Parameters:
create- True/false.- Returns:
- Alignment.
-
setEdgeLabel
Set the label for the edges.- Parameters:
edgeLabel- Edge label to set.
-
getEdgeLabel
Get the label for the edges.- Parameters:
create- Passtrueif it needs to be created if not exists.- Returns:
- Label.
-
setLineStyle
Set the line style.- Parameters:
lineStyle- Line style.
-
getLineStyle
Get line style.- Parameters:
create- Passtrueif it needs to be created if not exists.- Returns:
- Line style.
-
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.
-