Add support for two y Axes
When trying to add a second axis on the right side of the canvas, the error bars disappear
Hi @luksal, can you be a bit more specific, e.g. prepare a codepen based on https://codepen.io/sluger/pen/YjJKYy
Here you go: https://codepen.io/anon/pen/LKmZYo
can you try https://github.com/sgratzl/chartjs-chart-error-bars since it is based on the regular chart types you should have no problem with a second axis
This looks like the problem I've just been bitten by for a while.
The scale/axis ID to look at is hardcoded:
var vScale = horizontal ? chart.scales['x-axis-0'] : chart.scales['y-axis-0'];
... so if you rename it (as you have, and as I did) then it will explode - I was getting Uncaught TypeError: vScale is undefined
If you either don't give it an ID so it gets the default, or explicitly give it the ID y-axis-0, then it works, at least for me.
It would be nice if the plugin checked for the presence of the axis ID and logged a helpful message if it didn't... or even better supported multiple axes and determined which to use based on the dataset. As it stands, I think if you try to apply error bars to a second dataset which has a different axis, if it works at all the values will be plotted incorrectly, because they'd reference y-axis-0, not the axis appropriate for that dataset.