Package com.oorian.echarts.options
Class EChartsTitle
java.lang.Object
com.oorian.echarts.options.EChartsTitle
- All Implemented Interfaces:
com.oorian.json.Jsonable
Represents the title configuration for an ECharts chart. The title can include main text and subtext
with customizable positioning and styling options.
- Author:
- Oorian
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new EChartsTitle instance with no initial text.EChartsTitle(String text) Creates a new EChartsTitle instance with the specified main text.EChartsTitle(String text, String subtext) Creates a new EChartsTitle instance with the specified main text and subtext. -
Method Summary
Modifier and TypeMethodDescriptionReturns the bottom position of the title.getLeft()Returns the left position of the title.getRight()Returns the right position of the title.Returns the subtitle text.Returns the text style for the subtitle.getText()Returns the main title text.Returns the text style for the main title.getTop()Returns the top position of the title.voidinitFromJson(com.oorian.json.JsonValue json) Initializes this EChartsTitle from a JSON value.voidSets the bottom position of the title.voidSets the left position of the title.voidSets the right position of the title.voidsetSubtext(String subtext) Sets the subtitle text.voidsetSubtextStyle(EChartsTextStyle subtextStyle) Sets the text style for the subtitle.voidSets the main title text.voidsetTextStyle(EChartsTextStyle textStyle) Sets the text style for the main title.voidSets the top position of the title.Converts this EChartsTitle to a JSON string.com.oorian.json.JsonValueConverts this EChartsTitle 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
-
EChartsTitle
public EChartsTitle()Creates a new EChartsTitle instance with no initial text. -
EChartsTitle
Creates a new EChartsTitle instance with the specified main text.- Parameters:
text- The main title text.
-
EChartsTitle
Creates a new EChartsTitle instance with the specified main text and subtext.- Parameters:
text- The main title text.subtext- The subtitle text.
-
-
Method Details
-
setText
Sets the main title text.- Parameters:
text- The main title text.
-
setSubtext
Sets the subtitle text.- Parameters:
subtext- The subtitle text.
-
setLeft
Sets the left position of the title.- Parameters:
left- The left position value (e.g., "10%", "center", "left").
-
setTop
Sets the top position of the title.- Parameters:
top- The top position value (e.g., "10%", "top", "middle").
-
setRight
Sets the right position of the title.- Parameters:
right- The right position value (e.g., "10%", "right").
-
setBottom
Sets the bottom position of the title.- Parameters:
bottom- The bottom position value (e.g., "10%", "bottom").
-
setTextStyle
Sets the text style for the main title.- Parameters:
textStyle- The text style configuration.
-
setSubtextStyle
Sets the text style for the subtitle.- Parameters:
subtextStyle- The subtitle text style configuration.
-
getText
Returns the main title text.- Returns:
- The main title text.
-
getSubtext
Returns the subtitle text.- Returns:
- The subtitle text.
-
getLeft
Returns the left position of the title.- Returns:
- The left position value.
-
getTop
Returns the top position of the title.- Returns:
- The top position value.
-
getRight
Returns the right position of the title.- Returns:
- The right position value.
-
getBottom
Returns the bottom position of the title.- Returns:
- The bottom position value.
-
getTextStyle
Returns the text style for the main title.- Returns:
- The text style configuration.
-
getSubtextStyle
Returns the text style for the subtitle.- Returns:
- The subtitle text style configuration.
-
initFromJson
public void initFromJson(com.oorian.json.JsonValue json) Initializes this EChartsTitle 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 EChartsTitle to a JSON value.- Specified by:
toJsonValuein interfacecom.oorian.json.Jsonable- Returns:
- The JSON representation of this EChartsTitle.
-
toJsonString
Converts this EChartsTitle to a JSON string.- Specified by:
toJsonStringin interfacecom.oorian.json.Jsonable- Returns:
- The JSON string representation of this EChartsTitle.
-