apache / apache/echarts

[Feature] 关于 sampling 采样细节保留的一些建议

Open
#20,618 1 comment 0 reactions 0 assignees View on GitHub
new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

我们的需求场景有2个:
1. 16个温度曲线渲染在单独的dom中,每个曲线最多可能有30000个点,每1s刷新一次数据
2. 3条曲线渲染在单独的dom中,其中2条曲线最多可能有30000个点,第3条曲线最多可能有60000个点,每500ms刷新一次数据

场景 1 要求尽量不丢失细节,对高低温位置比较敏感。目前用 5.6.0-rc.1 的新 minmax 算法,放大后可能和不采样时有所出入。
场景 2 用 5.6.0-rc.1 的新 minmax 算法基本满足需求了。

建议开启采样后,如果放大了,缩放后展示区域的点数<=最大能渲染的点数,就使用原始数据去渲染。

或者可以根据放大缩小倍数,动态采样,这样能更好保留细节。

### What does the proposed API look like?

不改变 API,或者增加可配置项。

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.