apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.59k stars 19.62k forks source link

[Feature] dataZoom component add an option to disable downsampling #20182

Open zkycaesar opened 3 months ago

zkycaesar commented 3 months ago

What problem does this feature solve?

I find that dataZoom always do a downsampling, but the result may not always accurate.

The container div of my chart is resizable. When I resize it, the dataZoom will change. See pictures below:

image image image

When the chart width grows, the dataZoom switch between two different patterns.

This could be confusing for my users. I assume this is caused by the downsampling algo. So I would like to have a option to toggle the downsampling.

What does the proposed API look like?

Add an option to toggle dataZoom downsampling.

Ovilia commented 3 months ago

Please try with different sampling methods and see which one can preserve the pattern best. Due to performance consideration, sampling can't be disabled for now.

zkycaesar commented 3 months ago

Please try with different sampling methods and see which one can preserve the pattern best. Due to performance consideration, sampling can't be disabled for now.

@Ovilia I don't see any sampling option in dataZoom. Are you saying that series and dataZoom are using the same samping method? But I don't want my series to be downsampled.

Anyway, I plan to implement my own dataZoom by using graphic.

Ovilia commented 3 months ago

Sorry that I didn't see carefully. It seems that dataZoom only uses a fixed interval when deciding data to show. There may not be an easy way to apple the series's sampling method to the dataZoom.