You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-> Bar should be displayed like before the 2.7.2 bar-size feature.
Context
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:
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 scale.time.round: 'day' which "gathers" many values under the same time (label):
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 barThickness: 'flex'. You can also enforce a specific bar size (e.g. barThickness: 42) but it doesn't match well if your chart is responsive.
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 15, 19, 15, 15, 19 are all under "2018-11-05T00:00:00.000Z", how these values should be displayed?
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: