echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] Datazoom bar in time chart does not accurately reflect chart if data is distributed evenly across time

Open luukvnes opened this issue 1 year ago • 6 comments

Version

5.2.2

Link to Minimal Reproduction

https://jsfiddle.net/zecv4mhy/

Steps to Reproduce

  1. Create a time chart that uses DataZoom.
  2. Use time series data that does not have equal size steps between each data point.

Current Behavior

Currently the datazoom bar view is scaled to the points, meaning that the 50th% point is in the middle of the bar, however this is not how the chart itself functions, there the 50th% point in terms of time is in the middle of the chart. Selecting a part of the chart already works as expected, e.g. 90%-100% means that the last 10% of time is shown.

image

Expected Behavior

The data zoom shows the correct line corresponding to the graph (like the basic example below.) image

Environment

- OS:Linux
- Browser: Chrome
- Framework: -

Any additional comments?

No response

luukvnes avatar Sep 25 '24 10:09 luukvnes

Minimal Reproduction is not relevant to issue, has no dataZoom...

helgasoft avatar Sep 27 '24 00:09 helgasoft

Sorry I forgot to save the jsfiddle. This is the new version. (I also updated the original text) https://jsfiddle.net/zecv4mhy/

luukvnes avatar Sep 27 '24 06:09 luukvnes

duplicate of #19930, also see #18754, #19255, etc. The example is very good though. You found the cause of the problem - "time series data that does not have equal size steps between data points"

helgasoft avatar Sep 27 '24 06:09 helgasoft

暗室逢灯

purpletastes avatar Oct 10 '24 06:10 purpletastes

暗室逢灯

1111

purpletastes avatar Oct 10 '24 06:10 purpletastes

Sorry I forgot to save the jsfiddle. This is the new version. (I also updated the original text) https://jsfiddle.net/zecv4mhy/

purpletastes avatar Oct 10 '24 11:10 purpletastes