Class EChartsTextStyle

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

public class EChartsTextStyle extends Object implements com.oorian.json.Jsonable
Represents the text style configuration for ECharts chart elements. This includes properties for font color, style, weight, size, and family.
Author:
Oorian
  • Constructor Details

    • EChartsTextStyle

      public EChartsTextStyle()
      Creates a new EChartsTextStyle instance with default settings.
  • Method Details

    • setColor

      public void setColor(String color)
      Sets the text color.
      Parameters:
      color - The color value (e.g., "#333", "rgba(0,0,0,0.8)").
    • setFontStyle

      public void setFontStyle(String fontStyle)
      Sets the font style.
      Parameters:
      fontStyle - The font style (e.g., "normal", "italic", "oblique").
    • setFontWeight

      public void setFontWeight(String fontWeight)
      Sets the font weight.
      Parameters:
      fontWeight - The font weight (e.g., "normal", "bold", "bolder", "lighter").
    • setFontSize

      public void setFontSize(Integer fontSize)
      Sets the font size in pixels.
      Parameters:
      fontSize - The font size.
    • setFontFamily

      public void setFontFamily(String fontFamily)
      Sets the font family.
      Parameters:
      fontFamily - The font family (e.g., "sans-serif", "Arial").
    • getColor

      public String getColor()
      Returns the text color.
      Returns:
      The color value.
    • getFontStyle

      public String getFontStyle()
      Returns the font style.
      Returns:
      The font style.
    • getFontWeight

      public String getFontWeight()
      Returns the font weight.
      Returns:
      The font weight.
    • getFontSize

      public Integer getFontSize()
      Returns the font size in pixels.
      Returns:
      The font size.
    • getFontFamily

      public String getFontFamily()
      Returns the font family.
      Returns:
      The font family.
    • initFromJson

      public void initFromJson(com.oorian.json.JsonValue json)
      Initializes this EChartsTextStyle from a JSON value.
      Specified by:
      initFromJson in interface com.oorian.json.Jsonable
      Parameters:
      json - The JSON value to initialize from.
    • toJsonValue

      public com.oorian.json.JsonValue toJsonValue()
      Converts this EChartsTextStyle to a JSON value.
      Specified by:
      toJsonValue in interface com.oorian.json.Jsonable
      Returns:
      The JSON representation of this EChartsTextStyle.
    • toJsonString

      public String toJsonString()
      Converts this EChartsTextStyle to a JSON string.
      Specified by:
      toJsonString in interface com.oorian.json.Jsonable
      Returns:
      The JSON string representation of this EChartsTextStyle.