This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-doc.git
The following commit(s) were added to refs/heads/master by this push:
new 8f1ccf49 refine doc for stack and extract stack doc part (fix #493)
8f1ccf49 is described below
commit 8f1ccf49e4ddadf0e90877d0cea0c28aec167bfd
Author: plainheart <[email protected]>
AuthorDate: Fri Mar 6 15:42:16 2026 +0800
refine doc for stack and extract stack doc part (fix #493)
---
en/option-gl/partial/stack.md | 44 +++++++++++++++++++++++++++++++++++++++++++
en/option-gl/series/bar3D.md | 21 ++-------------------
en/option/partial/stack.md | 44 +++++++++++++++++++++++++++++++++++++++++++
en/option/series/bar.md | 35 ++--------------------------------
en/option/series/line.md | 39 ++------------------------------------
zh/option-gl/partial/stack.md | 44 +++++++++++++++++++++++++++++++++++++++++++
zh/option-gl/series/bar3D.md | 20 ++------------------
zh/option/partial/stack.md | 44 +++++++++++++++++++++++++++++++++++++++++++
zh/option/series/bar.md | 33 ++------------------------------
zh/option/series/line.md | 37 ++----------------------------------
10 files changed, 188 insertions(+), 173 deletions(-)
diff --git a/en/option-gl/partial/stack.md b/en/option-gl/partial/stack.md
new file mode 100644
index 00000000..dc0f6fd2
--- /dev/null
+++ b/en/option-gl/partial/stack.md
@@ -0,0 +1,44 @@
+
+{{ target: partial-stack }}
+
+## stack(string)
+
+Name of the stack group. Series with the same `stack` name on the **same
category axis** will be stacked on top of each other. See
[stackStrategy](~series-${componentNameInLink}.stackStrategy) for customizing
how values are stacked.
+
+**Notice:** Stacking **only supports the stacked axis being of type**
`'value'` or `'log'`. Axes of type `'time'` and `'category'` are **not
supported** as the stacked axis.
+
+{{ if: ${componentNameInLink} === 'line' }}
+You can view the effect of the example below by switching stacks in the
[toolbox](~toolbox) in the top-right corner.
+
+~[600x400](${galleryViewPath}doc-example/line-stack-tiled&edit=1&reset=1)
+{{ /if }}
+
+## stackStrategy(string) = 'samesign'
+
+{{ use: partial-version(
+ isECharts = true,
+ version = '5.3.3'
+) }}
+
+Strategy for stacking values, only effective when
[stack](~series-${componentNameInLink}.stack) is set. Optional values:
+
++ `'samesign'` Only stack values if the value to be stacked has the **same
sign** as the currently cumulated stacked value. **(Default)**
++ `'all'` Stack all values regardless of positive or negative.
++ `'positive'` Only stack positive values.
++ `'negative'` Only stack negative values.
+
+## stackOrder(string) = 'seriesAsc'
+
+{{ use: partial-version(
+ isECharts = true,
+ version = '6.0.0'
+) }}
+
+Stack order. Optional values:
+
++ `'seriesAsc'` Stack in series order. **(Default)**
++ `'seriesDesc'` Stack in reversed series order.
+
+**Notice:**
+
++ `stackOrder` should be defined for all series with the same `stack` name. If
`stackOrder` is defined for only some of the series, the stack order may change
unexpectedly when certain series are hidden (e.g., through legend toggle).
\ No newline at end of file
diff --git a/en/option-gl/series/bar3D.md b/en/option-gl/series/bar3D.md
index 90507d8a..bd5005c0 100644
--- a/en/option-gl/series/bar3D.md
+++ b/en/option-gl/series/bar3D.md
@@ -36,27 +36,10 @@ Below are the differences between beveling and no beveling.
The smoothness of the bevel, the larger the value, the smoother.
-## stack(string)
-
-Stacking of bar chart. On the same category axis, the series with the same
`stack` name would be put on top of each other. Note that the data items that
need to be stack in different series must have the same index in the array.
-
-See also [stackStrategy](~series-bar3D.stackStrategy) on how to customize how
values are stacked.
-
-Notice: `stack` only supports stacking on `value` and `log` axis for now.
`time` and `category` axis are not supported.
-
-## stackStrategy(string) = 'samesign'
-
-{{ use: partial-version(
- isECharts = true,
- version = '5.3.3'
+{{ use: partial-stack(
+ componentNameInLink = 'bar3D'
) }}
-How to stack values if the [stack](~series-bar3D.stack) property has been set.
Options:
-+ `'samesign'`: only stack values if the value to be stacked has the same sign
as the currently cumulated stacked value.
-+ `'all'`: stack all values, irrespective of the signs of the current or
cumulative stacked value.
-+ `'positive'`: only stack positive values.
-+ `'negative'`: only stack negative values.
-
## minHeight(number) = 0
The minimum width of the bar.
diff --git a/en/option/partial/stack.md b/en/option/partial/stack.md
new file mode 100644
index 00000000..ee602ce8
--- /dev/null
+++ b/en/option/partial/stack.md
@@ -0,0 +1,44 @@
+
+{{ target: partial-stack }}
+
+## stack(string)
+
+Name of the stack group. Series with the same `stack` name on the **same
category axis** will be stacked on top of each other. See
[stackStrategy](~series-${componentNameInLink}.stackStrategy) for customizing
how values are stacked.
+
+**Notice:** Stacking **only supports the stacked axis being of type**
`'value'` or `'log'`. Axes of type `'time'` and `'category'` are **not
supported** as the stacked axis.
+
+{{ if: ${componentNameInLink} === 'line' }}
+You can view the effect of the example below by switching stacks in the
[toolbox](~toolbox) in the top-right corner.
+
+~[600x400](${galleryViewPath}doc-example/line-stack-tiled&edit=1&reset=1)
+{{ /if }}
+
+## stackStrategy(string) = 'samesign'
+
+{{ use: partial-version(
+ version = '5.3.3'
+) }}
+
+Strategy for stacking values, only effective when
[stack](~series-${componentNameInLink}.stack) is set. Optional values:
+
++ `'samesign'` Only stack values if the value to be stacked has the **same
sign** as the currently cumulated stacked value. **(Default)**
++ `'all'` Stack all values regardless of positive or negative.
++ `'positive'` Only stack positive values.
++ `'negative'` Only stack negative values.
+
+## stackOrder(string) = 'seriesAsc'
+
+{{ use: partial-version(
+ version = '6.0.0'
+) }}
+
+Stack order. Optional values:
+
++ `'seriesAsc'` Stack in series order. **(Default)**
++ `'seriesDesc'` Stack in reversed series order.
+
+**Notice:**
+
++ `stackOrder` should be defined for all series with the same `stack` name. If
`stackOrder` is defined for only some of the series, the stack order may change
unexpectedly when certain series are hidden (e.g., through legend toggle).
+
++ Not supported in `polar` coordinate system.
\ No newline at end of file
diff --git a/en/option/series/bar.md b/en/option/series/bar.md
index 5d17c9b0..99e23bc3 100644
--- a/en/option/series/bar.md
+++ b/en/option/series/bar.md
@@ -135,41 +135,10 @@ Configurations of select state. Available when
[selectedMode](~series-bar.select
version = '5.0.0'
) }}
-## stack(string) = null
-
-Name of stack. On the same category axis, the series with the same `stack`
name would be put on top of each other.
-
-See also [stackStrategy](~series-bar.stackStrategy) on how to customize how
values are stacked.
-
-Notice: `stack` only supports stacking on `value` and `log` axis for now.
`time` and `category` axis are not supported.
-
-## stackStrategy(string) = 'samesign'
-
-{{ use: partial-version(
- version = '5.3.3'
+{{ use: partial-stack(
+ componentNameInLink = 'bar'
) }}
-How to stack values if the [stack](~series-bar.stack) property has been set.
Options:
-
-+ `'samesign'`: only stack values if the value to be stacked has the same sign
as the currently cumulated stacked value.
-+ `'all'`: stack all values, irrespective of the signs of the current or
cumulative stacked value.
-+ `'positive'`: only stack positive values.
-+ `'negative'`: only stack negative values.
-
-## stackOrder(string) = 'seriesAsc'
-
-{{ use: partial-version(
- version = '6.0.0'
-) }}
-
-Stack order. Optional values:
-+ `'seriesAsc'` (default, stack in series order)
-+ `'seriesDesc'` (reverse stack order)
-
-**Note:** `stackOrder` should be defined for all series with the same `stack`
name. If `stackOrder` is defined for only some of the series, the stack order
may change unexpectedly when certain series are hidden (e.g., through legend
toggle).
-
-Not supported in polar coordinate system.
-
## sampling(string)
The downsampling strategy used when the data size is much larger than pixel
size. It will improve the performance when turned on. Defaults to be turned
off, indicating that all the data points will be drawn.
diff --git a/en/option/series/line.md b/en/option/series/line.md
index 82e9ae54..83708c75 100644
--- a/en/option/series/line.md
+++ b/en/option/series/line.md
@@ -57,45 +57,10 @@ Only work when main axis is `'category'` axis (`axis.type`
is `'category'`). Opt
{{ use: partial-legend-hover-link() }}
-## stack(string) = null
-
-If stack the value. On the same category axis, the series with the same
`stack` name would be put on top of each other.
-
-See also [stackStrategy](~series-line.stackStrategy) on how to customize how
values are stacked.
-
-Notice: `stack` only supports stacking on `value` and `log` axis for now.
`time` and `category` axis are not supported.
-
-The effect of the below example could be seen through stack switching of
[toolbox](~toolbox) on the top right corner:
-
-~[600x400](${galleryViewPath}doc-example/line-stack-tiled&edit=1&reset=1)
-
-## stackStrategy(string) = 'samesign'
-
-{{ use: partial-version(
- version = '5.3.3'
+{{ use: partial-stack(
+ componentNameInLink = 'line'
) }}
-How to stack values if the [stack](~series-line.stack) property has been set.
Options:
-
-+ `'samesign'`: only stack values if the value to be stacked has the same sign
as the currently cumulated stacked value.
-+ `'all'`: stack all values, irrespective of the signs of the current or
cumulative stacked value.
-+ `'positive'`: only stack positive values.
-+ `'negative'`: only stack negative values.
-
-## stackOrder(string) = 'seriesAsc'
-
-{{ use: partial-version(
- version = '6.0.0'
-) }}
-
-Stack order. Optional values:
-+ `'seriesAsc'` (default, stack in series order)
-+ `'seriesDesc'` (reverse stack order)
-
-**Note:** `stackOrder` should be defined for all series with the same `stack`
name. If `stackOrder` is defined for only some of the series, the stack order
may change unexpectedly when certain series are hidden (e.g., through legend
toggle).
-
-Not supported in polar coordinate system.
-
{{ use: partial-cursor() }}
## connectNulls(boolean) = false
diff --git a/zh/option-gl/partial/stack.md b/zh/option-gl/partial/stack.md
new file mode 100644
index 00000000..af23664e
--- /dev/null
+++ b/zh/option-gl/partial/stack.md
@@ -0,0 +1,44 @@
+
+{{ target: partial-stack }}
+
+## stack(string)
+
+堆叠的组名。在**同一个类目轴(category axis)**上,配置了相同 `stack` 组名的系列会互相堆叠。关于数值的堆叠方式,可参见
[stackStrategy](~series-${componentNameInLink}.stackStrategy)。
+
+**注意:**堆叠功能只支持被堆叠轴为 `'value'` 或 `'log'` 类型,不支持被堆叠轴为 `'time'` 或 `'category'` 类型。
+
+{{ if: ${componentNameInLink} === 'line' }}
+下面示例可以通过右上角 [toolbox](~toolbox) 中的堆叠切换看效果:
+
+~[600x400](${galleryViewPath}doc-example/line-stack-tiled&edit=1&reset=1)
+{{ /if }}
+
+## stackStrategy(string) = 'samesign'
+
+{{ use: partial-version(
+ isECharts = true,
+ version = '5.3.3'
+) }}
+
+堆叠数值的计算方式,仅在设置了 [stack](~series-${componentNameInLink}.stack) 属性后生效。可选值:
+
++ `'samesign'` 仅当待堆叠数值与当前累积堆叠值正负符号一致时才堆叠。**(默认)**
++ `'all'` 堆叠所有数值,不区分正负。
++ `'positive'` 只堆叠正值。
++ `'negative'` 只堆叠负值。
+
+## stackOrder(string) = 'seriesAsc'
+
+{{ use: partial-version(
+ isECharts = true,
+ version = '6.0.0'
+) }}
+
+堆叠顺序。可选值:
+
++ `'seriesAsc'` 按系列顺序堆叠。**(默认)**
++ `'seriesDesc'` 按系列反向顺序堆叠。
+
+**注意:**
+
++ `stackOrder` 应该为所有具有相同 `stack` 名称的系列定义。如果只为部分系列定义
`stackOrder`,当某些系列被隐藏(如通过图例切换)时,可能会导致堆叠顺序发生意外变化。
\ No newline at end of file
diff --git a/zh/option-gl/series/bar3D.md b/zh/option-gl/series/bar3D.md
index cc5c9ac4..35076b64 100644
--- a/zh/option-gl/series/bar3D.md
+++ b/zh/option-gl/series/bar3D.md
@@ -34,26 +34,10 @@
柱子倒角的光滑/圆润度,数值越大越光滑/圆润。
-## stack(string)
-
-柱状图堆叠,相同 `stack` 值的柱状图系列数据会有叠加。注意不同系列需要叠加的数据项在数组中的索引必须是一样的。关于如何定制数值的堆叠方式,参见
[stackStrategy](~series-bar3D.stackStrategy)。
-
-注:目前 `stack` 只支持堆叠于 `value` 和 `log` 类型的类目轴上,不支持 `time` 和 `category` 类型的类目轴。
-
-## stackStrategy(string) = 'samesign'
-
-{{ use: partial-version(
- isECharts = true,
- version = '5.3.3'
+{{ use: partial-stack(
+ componentNameInLink = 'bar3D'
) }}
-堆积数值的策略,前提是[stack](~series-bar3D.stack)属性已被设置。其值可以是:
-
-+ `'samesign'` 只在要堆叠的值与当前累积的堆叠值具有相同的正负符号时才堆叠。
-+ `'all'` 堆叠所有的值,不管当前或累积的堆叠值的正负符号是什么。
-+ `'positive'` 只堆积正值。
-+ `'negative'` 只堆叠负值。
-
## minHeight(number) = 0
最小柱子高度。
diff --git a/zh/option/partial/stack.md b/zh/option/partial/stack.md
new file mode 100644
index 00000000..b3ad218b
--- /dev/null
+++ b/zh/option/partial/stack.md
@@ -0,0 +1,44 @@
+
+{{ target: partial-stack }}
+
+## stack(string)
+
+堆叠的组名。在**同一个类目轴(category axis)**上,配置了相同 `stack` 组名的系列会互相堆叠。关于数值的堆叠方式,可参见
[stackStrategy](~series-${componentNameInLink}.stackStrategy)。
+
+**注意:**堆叠功能只支持被堆叠轴为 `'value'` 或 `'log'` 类型,不支持被堆叠轴为 `'time'` 或 `'category'` 类型。
+
+{{ if: ${componentNameInLink} === 'line' }}
+下面示例可以通过右上角 [toolbox](~toolbox) 中的堆叠切换看效果:
+
+~[600x400](${galleryViewPath}doc-example/line-stack-tiled&edit=1&reset=1)
+{{ /if }}
+
+## stackStrategy(string) = 'samesign'
+
+{{ use: partial-version(
+ version = '5.3.3'
+) }}
+
+堆叠数值的计算方式,仅在设置了 [stack](~series-${componentNameInLink}.stack) 属性后生效。可选值:
+
++ `'samesign'` 仅当待堆叠数值与当前累积堆叠值正负符号一致时才堆叠。**(默认)**
++ `'all'` 堆叠所有数值,不区分正负。
++ `'positive'` 只堆叠正值。
++ `'negative'` 只堆叠负值。
+
+## stackOrder(string) = 'seriesAsc'
+
+{{ use: partial-version(
+ version = '6.0.0'
+) }}
+
+堆叠顺序。可选值:
+
++ `'seriesAsc'` 按系列顺序堆叠。**(默认)**
++ `'seriesDesc'` 按系列反向顺序堆叠。
+
+**注意:**
+
++ `stackOrder` 应该为所有具有相同 `stack` 名称的系列定义。如果只为部分系列定义
`stackOrder`,当某些系列被隐藏(如通过图例切换)时,可能会导致堆叠顺序发生意外变化。
+
++ 当前不支持极坐标系。
\ No newline at end of file
diff --git a/zh/option/series/bar.md b/zh/option/series/bar.md
index 3c88cfed..95538995 100644
--- a/zh/option/series/bar.md
+++ b/zh/option/series/bar.md
@@ -214,39 +214,10 @@ option = {
version = '5.0.0'
) }}
-## stack(string) = null
-
-数据堆叠,同个类目轴上系列配置相同的 `stack` 值可以堆叠放置。关于如何定制数值的堆叠方式,参见
[stackStrategy](~series-bar.stackStrategy)。
-
-注:目前 `stack` 只支持堆叠于 `'value'` 和 `'log'` 类型的类目轴上,不支持 `'time'` 和 `'category'`
类型的类目轴。
-
-## stackStrategy(string) = 'samesign'
-
-{{ use: partial-version(
- version = '5.3.3'
-) }}
-
-堆积数值的策略,前提是[stack](~series-bar.stack)属性已被设置。其值可以是:
-
-+ `'samesign'` 只在要堆叠的值与当前累积的堆叠值具有相同的正负符号时才堆叠。
-+ `'all'` 堆叠所有的值,不管当前或累积的堆叠值的正负符号是什么。
-+ `'positive'` 只堆积正值。
-+ `'negative'` 只堆叠负值。
-
-## stackOrder(string) = 'seriesAsc'
-
-{{ use: partial-version(
- version = '6.0.0'
+{{ use: partial-stack(
+ componentNameInLink = 'bar'
) }}
-堆叠顺序。可选值:
-+ `'seriesAsc'`(默认,系列顺序堆叠)
-+ `'seriesDesc'`(反向堆叠)
-
-**注意:** `stackOrder` 应该为所有具有相同 `stack` 名称的系列定义。如果只为部分系列定义
`stackOrder`,当某些系列被隐藏(如通过图例切换)时,可能会导致堆叠顺序发生意外变化。
-
-当前不支持极坐标系。
-
## sampling(string)
柱状图在数据量远大于像素点时候的降采样策略,开启后可以有效的优化图表的绘制效率,默认关闭,也就是全部绘制不过滤数据点。
diff --git a/zh/option/series/line.md b/zh/option/series/line.md
index b45cfc10..20d3bb0e 100644
--- a/zh/option/series/line.md
+++ b/zh/option/series/line.md
@@ -86,43 +86,10 @@ const option = {
{{ use: partial-legend-hover-link() }}
-## stack(string) = null
-
-数据堆叠,同个类目轴上系列配置相同的 `stack` 值可以堆叠放置。关于如何定制数值的堆叠方式,参见
[stackStrategy](~series-line.stackStrategy)。
-
-注:目前 `stack` 只支持堆叠于 `'value'` 和 `'log'` 类型的类目轴上,不支持 `'time'` 和 `'category'`
类型的类目轴。
-
-下面示例可以通过右上角 [toolbox](~toolbox) 中的堆叠切换看效果:
-
-~[600x400](${galleryViewPath}doc-example/line-stack-tiled&edit=1&reset=1)
-
-## stackStrategy(string) = 'samesign'
-
-{{ use: partial-version(
- version = '5.3.3'
-) }}
-
-堆积数值的策略,前提是[stack](~series-line.stack)属性已被设置。其值可以是:
-
-+ `'samesign'` 只在要堆叠的值与当前累积的堆叠值具有相同的正负符号时才堆叠。
-+ `'all'` 堆叠所有的值,不管当前或累积的堆叠值的正负符号是什么。
-+ `'positive'` 只堆积正值。
-+ `'negative'` 只堆叠负值。
-
-## stackOrder(string) = 'seriesAsc'
-
-{{ use: partial-version(
- version = '6.0.0'
+{{ use: partial-stack(
+ componentNameInLink = 'line'
) }}
-堆叠顺序。可选值:
-+ `'seriesAsc'`(默认,系列顺序堆叠)
-+ `'seriesDesc'`(反向堆叠)
-
-**注意:** `stackOrder` 应该为所有具有相同 `stack` 名称的系列定义。如果只为部分系列定义
`stackOrder`,当某些系列被隐藏(如通过图例切换)时,可能会导致堆叠顺序发生意外变化。
-
-当前不支持极坐标系。
-
{{ use: partial-cursor() }}
## connectNulls(boolean) = false
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]