apache / apache/echarts

Bar timeseries chart binning is not working as expected

Open
#16,099 3 comments 6 reactions 0 assignees View on GitHub
en new-feature topic: axis-time
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version
5.2.2

### Reproduction link
[https://codesandbox.io/s/echarts-zoomin-timeseries-sktvb?file=/src/App.js](https://codesandbox.io/s/echarts-zoomin-timeseries-sktvb?file=/src/App.js)

### Steps to reproduce
You can run the codesadnbox link provided and try to zoom in on each bar chart too reproduce the problem.

### What is expected?
Suppose we have three date-value pairs on (1988, 8, 3), (1988, 9, 18) and (1988, 10, 18).
It's expected that when you zoom in on each bar (for example 18/10/1988) and the user can see the actual date on the ticks, the bar should wrap around the actual date tick and it shouldn't extend to other ticks.

Zoomed-out state:

![1](https://user-images.githubusercontent.com/41207772/143027822-ae8ae1b4-2ce5-4bf4-8c44-476289df1f85.png)

Expected zoomed-in state (Zoomed in on 18/09/1988):

![image](https://user-images.githubusercontent.com/41207772/143030331-7a73e803-4add-4203-9c4f-5e726c08ff8f.png)

### What is actually happening?
The bar wraps around other dates and the actual zoomed-in state on 18/10/1988 looks like this:

![2-actual](https://user-images.githubusercontent.com/41207772/143027874-3e1adfe3-3e21-490c-8b09-e5d3a1efaf25.png)

(Which is wrong, the bar is also covering 8th and 10th month but it is counting only the data on 9th month)

---

I also provided a gif on what's happening:

![Animation3](https://user-images.githubusercontent.com/41207772/143027984-b21236d5-e9a8-4053-86de-1ce2f5ccc716.gif)

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.