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
So I had some issues with previous versions of Chartjs (namely 2.5) when I was working with a combo chart (bar + line) and had difficulties with time-series data.
For context, I'm using financial data (stock price and volume). Since the market is only open 5 days a week, there is a "gap" in the data. I don't worry too much about this gap, but when using Chartjs's re-written functionality for time-series data, the width of the bars becomes irregular. Here's an example:
You can see that each "Friday" and "Monday" of data, the bars get larger to compensate for the gap. The xAxes code that creates this is:
Now if I remove the type: time distinction, I get the standard bars, but the labels are pulling straight from my data, rather than being parsed as dates and correctly managed by Moment.js:
....
To sum it up: how can I get regular-spaced bars when my data is not regularly linear while utilizing Chartjs's time-series axises? Is this a bug?
The text was updated successfully, but these errors were encountered:
At least similar issues have been reported before. I'm not sure if they're all exactly the same, but there have been a handful of recent bugs filed against the bar chart such as #4911, #4745, #4825. We should really change the default bar chart behavior so that all bars are equal width.
So I had some issues with previous versions of Chartjs (namely 2.5) when I was working with a combo chart (bar + line) and had difficulties with time-series data.
For context, I'm using financial data (stock price and volume). Since the market is only open 5 days a week, there is a "gap" in the data. I don't worry too much about this gap, but when using Chartjs's re-written functionality for time-series data, the width of the bars becomes irregular. Here's an example:
You can see that each "Friday" and "Monday" of data, the bars get larger to compensate for the gap. The
xAxes
code that creates this is:Now if I remove the type:
time
distinction, I get the standard bars, but the labels are pulling straight from my data, rather than being parsed as dates and correctly managed by Moment.js:....
To sum it up: how can I get regular-spaced bars when my data is not regularly linear while utilizing Chartjs's time-series axises? Is this a bug?
The text was updated successfully, but these errors were encountered: