Class EChartsTooltip

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

public class EChartsTooltip extends Object implements com.oorian.json.Jsonable
Represents the tooltip configuration for an ECharts chart. The tooltip displays information when hovering over chart elements.
Author:
Oorian
  • Constructor Details

    • EChartsTooltip

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

    • setShow

      public void setShow(Boolean show)
      Sets whether the tooltip is visible.
      Parameters:
      show - True to show the tooltip.
    • setTrigger

      public void setTrigger(String trigger)
      Sets the trigger type for the tooltip.
      Parameters:
      trigger - The trigger type (e.g., "item", "axis", "none").
    • setTriggerOn

      public void setTriggerOn(String triggerOn)
      Sets the event that triggers the tooltip.
      Parameters:
      triggerOn - The trigger event (e.g., "mousemove", "click", "mousemove|click").
    • setFormatter

      public void setFormatter(String formatter)
      Sets the formatter for the tooltip content.
      Parameters:
      formatter - The formatter string or template.
    • setValueFormatter

      public void setValueFormatter(String valueFormatter)
      Sets the value formatter for tooltip values.
      Parameters:
      valueFormatter - The value formatter string.
    • setAxisPointer

      public void setAxisPointer(EChartsAxisPointer axisPointer)
      Sets the axis pointer configuration for the tooltip.
      Parameters:
      axisPointer - The axis pointer configuration.
    • setTextStyle

      public void setTextStyle(EChartsTextStyle textStyle)
      Sets the text style for the tooltip.
      Parameters:
      textStyle - The text style configuration.
    • getShow

      public Boolean getShow()
      Returns whether the tooltip is visible.
      Returns:
      True if the tooltip is shown.
    • getTrigger

      public String getTrigger()
      Returns the trigger type for the tooltip.
      Returns:
      The trigger type.
    • getTriggerOn

      public String getTriggerOn()
      Returns the event that triggers the tooltip.
      Returns:
      The trigger event.
    • getFormatter

      public String getFormatter()
      Returns the formatter for the tooltip content.
      Returns:
      The formatter string or template.
    • getValueFormatter

      public String getValueFormatter()
      Returns the value formatter for tooltip values.
      Returns:
      The value formatter string.
    • getAxisPointer

      public EChartsAxisPointer getAxisPointer()
      Returns the axis pointer configuration for the tooltip.
      Returns:
      The axis pointer configuration.
    • getTextStyle

      public EChartsTextStyle getTextStyle()
      Returns the text style for the tooltip.
      Returns:
      The text style configuration.
    • initFromJson

      public void initFromJson(com.oorian.json.JsonValue json)
      Initializes this EChartsTooltip 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 EChartsTooltip to a JSON value.
      Specified by:
      toJsonValue in interface com.oorian.json.Jsonable
      Returns:
      The JSON representation of this EChartsTooltip.
    • toJsonString

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