Skip to content

Commit 6d0dfdf

Browse files
committed
doc: add stackPercent echarts 20910
1 parent 2033251 commit 6d0dfdf

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

en/option/series/bar.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ How to stack values if the [stack](~series-bar.stack) property has been set. Opt
157157
+ `'positive'`: only stack positive values.
158158
+ `'negative'`: only stack negative values.
159159

160+
## stackPercent(boolean) = false
161+
162+
When enabled and `stack` is used, stacked values will be normalized as percentages of the total at each category. Each stack will add up to 100%.
163+
164+
Both the raw value and the normalized percentage will be displayed in the tooltip. Use `params.percent` to access the normalized value in tooltip and label formatters.
165+
160166
## sampling(string)
161167

162168
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.

en/option/series/line.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ How to stack values if the [stack](~series-line.stack) property has been set. Op
8383

8484
{{ use: partial-cursor() }}
8585

86+
## stackPercent(boolean) = false
87+
88+
When enabled and `stack` is used, stacked values will be normalized as percentages of the total at each category. Each stack will add up to 100%.
89+
90+
Both the raw value and the normalized percentage will be displayed in the tooltip. Use `params.percent` to access the normalized value in tooltip and label formatters.
91+
8692
## connectNulls(boolean) = false
8793

8894
<ExampleUIControlBoolean />

0 commit comments

Comments
 (0)