From f5b94e8bb735c670eaea058c14f2f772116f5233 Mon Sep 17 00:00:00 2001 From: Said Nukhulov Date: Tue, 7 Nov 2023 17:29:46 +0300 Subject: [PATCH 1/3] feat(sampler): add min-max sampler function --- en/option/series/bar.md | 3 ++- en/option/series/line.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/en/option/series/bar.md b/en/option/series/bar.md index a27da5cbf..1bd5bfb04 100644 --- a/en/option/series/bar.md +++ b/en/option/series/bar.md @@ -164,8 +164,9 @@ The dowmsampling strategy used when the data size is much larger than pixel size 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 + `'sum'` Use sum of filter points {{ use: partial-cursor() }} diff --git a/en/option/series/line.md b/en/option/series/line.md index 527d33c49..a325a2dfe 100644 --- a/en/option/series/line.md +++ b/en/option/series/line.md @@ -304,8 +304,9 @@ The dowmsampling strategy used when the data size is much larger than pixel size 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 + `'sum'` Use sum of filter points {{ use: partial-series-dimensions( From b749cbdfa51885766205a88fdd05ca70ed6da1df Mon Sep 17 00:00:00 2001 From: Said Nukhulov Date: Tue, 28 Nov 2023 23:23:39 +0300 Subject: [PATCH 2/3] feat(sampler): add min-max sampler function --- zh/option/series/bar.md | 3 ++- zh/option/series/line.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zh/option/series/bar.md b/zh/option/series/bar.md index 355f0d808..491b79449 100644 --- a/zh/option/series/bar.md +++ b/zh/option/series/bar.md @@ -240,8 +240,9 @@ option = { 可选: + `'lttb'` 采用 Largest-Triangle-Three-Bucket 算法,可以最大程度保证采样后线条的趋势,形状和极值。 + `'average'` 取过滤点的平均值 -+ `'max'` 取过滤点的最大值 + `'min'` 取过滤点的最小值 ++ `'max'` 取过滤点的最大值 ++ `'minmax'` 取过滤点绝对值的最大极值 + `'sum'` 取过滤点的和 {{ use: partial-cursor() }} diff --git a/zh/option/series/line.md b/zh/option/series/line.md index c446b08b3..d4b50dc13 100644 --- a/zh/option/series/line.md +++ b/zh/option/series/line.md @@ -333,8 +333,9 @@ const option = { 可选: + `'lttb'` 采用 Largest-Triangle-Three-Bucket 算法,可以最大程度保证采样后线条的趋势,形状和极值。 + `'average'` 取过滤点的平均值 -+ `'max'` 取过滤点的最大值 + `'min'` 取过滤点的最小值 ++ `'max'` 取过滤点的最大值 ++ `'minmax'` 取过滤点绝对值的最大极值 + `'sum'` 取过滤点的和 {{ use: partial-series-dimensions( From 3b4d0223acafc64b4c03ecd51c5630e1c4261f0f Mon Sep 17 00:00:00 2001 From: plainheart Date: Thu, 30 Nov 2023 14:48:46 +0800 Subject: [PATCH 3/3] add version tip for new downsampling strategy `minmax` --- en/option/series/bar.md | 4 ++-- en/option/series/line.md | 4 ++-- zh/option/series/bar.md | 2 +- zh/option/series/line.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/en/option/series/bar.md b/en/option/series/bar.md index 1bd5bfb04..ed6208c2e 100644 --- a/en/option/series/bar.md +++ b/en/option/series/bar.md @@ -159,14 +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 + `'min'` Use minimum value of filter points + `'max'` Use maximum value of filter points -+ `'minmax'` Use maximum extremum absolute 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() }} diff --git a/en/option/series/line.md b/en/option/series/line.md index a325a2dfe..1c5c7c42e 100644 --- a/en/option/series/line.md +++ b/en/option/series/line.md @@ -299,14 +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 + `'min'` Use minimum value of filter points + `'max'` Use maximum value of filter points -+ `'minmax'` Use maximum extremum absolute 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( diff --git a/zh/option/series/bar.md b/zh/option/series/bar.md index 491b79449..47a47ec80 100644 --- a/zh/option/series/bar.md +++ b/zh/option/series/bar.md @@ -242,7 +242,7 @@ option = { + `'average'` 取过滤点的平均值 + `'min'` 取过滤点的最小值 + `'max'` 取过滤点的最大值 -+ `'minmax'` 取过滤点绝对值的最大极值 ++ `'minmax'` 取过滤点绝对值的最大极值 (从 `v5.5.0` 开始支持) + `'sum'` 取过滤点的和 {{ use: partial-cursor() }} diff --git a/zh/option/series/line.md b/zh/option/series/line.md index d4b50dc13..ea7f259d2 100644 --- a/zh/option/series/line.md +++ b/zh/option/series/line.md @@ -335,7 +335,7 @@ const option = { + `'average'` 取过滤点的平均值 + `'min'` 取过滤点的最小值 + `'max'` 取过滤点的最大值 -+ `'minmax'` 取过滤点绝对值的最大极值 ++ `'minmax'` 取过滤点绝对值的最大极值 (从 `v5.5.0` 开始支持) + `'sum'` 取过滤点的和 {{ use: partial-series-dimensions(