Package com.oorian.echarts.options
Class EChartsSankeySeries
java.lang.Object
com.oorian.echarts.options.EChartsSeries
com.oorian.echarts.options.EChartsSankeySeries
- All Implemented Interfaces:
com.oorian.json.Jsonable
Represents a Sankey diagram series configuration for ECharts.
Extends EChartsSeries to provide Sankey-specific options for displaying flow relationships.
Sankey diagrams are useful for displaying:
- Energy flow diagrams
- Budget allocation flows
- User journey/funnel flows
- Material flow analysis
- Author:
- Oorian
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class representing a Sankey link.static classInner class representing a Sankey node. -
Field Summary
Fields inherited from class com.oorian.echarts.options.EChartsSeries
data, name, type -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new EChartsSankeySeries with type set to "sankey". -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a link between two nodes in the Sankey diagram.voidAdds a node to the Sankey diagram.voidAdds a node with a specific value to the Sankey diagram.protected voidaddSpecificToJson(com.oorian.json.JsonObject obj) Adds series-specific properties to a JSON object.getLabel()getLeft()getLinks()getNodes()getRight()getTop()getWidth()protected voidinitSpecificFromJson(com.oorian.json.JsonObject obj) Initializes series-specific properties from a JSON object.voidSets the bottom position of the diagram.voidsetDraggable(Boolean draggable) Sets whether nodes are draggable.voidsetEmphasis(EChartsEmphasis emphasis) Sets the emphasis configuration.voidSets the height of the diagram.voidsetItemStyle(EChartsItemStyle itemStyle) Sets the item style configuration for nodes.voidsetLabel(EChartsLabel label) Sets the label configuration.voidsetLayoutIterations(String layoutIterations) Sets the number of layout iterations.voidSets the left position of the diagram.voidsetLineStyle(EChartsLineStyle lineStyle) Sets the line style configuration for links.voidsetNodeAlign(String nodeAlign) Sets the alignment of nodes.voidsetNodeGap(Number nodeGap) Sets the gap between nodes in the same column.voidsetNodeWidth(Number nodeWidth) Sets the width of each node.voidSets the orientation of the Sankey diagram.voidSets the right position of the diagram.voidSets the top position of the diagram.voidSets the width of the diagram.Methods inherited from class com.oorian.echarts.options.EChartsSeries
addData, getData, getName, getType, initFromJson, parseDataArray, setData, setName, setType, toJsonString, toJsonValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oorian.json.Jsonable
initFromJson, initFromJson
-
Constructor Details
-
EChartsSankeySeries
public EChartsSankeySeries()Constructs a new EChartsSankeySeries with type set to "sankey".
-
-
Method Details
-
addNode
Adds a node to the Sankey diagram.- Parameters:
name- the name/identifier for the node
-
addNode
Adds a node with a specific value to the Sankey diagram.- Parameters:
name- the name/identifier for the nodevalue- the value for the node
-
addLink
Adds a link between two nodes in the Sankey diagram.- Parameters:
source- the source node nametarget- the target node namevalue- the flow value between nodes
-
setOrient
Sets the orientation of the Sankey diagram.- Parameters:
orient- the orientation ('horizontal' or 'vertical')
-
setNodeWidth
Sets the width of each node.- Parameters:
nodeWidth- the node width in pixels
-
setNodeGap
Sets the gap between nodes in the same column.- Parameters:
nodeGap- the gap in pixels
-
setNodeAlign
Sets the alignment of nodes.- Parameters:
nodeAlign- the alignment ('justify', 'left', 'right')
-
setLayoutIterations
Sets the number of layout iterations.- Parameters:
layoutIterations- the number of iterations
-
setLeft
Sets the left position of the diagram.- Parameters:
left- the left position
-
setRight
Sets the right position of the diagram.- Parameters:
right- the right position
-
setTop
Sets the top position of the diagram.- Parameters:
top- the top position
-
setBottom
Sets the bottom position of the diagram.- Parameters:
bottom- the bottom position
-
setWidth
Sets the width of the diagram.- Parameters:
width- the width
-
setHeight
Sets the height of the diagram.- Parameters:
height- the height
-
setDraggable
Sets whether nodes are draggable.- Parameters:
draggable- true to make nodes draggable
-
setItemStyle
Sets the item style configuration for nodes.- Parameters:
itemStyle- the item style configuration
-
setLineStyle
Sets the line style configuration for links.- Parameters:
lineStyle- the line style configuration
-
setLabel
Sets the label configuration.- Parameters:
label- the label configuration
-
setEmphasis
Sets the emphasis configuration.- Parameters:
emphasis- the emphasis configuration
-
getNodes
-
getLinks
-
getOrient
-
getNodeWidth
-
getNodeGap
-
getNodeAlign
-
getLayoutIterations
-
getLeft
-
getRight
-
getTop
-
getBottom
-
getWidth
-
getHeight
-
getDraggable
-
getItemStyle
-
getLineStyle
-
getLabel
-
getEmphasis
-
initSpecificFromJson
protected void initSpecificFromJson(com.oorian.json.JsonObject obj) Description copied from class:EChartsSeriesInitializes series-specific properties from a JSON object.Subclasses must implement this method to handle their specific properties.
- Specified by:
initSpecificFromJsonin classEChartsSeries- Parameters:
obj- the JSON object containing series properties
-
addSpecificToJson
protected void addSpecificToJson(com.oorian.json.JsonObject obj) Description copied from class:EChartsSeriesAdds series-specific properties to a JSON object.Subclasses must implement this method to serialize their specific properties.
- Specified by:
addSpecificToJsonin classEChartsSeries- Parameters:
obj- the JSON object to add properties to
-