This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/echarts-doc.git
The following commit(s) were added to refs/heads/dev by this push:
new 934107e3 feat(axis): add `customValues` option for `axisLabel` and
`axisTick` (apache/echarts#19919)
934107e3 is described below
commit 934107e341fc30b81f610e8ea894638e126550e3
Author: plainheart <[email protected]>
AuthorDate: Fri Jun 21 12:17:11 2024 +0800
feat(axis): add `customValues` option for `axisLabel` and `axisTick`
(apache/echarts#19919)
---
asset/img/axis-tick-label-custom-values.png | Bin 0 -> 22414 bytes
en/option/component/axis-common.md | 33 ++++++++++++++++++++++++++++
zh/option/component/axis-common.md | 33 ++++++++++++++++++++++++++++
3 files changed, 66 insertions(+)
diff --git a/asset/img/axis-tick-label-custom-values.png
b/asset/img/axis-tick-label-custom-values.png
new file mode 100644
index 00000000..3604544e
Binary files /dev/null and b/asset/img/axis-tick-label-custom-values.png differ
diff --git a/en/option/component/axis-common.md
b/en/option/component/axis-common.md
index e169cd1a..bf582e94 100644
--- a/en/option/component/axis-common.md
+++ b/en/option/component/axis-common.md
@@ -213,6 +213,23 @@ Options are:
Whether to hide overlapped labels.
+##${prefix} customValues(Array)
+
+{{ use: partial-version(
+ version = "5.5.1"
+) }}
+
+To customize label positions. For example,
+
+```ts
+axisLabel: {
+ customValues: [0, 4, 7, 8, 9]
+}
+```
+
+
+
+
{{ use: partial-text-style(
prefix = '#' + ${prefix},
defaultColor = "'#333'"
@@ -310,6 +327,22 @@ Line style of axis ticks.
Color of axis label is set to be
[axisLine.lineStyle.color](~${componentType}.axisLine.lineStyle.color) by
default.
+##${prefix} customValues(Array)
+
+{{ use: partial-version(
+ version = "5.5.1"
+) }}
+
+To customize tick positions. For example,
+
+```ts
+axisTick: {
+ alignWithLabel: true,
+ customValues: [0, 0.5, 1, 1.5, 2, 8, 9]
+}
+```
+
+
{{ target: partial-axis-common-minor-tick }}
diff --git a/zh/option/component/axis-common.md
b/zh/option/component/axis-common.md
index 7c7e4dd8..1107d8cd 100644
--- a/zh/option/component/axis-common.md
+++ b/zh/option/component/axis-common.md
@@ -211,6 +211,23 @@ X 轴或者 Y 轴的轴线是否在另一个轴的 0 刻度上,只有在另一
是否隐藏重叠的标签。
+##${prefix} customValues(Array)
+
+{{ use: partial-version(
+ version = "5.5.1"
+) }}
+
+自定义要显示的标签位置。例如:
+
+```ts
+axisLabel: {
+ customValues: [0, 4, 7, 8, 9]
+}
+```
+
+
+
+
{{ use: partial-text-style(
prefix = '#' + ${prefix},
defaultColor = "'#333'"
@@ -308,6 +325,22 @@ textStyle: {
刻度线的颜色,默认取
[axisTick.lineStyle.color](~${componentType}.axisTick.lineStyle.color)。
+##${prefix} customValues(Array)
+
+{{ use: partial-version(
+ version = "5.5.1"
+) }}
+
+自定义要显示的坐标轴刻度位置。例如:
+
+```ts
+axisTick: {
+ alignWithLabel: true,
+ customValues: [0, 0.5, 1, 1.5, 2, 8, 9]
+}
+```
+
+
{{ target: partial-axis-common-minor-tick }}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]