chartjs-plugin-error-bars icon indicating copy to clipboard operation
chartjs-plugin-error-bars copied to clipboard

Allow for linear/date scales on line charts

Open npirlot opened this issue 7 years ago • 2 comments

Hi,

Would you consider index-based errorBars data, rather than currently only supporting key based (even if you have tree models)?

I have a line chart, with a linear scale, where the labels are generated by using the Date() of the data row. This makes it impossible to use keys for the errorBars data.

I managed to get the plugin working as I needed by changing "dataset.forEach((bar) => {" to "dataset.forEach((bar, ii) => {" on line 191, and then adding this after line 204: } else if (!hasLabelProperty && cur[ii]) { errorBarData = cur[ii];

Thanks

npirlot avatar Apr 17 '19 10:04 npirlot

Thanks for the suggestion. I'll have a look tomorrow or at the start of the next week.

sluger avatar Apr 18 '19 18:04 sluger

can you give https://github.com/sgratzl/chartjs-chart-error-bars a try? it uses a different data structure

sgratzl avatar Sep 19 '19 22:09 sgratzl