Class EChartsTreemapSeries

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

public class EChartsTreemapSeries extends EChartsSeries
Represents a treemap series configuration for ECharts treemap charts. Extends EChartsSeries to provide treemap-specific options for hierarchical data visualization.

Treemap charts are useful for displaying:

  • Hierarchical data as nested rectangles
  • File system structures
  • Portfolio allocations
  • Category breakdowns
Author:
Oorian
  • Constructor Details

    • EChartsTreemapSeries

      public EChartsTreemapSeries()
      Constructs a new EChartsTreemapSeries with type set to "treemap".
  • Method Details

    • addData

      public void addData(String name, Number value, List<EChartsTreemapData> children)
      Adds hierarchical data for the treemap chart.
      Parameters:
      name - the name of this data node
      value - the value of this node
      children - list of child nodes (can be null for leaf nodes)
    • addData

      public void addData(String name, Number value)
      Adds simple leaf data for the treemap chart.
      Parameters:
      name - the name of this data node
      value - the value of this node
    • setLeft

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

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

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

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

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

      public void setHeight(String height)
      Sets the height of the treemap.
      Parameters:
      height - the height
    • setSquareRatio

      public void setSquareRatio(Number squareRatio)
      Sets the square ratio for treemap layout.
      Parameters:
      squareRatio - the square ratio (golden ratio by default)
    • setLeafDepth

      public void setLeafDepth(Number leafDepth)
      Sets the depth of leaves to show.
      Parameters:
      leafDepth - the leaf depth
    • setDrillDownIcon

      public void setDrillDownIcon(String drillDownIcon)
      Sets the drill down icon.
      Parameters:
      drillDownIcon - the drill down icon
    • setRoam

      public void setRoam(Boolean roam)
      Sets whether roaming (panning/zooming) is enabled.
      Parameters:
      roam - true to enable roaming
    • setNodeClick

      public void setNodeClick(String nodeClick)
      Sets the node click behavior.
      Parameters:
      nodeClick - the node click action ('zoomToNode', 'link', or false)
    • setZoomToNodeRatio

      public void setZoomToNodeRatio(Number zoomToNodeRatio)
      Sets the zoom to node ratio.
      Parameters:
      zoomToNodeRatio - the zoom ratio
    • setVisibleMin

      public void setVisibleMin(Number visibleMin)
      Sets the minimum visible area.
      Parameters:
      visibleMin - the minimum visible value
    • setChildrenVisibleMin

      public void setChildrenVisibleMin(Number childrenVisibleMin)
      Sets the minimum visible area for children.
      Parameters:
      childrenVisibleMin - the minimum visible value for children
    • setItemStyle

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

      public void setEmphasis(EChartsEmphasis emphasis)
      Sets the emphasis configuration for highlighted elements.
      Parameters:
      emphasis - the emphasis configuration
    • setLabel

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

      public void setUpperLabel(EChartsLabel upperLabel)
      Sets the upper label configuration (for parent nodes).
      Parameters:
      upperLabel - the upper label configuration
    • setLevels

      public void setLevels(EChartsLevels levels)
      Sets the levels configuration for different depth levels.
      Parameters:
      levels - the levels configuration
    • setBreadcrumb

      public void setBreadcrumb(com.oorian.json.JsonArray breadcrumb)
      Sets the breadcrumb configuration.
      Parameters:
      breadcrumb - the breadcrumb configuration array
    • getLeft

      public String getLeft()
      Gets the left position.
      Returns:
      the left position
    • getRight

      public String getRight()
      Gets the right position.
      Returns:
      the right position
    • getTop

      public String getTop()
      Gets the top position.
      Returns:
      the top position
    • getBottom

      public String getBottom()
      Gets the bottom position.
      Returns:
      the bottom position
    • getWidth

      public String getWidth()
      Gets the width.
      Returns:
      the width
    • getHeight

      public String getHeight()
      Gets the height.
      Returns:
      the height
    • getSquareRatio

      public Number getSquareRatio()
      Gets the square ratio.
      Returns:
      the square ratio
    • getLeafDepth

      public Number getLeafDepth()
      Gets the leaf depth.
      Returns:
      the leaf depth
    • getDrillDownIcon

      public String getDrillDownIcon()
      Gets the drill down icon.
      Returns:
      the drill down icon
    • getRoam

      public Boolean getRoam()
      Gets the roam setting.
      Returns:
      true if roaming is enabled
    • getNodeClick

      public String getNodeClick()
      Gets the node click behavior.
      Returns:
      the node click action
    • getZoomToNodeRatio

      public Number getZoomToNodeRatio()
      Gets the zoom to node ratio.
      Returns:
      the zoom ratio
    • getVisibleMin

      public Number getVisibleMin()
      Gets the visible minimum.
      Returns:
      the visible minimum
    • getChildrenVisibleMin

      public Number getChildrenVisibleMin()
      Gets the children visible minimum.
      Returns:
      the children visible minimum
    • getItemStyle

      public EChartsItemStyle getItemStyle()
      Gets the item style configuration.
      Returns:
      the item style configuration
    • getEmphasis

      public EChartsEmphasis getEmphasis()
      Gets the emphasis configuration.
      Returns:
      the emphasis configuration
    • getLabel

      public EChartsLabel getLabel()
      Gets the label configuration.
      Returns:
      the label configuration
    • getUpperLabel

      public EChartsLabel getUpperLabel()
      Gets the upper label configuration.
      Returns:
      the upper label configuration
    • getLevels

      public EChartsLevels getLevels()
      Gets the levels configuration.
      Returns:
      the levels configuration
    • getBreadcrumb

      public com.oorian.json.JsonArray getBreadcrumb()
      Gets the breadcrumb configuration.
      Returns:
      the breadcrumb configuration
    • 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