Package com.oorian.echarts.options
Class EChartsTooltip
java.lang.Object
com.oorian.echarts.options.EChartsTooltip
- All Implemented Interfaces:
com.oorian.json.Jsonable
Represents the tooltip configuration for an ECharts chart. The tooltip displays information when
hovering over chart elements.
- Author:
- Oorian
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new EChartsTooltip instance with default settings. -
Method Summary
Modifier and TypeMethodDescriptionReturns the axis pointer configuration for the tooltip.Returns the formatter for the tooltip content.getShow()Returns whether the tooltip is visible.Returns the text style for the tooltip.Returns the trigger type for the tooltip.Returns the event that triggers the tooltip.Returns the value formatter for tooltip values.voidinitFromJson(com.oorian.json.JsonValue json) Initializes this EChartsTooltip from a JSON value.voidsetAxisPointer(EChartsAxisPointer axisPointer) Sets the axis pointer configuration for the tooltip.voidsetFormatter(String formatter) Sets the formatter for the tooltip content.voidSets whether the tooltip is visible.voidsetTextStyle(EChartsTextStyle textStyle) Sets the text style for the tooltip.voidsetTrigger(String trigger) Sets the trigger type for the tooltip.voidsetTriggerOn(String triggerOn) Sets the event that triggers the tooltip.voidsetValueFormatter(String valueFormatter) Sets the value formatter for tooltip values.Converts this EChartsTooltip to a JSON string.com.oorian.json.JsonValueConverts this EChartsTooltip to a JSON value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oorian.json.Jsonable
initFromJson, initFromJson
-
Constructor Details
-
EChartsTooltip
public EChartsTooltip()Creates a new EChartsTooltip instance with default settings.
-
-
Method Details
-
setShow
Sets whether the tooltip is visible.- Parameters:
show- True to show the tooltip.
-
setTrigger
Sets the trigger type for the tooltip.- Parameters:
trigger- The trigger type (e.g., "item", "axis", "none").
-
setTriggerOn
Sets the event that triggers the tooltip.- Parameters:
triggerOn- The trigger event (e.g., "mousemove", "click", "mousemove|click").
-
setFormatter
Sets the formatter for the tooltip content.- Parameters:
formatter- The formatter string or template.
-
setValueFormatter
Sets the value formatter for tooltip values.- Parameters:
valueFormatter- The value formatter string.
-
setAxisPointer
Sets the axis pointer configuration for the tooltip.- Parameters:
axisPointer- The axis pointer configuration.
-
setTextStyle
Sets the text style for the tooltip.- Parameters:
textStyle- The text style configuration.
-
getShow
Returns whether the tooltip is visible.- Returns:
- True if the tooltip is shown.
-
getTrigger
Returns the trigger type for the tooltip.- Returns:
- The trigger type.
-
getTriggerOn
Returns the event that triggers the tooltip.- Returns:
- The trigger event.
-
getFormatter
Returns the formatter for the tooltip content.- Returns:
- The formatter string or template.
-
getValueFormatter
Returns the value formatter for tooltip values.- Returns:
- The value formatter string.
-
getAxisPointer
Returns the axis pointer configuration for the tooltip.- Returns:
- The axis pointer configuration.
-
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:
initFromJsonin interfacecom.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:
toJsonValuein interfacecom.oorian.json.Jsonable- Returns:
- The JSON representation of this EChartsTooltip.
-
toJsonString
Converts this EChartsTooltip to a JSON string.- Specified by:
toJsonStringin interfacecom.oorian.json.Jsonable- Returns:
- The JSON string representation of this EChartsTooltip.
-