Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bar timeseries chart binning is not working as expected #16099

Open
th1under opened this issue Nov 23, 2021 · 3 comments
Open

Bar timeseries chart binning is not working as expected #16099

th1under opened this issue Nov 23, 2021 · 3 comments
Labels
Milestone

Comments

@th1under
Copy link

Version

5.2.2

Reproduction link

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

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

image

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

(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

@echarts-bot
Copy link

echarts-bot bot commented Nov 23, 2021

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.

A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe to our mailing list.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Nov 23, 2021
@Ovilia
Copy link
Contributor

Ovilia commented Nov 29, 2021

This is not a bug but currently the time series lack the ability to control bar width in the unit of value (time). But since more people are asking for the binning of time series, we decided to make this feature in v5.4.

@helgasoft
Copy link

Bar width could be controlled by barMaxWidth - Demo v.5.2.2.
Unfortunately v.5.2.2 is the last version showing bars at the right time (X-axis location). And only with (redundant!) stack present.
Newer versions treat time axis similarly to category axis and try to "make space" for adjacent series which makes horizontal position inaccurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants