Skip to content

Commit 590321d

Browse files
committed
docs: add sampling option to dataZoomSlider
1 parent d7d43bf commit 590321d

File tree

6 files changed

+36
-22
lines changed

6 files changed

+36
-22
lines changed

en/option/component/data-zoom-slider.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,3 +280,6 @@ Style when highlighted.
280280
prefix = "###"
281281
) }}
282282

283+
{{ use: partial-series-sampling }}
284+
285+
+ `'none'` Use simple sampling strategy (default)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
{{ target: partial-series-sampling }}
3+
4+
## sampling(string)
5+
6+
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.
7+
8+
Options:
9+
+ `'lttb'` Use Largest-Triangle-Three-Bucket algorithm to filter points. It will keep the trends and extremas.
10+
+ `'average'` Use average value of filter points
11+
+ `'min'` Use minimum value of filter points
12+
+ `'max'` Use maximum value of filter points
13+
+ `'minmax'` Use maximum extremum absolute value of filter points (Since `v5.5.0`)
14+
+ `'sum'` Use sum of filter points

en/option/series/line.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,7 @@ Here are 2 examples of broken line chart with dual value axis, showing the diffe
297297

298298
![300xauto](~smooth-monotone-x.png)
299299

300-
## sampling(string)
301-
302-
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.
303-
304-
Options:
305-
+ `'lttb'` Use Largest-Triangle-Three-Bucket algorithm to filter points. It will keep the trends and extremas.
306-
+ `'average'` Use average value of filter points
307-
+ `'min'` Use minimum value of filter points
308-
+ `'max'` Use maximum value of filter points
309-
+ `'minmax'` Use maximum extremum absolute value of filter points (Since `v5.5.0`)
310-
+ `'sum'` Use sum of filter points
300+
{{ use: partial-series-sampling }}
311301

312302
{{ use: partial-series-dimensions(
313303
prefix = "#"

zh/option/component/data-zoom-slider.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,6 @@ dataZoom-slider 组件的高度。水平布局默认 30,竖直布局默认自
312312
prefix = "###"
313313
) }}
314314

315+
{{ use: partial-series-sampling }}
316+
317+
+ `'none'` 更简单的取过滤点方法, 速度最快 (默认值)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
{{ target: partial-series-sampling }}
3+
4+
## sampling(string)
5+
6+
折线图在数据量远大于像素点时候的降采样策略,开启后可以有效的优化图表的绘制效率,默认关闭,也就是绘制全部的数据点,不进行过滤。
7+
8+
可选:
9+
+ `'lttb'` 采用 Largest-Triangle-Three-Bucket 算法,可以最大程度保证采样后线条的趋势,形状和极值。
10+
+ `'average'` 取过滤点的平均值
11+
+ `'min'` 取过滤点的最小值
12+
+ `'max'` 取过滤点的最大值
13+
+ `'minmax'` 取过滤点绝对值的最大极值 (从 `v5.5.0` 开始支持)
14+
+ `'sum'` 取过滤点的和

zh/option/series/line.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -326,17 +326,7 @@ const option = {
326326

327327
![300xauto](~smooth-monotone-x.png)
328328

329-
## sampling(string)
330-
331-
折线图在数据量远大于像素点时候的降采样策略,开启后可以有效的优化图表的绘制效率,默认关闭,也就是全部绘制不过滤数据点。
332-
333-
可选:
334-
+ `'lttb'` 采用 Largest-Triangle-Three-Bucket 算法,可以最大程度保证采样后线条的趋势,形状和极值。
335-
+ `'average'` 取过滤点的平均值
336-
+ `'min'` 取过滤点的最小值
337-
+ `'max'` 取过滤点的最大值
338-
+ `'minmax'` 取过滤点绝对值的最大极值 (从 `v5.5.0` 开始支持)
339-
+ `'sum'` 取过滤点的和
329+
{{ use: partial-series-sampling }}
340330

341331
{{ use: partial-series-dimensions(
342332
prefix = "#"

0 commit comments

Comments
 (0)