-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
[BUG] Regression between 2.7.1 an 2.7.2 in bar charts with timescale #5844
Comments
I don't think it's a regression because the behavior of 2.7.1 was reported as a bug. But you are right, the new default bar sizing introduced in #4994 doesn't play well with your use case because it computes an "optimal" bar size applied to all bars (which is the smallest bar). The first issue is with "labels": [ // After round: 'day'
"2018-11-05T11:04:37.865Z", // "2018-11-05T00:00:00.000Z"
"2018-11-05T11:05:50.558Z", // "2018-11-05T00:00:00.000Z"
"2018-11-05T14:53:26.406Z", // "2018-11-05T00:00:00.000Z"
"2018-11-05T17:59:48.976Z", // "2018-11-05T00:00:00.000Z"
"2018-11-05T18:29:35.971Z", // "2018-11-05T00:00:00.000Z"
"2018-11-06T11:36:27.035Z", // "2018-11-06T00:00:00.000Z"
"2018-11-08T15:39:34.064Z", // "2018-11-08T00:00:00.000Z"
"2018-11-08T17:11:55.357Z", // "2018-11-08T00:00:00.000Z"
"2018-11-08T17:25:04.808Z", // "2018-11-08T00:00:00.000Z"
] For example, the distance between the first and second bar is 0 (applied to all bars), so that's why no bar is displayed. But removing the rounding doesn't fix your issue because you still have labels with very small interval (e.g. the 2 first ones are only ~1 minute) which generate very thin bar, almost invisible. The solution depends on what you are expecting: if you want a similar result as of 2.7.1, you can use Though, I'm not sure your data are much compatible with the bar chart which tends to assume that bars of the same dataset must be side by side (i.e. don't overlap). Not sure how to interpret multiple values for the same day, for example |
I do agree that the issues come from my data input. I didn’t realized that the bar chart with a “day” round was expecting no more than 1 value per day (And it kinda makes sense). Should this generate a warning? Also didn’t noticed the very thin bars, should a minWidth system exist that would be N by default and 0 to disable? By the way, the whole library it pretty cool, and the only one out there that really does responsiveness a reality. Congrats to all. |
No bar is displayed in 2.7.2+ version for a given data input.
Expected Behavior
Bar should be displayed (should be 1 bar per day in the example)
Current Behavior
The chart is empty
Possible Solution
Don't know, but it has something to do with the 2.7.2 bar-size feature.
Steps to Reproduce (for bugs)
makeMeWork = true
at the top of the JSContext
I'm no able to diplay a bar chart of the data I can see in a line chart
Notice
The data in the chart isn't sorted with a day interval, so the issue might just mean that I'm not using bars as I should. However, in this situation, it should generate "strange" bars, or provide a warning in the console.
The text was updated successfully, but these errors were encountered: