Package com.oorian.echarts.options
Class EChartsAxisLabel
java.lang.Object
com.oorian.echarts.options.EChartsAxisLabel
- All Implemented Interfaces:
com.oorian.json.Jsonable
Represents the axis label configuration for ECharts axes.
Controls the display, positioning, rotation, and formatting of axis labels.
- Author:
- Oorian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the formatter for label content.Gets whether the labels are inside the axis area.Gets the interval between labels.Gets the margin between the labels and the axis.Gets the rotation angle of the labels.getShow()Gets whether the axis labels are displayed.Gets whether to show the label at the maximum value.Gets whether to show the label at the minimum value.Gets the text style for the labels.voidinitFromJson(com.oorian.json.JsonValue json) Initializes this EChartsAxisLabel from a JSON value.voidsetFormatter(String formatter) Sets the formatter for label content.voidSets whether the labels are inside the axis area.voidsetInterval(Number interval) Sets the interval between labels.voidSets the margin between the labels and the axis.voidSets the rotation angle of the labels.voidSets whether the axis labels are displayed.voidsetShowMaxLabel(Boolean showMaxLabel) Sets whether to show the label at the maximum value.voidsetShowMinLabel(Boolean showMinLabel) Sets whether to show the label at the minimum value.voidsetTextStyle(EChartsTextStyle textStyle) Sets the text style for the labels.Converts this EChartsAxisLabel to a JSON string.com.oorian.json.JsonValueConverts this EChartsAxisLabel 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
-
EChartsAxisLabel
public EChartsAxisLabel()Constructs a new EChartsAxisLabel with default settings.
-
-
Method Details
-
setShow
Sets whether the axis labels are displayed.- Parameters:
show- true to show the labels, false to hide them
-
setInterval
Sets the interval between labels.- Parameters:
interval- the label interval
-
setInside
Sets whether the labels are inside the axis area.- Parameters:
inside- true for inside, false for outside
-
setRotate
Sets the rotation angle of the labels.- Parameters:
rotate- the rotation angle in degrees
-
setMargin
Sets the margin between the labels and the axis.- Parameters:
margin- the margin in pixels
-
setFormatter
Sets the formatter for label content.- Parameters:
formatter- the formatter string or function
-
setShowMinLabel
Sets whether to show the label at the minimum value.- Parameters:
showMinLabel- true to show the minimum label
-
setShowMaxLabel
Sets whether to show the label at the maximum value.- Parameters:
showMaxLabel- true to show the maximum label
-
setTextStyle
Sets the text style for the labels.- Parameters:
textStyle- the text style configuration
-
getShow
Gets whether the axis labels are displayed.- Returns:
- true if shown, false if hidden
-
getInterval
Gets the interval between labels.- Returns:
- the label interval
-
getInside
Gets whether the labels are inside the axis area.- Returns:
- true for inside, false for outside
-
getRotate
Gets the rotation angle of the labels.- Returns:
- the rotation angle in degrees
-
getMargin
Gets the margin between the labels and the axis.- Returns:
- the margin in pixels
-
getFormatter
Gets the formatter for label content.- Returns:
- the formatter string or function
-
getShowMinLabel
Gets whether to show the label at the minimum value.- Returns:
- true if showing the minimum label
-
getShowMaxLabel
Gets whether to show the label at the maximum value.- Returns:
- true if showing the maximum label
-
getTextStyle
Gets the text style for the labels.- Returns:
- the text style configuration
-
initFromJson
public void initFromJson(com.oorian.json.JsonValue json) Initializes this EChartsAxisLabel from a JSON value.- Specified by:
initFromJsonin interfacecom.oorian.json.Jsonable- Parameters:
json- the JSON value to parse
-
toJsonValue
public com.oorian.json.JsonValue toJsonValue()Converts this EChartsAxisLabel to a JSON value.- Specified by:
toJsonValuein interfacecom.oorian.json.Jsonable- Returns:
- the JSON representation
-
toJsonString
Converts this EChartsAxisLabel to a JSON string.- Specified by:
toJsonStringin interfacecom.oorian.json.Jsonable- Returns:
- the JSON string representation
-