Skip to content

Commit 595760d

Browse files
committed
docs: add sampling option to dataZoomSlider
1 parent 7867f63 commit 595760d

File tree

6 files changed

+34
-20
lines changed

6 files changed

+34
-20
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,6 @@ Style when highlighted.
274274
prefix = "###"
275275
) }}
276276

277+
{{ use: partial-series-sampling }}
278+
279+
+ `'none'` Use simple sampling strategy (default)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
+ `'max'` Use maximum value of filter points
12+
+ `'min'` Use minimum value of filter points
13+
+ `'sum'` Use sum of filter points

en/option/series/line.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -297,16 +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 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.
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-
+ `'max'` Use maximum value of filter points
308-
+ `'min'` Use minimum value of filter points
309-
+ `'sum'` Use sum of filter points
300+
{{ use: partial-series-sampling }}
310301

311302
{{ use: partial-series-dimensions(
312303
prefix = "#"

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

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

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

zh/option/series/line.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -326,16 +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-
+ `'max'` 取过滤点的最大值
337-
+ `'min'` 取过滤点的最小值
338-
+ `'sum'` 取过滤点的和
329+
{{ use: partial-series-sampling }}
339330

340331
{{ use: partial-series-dimensions(
341332
prefix = "#"

0 commit comments

Comments
 (0)