Class EChartsPieSeries

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

public class EChartsPieSeries extends EChartsSeries
Represents a pie series configuration for ECharts pie charts. Extends EChartsSeries to provide pie-specific options such as radius, center position, rose type, and label styling.
Author:
Oorian
  • Constructor Details

    • EChartsPieSeries

      public EChartsPieSeries()
      Constructs a new EChartsPieSeries with type set to "pie".
  • Method Details

    • addData

      public void addData(String name, Number value)
      Adds a data point for the pie chart with name and value.
      Parameters:
      name - the name/label for this data point
      value - the numeric value
    • setRadius

      public void setRadius(float radius)
      Sets the radius of the pie chart as a single numeric value.
      Parameters:
      radius - the radius value in pixels
    • setRadius

      public void setRadius(String radius)
      Sets the radius of the pie chart as a string (can be percentage like "70%").
      Parameters:
      radius - the radius value as string
    • setRadius

      public void setRadius(Number innerRadius, Number outerRadius)
      Sets the radius of the pie chart as inner and outer radius for a donut chart.
      Parameters:
      innerRadius - the inner radius value in pixels
      outerRadius - the outer radius value in pixels
    • setRadius

      public void setRadius(String innerRadius, String outerRadius)
      Sets the radius of the pie chart as inner and outer radius for a donut chart using percentage strings.
      Parameters:
      innerRadius - the inner radius value (e.g., "40%")
      outerRadius - the outer radius value (e.g., "70%")
    • setCenter

      public void setCenter(String x, String y)
      Sets the center position of the pie chart.
      Parameters:
      x - the x coordinate (can be percentage or pixel value)
      y - the y coordinate (can be percentage or pixel value)
    • setRoseType

      public void setRoseType(Boolean roseType)
      Sets whether to display as a rose/nightingale chart.
      Parameters:
      roseType - true to enable rose type
    • setStartAngle

      public void setStartAngle(Number startAngle)
      Sets the starting angle of the pie chart.
      Parameters:
      startAngle - the start angle in degrees
    • setMinAngle

      public void setMinAngle(Number minAngle)
      Sets the minimum angle for a pie slice.
      Parameters:
      minAngle - the minimum angle in degrees
    • setMinShowLabelAngle

      public void setMinShowLabelAngle(Number minShowLabelAngle)
      Sets the minimum angle for showing labels on a pie slice.
      Parameters:
      minShowLabelAngle - the minimum angle in degrees
    • setClockwise

      public void setClockwise(Boolean clockwise)
      Sets whether the pie chart is drawn clockwise.
      Parameters:
      clockwise - true for clockwise direction
    • setAvoidLabelOverlap

      public void setAvoidLabelOverlap(Boolean avoidLabelOverlap)
      Sets whether to prevent label overlap.
      Parameters:
      avoidLabelOverlap - true to avoid label overlap
    • setStillShowZeroSum

      public void setStillShowZeroSum(Boolean stillShowZeroSum)
      Sets whether to show the chart when sum of values is zero.
      Parameters:
      stillShowZeroSum - true to still show the chart
    • setItemStyle

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

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

      public void setLabel(EChartsLabel label)
      Sets the label configuration for pie labels.
      Parameters:
      label - the label configuration
    • setLabelLine

      public void setLabelLine(EChartsLabelLine labelLine)
      Sets the label line configuration for connecting labels to slices.
      Parameters:
      labelLine - the label line configuration
    • getRadius

      public Number getRadius()
      Gets the radius value.
      Returns:
      the radius value
    • getCenter

      public com.oorian.json.JsonArray getCenter()
      Gets the center position.
      Returns:
      the center position array
    • getRoseType

      public Boolean getRoseType()
      Gets the rose type setting.
      Returns:
      true if rose type is enabled
    • getStartAngle

      public Number getStartAngle()
      Gets the start angle.
      Returns:
      the start angle in degrees
    • getMinAngle

      public Number getMinAngle()
      Gets the minimum angle.
      Returns:
      the minimum angle in degrees
    • getMinShowLabelAngle

      public Number getMinShowLabelAngle()
      Gets the minimum show label angle.
      Returns:
      the minimum show label angle in degrees
    • getClockwise

      public Boolean getClockwise()
      Gets the clockwise setting.
      Returns:
      true if clockwise direction is enabled
    • getAvoidLabelOverlap

      public Boolean getAvoidLabelOverlap()
      Gets the avoid label overlap setting.
      Returns:
      true if label overlap avoidance is enabled
    • getStillShowZeroSum

      public Boolean getStillShowZeroSum()
      Gets the still show zero sum setting.
      Returns:
      true if chart is shown when sum is zero
    • 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
    • getLabelLine

      public EChartsLabelLine getLabelLine()
      Gets the label line configuration.
      Returns:
      the label line 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