diff --git a/en/option/component/data-zoom-slider.md b/en/option/component/data-zoom-slider.md index 20edd329..b0f78139 100644 --- a/en/option/component/data-zoom-slider.md +++ b/en/option/component/data-zoom-slider.md @@ -280,3 +280,6 @@ Style when highlighted. prefix = "###" ) }} +{{ use: partial-series-sampling }} + ++ `'none'` Use simple sampling strategy (default) diff --git a/en/option/partial/series-sampling.md b/en/option/partial/series-sampling.md new file mode 100644 index 00000000..06aec310 --- /dev/null +++ b/en/option/partial/series-sampling.md @@ -0,0 +1,14 @@ + +{{ target: partial-series-sampling }} + +## 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. + +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 (Since `v5.5.0`) ++ `'sum'` Use sum of filter points diff --git a/en/option/series/line.md b/en/option/series/line.md index 3bdfc4cb..0078a20d 100644 --- a/en/option/series/line.md +++ b/en/option/series/line.md @@ -297,17 +297,7 @@ Here are 2 examples of broken line chart with dual value axis, showing the diffe ![300xauto](~smooth-monotone-x.png) -## 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. - -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 (Since `v5.5.0`) -+ `'sum'` Use sum of filter points +{{ use: partial-series-sampling }} {{ use: partial-series-dimensions( prefix = "#" diff --git a/zh/option/component/data-zoom-slider.md b/zh/option/component/data-zoom-slider.md index 1dd383e9..327f981d 100644 --- a/zh/option/component/data-zoom-slider.md +++ b/zh/option/component/data-zoom-slider.md @@ -312,3 +312,6 @@ dataZoom-slider 组件的高度。水平布局默认 30,竖直布局默认自 prefix = "###" ) }} +{{ use: partial-series-sampling }} + ++ `'none'` 更简单的取过滤点方法, 速度最快 (默认值) \ No newline at end of file diff --git a/zh/option/partial/series-sampling.md b/zh/option/partial/series-sampling.md new file mode 100644 index 00000000..d8ac1516 --- /dev/null +++ b/zh/option/partial/series-sampling.md @@ -0,0 +1,14 @@ + +{{ target: partial-series-sampling }} + +## sampling(string) + +折线图在数据量远大于像素点时候的降采样策略,开启后可以有效的优化图表的绘制效率,默认关闭,也就是绘制全部的数据点,不进行过滤。 + +可选: ++ `'lttb'` 采用 Largest-Triangle-Three-Bucket 算法,可以最大程度保证采样后线条的趋势,形状和极值。 ++ `'average'` 取过滤点的平均值 ++ `'min'` 取过滤点的最小值 ++ `'max'` 取过滤点的最大值 ++ `'minmax'` 取过滤点绝对值的最大极值 (从 `v5.5.0` 开始支持) ++ `'sum'` 取过滤点的和 diff --git a/zh/option/series/line.md b/zh/option/series/line.md index a8a7bfc3..686e7597 100644 --- a/zh/option/series/line.md +++ b/zh/option/series/line.md @@ -326,17 +326,7 @@ const option = { ![300xauto](~smooth-monotone-x.png) -## sampling(string) - -折线图在数据量远大于像素点时候的降采样策略,开启后可以有效的优化图表的绘制效率,默认关闭,也就是全部绘制不过滤数据点。 - -可选: -+ `'lttb'` 采用 Largest-Triangle-Three-Bucket 算法,可以最大程度保证采样后线条的趋势,形状和极值。 -+ `'average'` 取过滤点的平均值 -+ `'min'` 取过滤点的最小值 -+ `'max'` 取过滤点的最大值 -+ `'minmax'` 取过滤点绝对值的最大极值 (从 `v5.5.0` 开始支持) -+ `'sum'` 取过滤点的和 +{{ use: partial-series-sampling }} {{ use: partial-series-dimensions( prefix = "#"