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
Starting from version 2.7.0 'Bar chart' have changed the logic of showing data values: if there is only one value inside dataset.data the chart spreads the data on full width.
It looks like a bug to me, it would behave like that if you specified your data as [{y: 2, t: date}] but in your case your data is an array that should map to your labels. Actually, if you add one data value, it works as expected data: [2,0], so I guess there is a special case that handles a single data value which is bugged.
Starting from version 2.7.0 'Bar chart' have changed the logic of showing data values: if there is only one value inside dataset.data the chart spreads the data on full width.
Expected Behavior
" If these are set to an array value, the first value applies to the first bar, the second value to the second bar, and so on."(http://www.chartjs.org/docs/latest/charts/bar.html)
The example with Chartjs version 2.6.0: https://codepen.io/GTDunk/pen/gXpPwJ
Current Behavior
The example with Chartjs version 2.7.1: https://codepen.io/GTDunk/pen/pdzYvJ
Possible Solution
How about a flag which could change the behavior?
Environment
The text was updated successfully, but these errors were encountered: