Class EChartsTreeSeries

java.lang.Object
com.oorian.echarts.options.EChartsSeries
com.oorian.echarts.options.EChartsTreeSeries
All Implemented Interfaces:
com.oorian.json.Jsonable

public class EChartsTreeSeries extends EChartsSeries
Represents a Tree series configuration for ECharts tree diagrams. Extends EChartsSeries to provide tree-specific options for hierarchical visualization.

Tree charts are useful for displaying:

  • Organizational charts
  • Decision trees
  • File system structures
  • Genealogy/family trees
Author:
Oorian
  • Field Details

  • Constructor Details

    • EChartsTreeSeries

      public EChartsTreeSeries()
      Constructs a new EChartsTreeSeries with type set to "tree".
  • Method Details

    • setRootNode

      public void setRootNode(EChartsTreeSeries.TreeNode rootNode)
      Sets the root node of the tree.
      Parameters:
      rootNode - the root node
    • createRootNode

      public EChartsTreeSeries.TreeNode createRootNode(String name)
      Creates and sets a root node with the given name.
      Parameters:
      name - the name of the root node
      Returns:
      the created root node
    • setLayout

      public void setLayout(String layout)
      Sets the layout algorithm ('orthogonal' or 'radial').
      Parameters:
      layout - the layout algorithm
    • setOrient

      public void setOrient(String orient)
      Sets the orientation of the tree ('LR', 'RL', 'TB', 'BT').
      Parameters:
      orient - the orientation
    • setSymbolSize

      public void setSymbolSize(Number symbolSize)
      Sets the size of node symbols.
      Parameters:
      symbolSize - the symbol size in pixels
    • setSymbol

      public void setSymbol(String symbol)
      Sets the symbol type for nodes.
      Parameters:
      symbol - the symbol type
    • setRoam

      public void setRoam(Boolean roam)
      Sets whether the tree supports roaming (pan and zoom).
      Parameters:
      roam - true to enable roaming
    • setExpandAndCollapse

      public void setExpandAndCollapse(Boolean expandAndCollapse)
      Sets whether nodes can be expanded and collapsed.
      Parameters:
      expandAndCollapse - true to enable expand/collapse
    • setInitialTreeDepth

      public void setInitialTreeDepth(Number initialTreeDepth)
      Sets the initial depth of tree expansion.
      Parameters:
      initialTreeDepth - the initial depth
    • setLeft

      public void setLeft(String left)
      Sets the left position.
      Parameters:
      left - the left position
    • setRight

      public void setRight(String right)
      Sets the right position.
      Parameters:
      right - the right position
    • setTop

      public void setTop(String top)
      Sets the top position.
      Parameters:
      top - the top position
    • setBottom

      public void setBottom(String bottom)
      Sets the bottom position.
      Parameters:
      bottom - the bottom position
    • setWidth

      public void setWidth(String width)
      Sets the width.
      Parameters:
      width - the width
    • setHeight

      public void setHeight(String height)
      Sets the height.
      Parameters:
      height - the height
    • setItemStyle

      public void setItemStyle(EChartsItemStyle itemStyle)
      Sets the item style configuration.
      Parameters:
      itemStyle - the item style
    • setLineStyle

      public void setLineStyle(EChartsLineStyle lineStyle)
      Sets the line style configuration.
      Parameters:
      lineStyle - the line style
    • setLabel

      public void setLabel(EChartsLabel label)
      Sets the label configuration.
      Parameters:
      label - the label configuration
    • setEmphasis

      public void setEmphasis(EChartsEmphasis emphasis)
      Sets the emphasis configuration.
      Parameters:
      emphasis - the emphasis configuration
    • getRootNode

      public EChartsTreeSeries.TreeNode getRootNode()
    • getLayout

      public String getLayout()
    • getOrient

      public String getOrient()
    • getSymbolSize

      public Number getSymbolSize()
    • getSymbol

      public String getSymbol()
    • getRoam

      public Boolean getRoam()
    • getExpandAndCollapse

      public Boolean getExpandAndCollapse()
    • getInitialTreeDepth

      public Number getInitialTreeDepth()
    • getLeft

      public String getLeft()
    • getRight

      public String getRight()
    • getTop

      public String getTop()
    • getBottom

      public String getBottom()
    • getWidth

      public String getWidth()
    • getHeight

      public String getHeight()
    • getItemStyle

      public EChartsItemStyle getItemStyle()
    • getLineStyle

      public EChartsLineStyle getLineStyle()
    • getLabel

      public EChartsLabel getLabel()
    • getEmphasis

      public EChartsEmphasis getEmphasis()
    • initSpecificFromJson

      protected void initSpecificFromJson(com.oorian.json.JsonObject obj)
      Description copied from class: EChartsSeries
      Initializes series-specific properties from a JSON object.

      Subclasses must implement this method to handle their specific properties.

      Specified by:
      initSpecificFromJson in class EChartsSeries
      Parameters:
      obj - the JSON object containing series properties
    • addSpecificToJson

      protected void addSpecificToJson(com.oorian.json.JsonObject obj)
      Description copied from class: EChartsSeries
      Adds series-specific properties to a JSON object.

      Subclasses must implement this method to serialize their specific properties.

      Specified by:
      addSpecificToJson in class EChartsSeries
      Parameters:
      obj - the JSON object to add properties to