Skip to content
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

feat(sampler): add min-max sampler function #374

Merged
merged 3 commits into from
Nov 30, 2023
Merged
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
5 changes: 3 additions & 2 deletions en/option/series/bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,14 @@ How to stack values if the [stack](~series-bar.stack) property has been set. Opt

## sampling(string)

The dowmsampling 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.
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.

Options:
+ `'lttb'` Use Largest-Triangle-Three-Bucket algorithm to filter points. It will keep the trends and extremas.
+ `'average'` Use average value of filter points
+ `'max'` Use maximum value of filter points
+ `'min'` Use minimum value of filter points
+ `'max'` Use maximum value of filter points
+ `'minmax'` Use maximum extremum absolute value of filter points (Since `v5.5.0`)
+ `'sum'` Use sum of filter points

{{ use: partial-cursor() }}
Expand Down
5 changes: 3 additions & 2 deletions en/option/series/line.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,14 @@ Here are 2 examples of broken line chart with dual value axis, showing the diffe

## sampling(string)

The dowmsampling 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.
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.

Options:
+ `'lttb'` Use Largest-Triangle-Three-Bucket algorithm to filter points. It will keep the trends and extremas.
+ `'average'` Use average value of filter points
+ `'max'` Use maximum value of filter points
+ `'min'` Use minimum value of filter points
+ `'max'` Use maximum value of filter points
+ `'minmax'` Use maximum extremum absolute value of filter points (Since `v5.5.0`)
+ `'sum'` Use sum of filter points

{{ use: partial-series-dimensions(
Expand Down
3 changes: 2 additions & 1 deletion zh/option/series/bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ option = {
可选:
+ `'lttb'` 采用 Largest-Triangle-Three-Bucket 算法,可以最大程度保证采样后线条的趋势,形状和极值。
+ `'average'` 取过滤点的平均值
+ `'max'` 取过滤点的最大值
+ `'min'` 取过滤点的最小值
+ `'max'` 取过滤点的最大值
+ `'minmax'` 取过滤点绝对值的最大极值 (从 `v5.5.0` 开始支持)
+ `'sum'` 取过滤点的和

{{ use: partial-cursor() }}
Expand Down
3 changes: 2 additions & 1 deletion zh/option/series/line.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,9 @@ const option = {
可选:
+ `'lttb'` 采用 Largest-Triangle-Three-Bucket 算法,可以最大程度保证采样后线条的趋势,形状和极值。
+ `'average'` 取过滤点的平均值
+ `'max'` 取过滤点的最大值
+ `'min'` 取过滤点的最小值
+ `'max'` 取过滤点的最大值
+ `'minmax'` 取过滤点绝对值的最大极值 (从 `v5.5.0` 开始支持)
+ `'sum'` 取过滤点的和

{{ use: partial-series-dimensions(
Expand Down
Loading