Skip to content

doc: add stackPercent apache/echarts#20910 #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions en/option/series/bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ How to stack values if the [stack](~series-bar.stack) property has been set. Opt
+ `'positive'`: only stack positive values.
+ `'negative'`: only stack negative values.

## stackPercent(boolean) = false

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

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.

## 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.
Expand Down
6 changes: 6 additions & 0 deletions en/option/series/line.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ How to stack values if the [stack](~series-line.stack) property has been set. Op

{{ use: partial-cursor() }}

## stackPercent(boolean) = false

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

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.

## connectNulls(boolean) = false

<ExampleUIControlBoolean />
Expand Down
6 changes: 6 additions & 0 deletions zh/option/series/bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ option = {
+ `'positive'` 只堆积正值。
+ `'negative'` 只堆叠负值。

## stackPercent(boolean) = false

启用此选项并使用 `stack` 后,堆叠值将被标准化为每个类别总计的百分比。每个堆叠值的总和将达到 100%。

原始值和标准化百分比都将显示在工具提示中。使用 `params.percent` 可在工具提示和标签格式化程序中访问标准化值。

## sampling(string)

柱状图在数据量远大于像素点时候的降采样策略,开启后可以有效的优化图表的绘制效率,默认关闭,也就是全部绘制不过滤数据点。
Expand Down
6 changes: 6 additions & 0 deletions zh/option/series/line.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ const option = {

{{ use: partial-cursor() }}

## stackPercent(boolean) = false

启用此选项并使用 `stack` 后,堆叠值将被标准化为每个类别总计的百分比。每个堆叠值的总和将达到 100%。

原始值和标准化百分比都将显示在工具提示中。使用 `params.percent` 可在工具提示和标签格式化程序中访问标准化值。

## connectNulls(boolean) = false

<ExampleUIControlBoolean />
Expand Down