Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

Allow for linear/date scales on line charts #10

Closed
npirlot opened this issue Apr 17, 2019 · 2 comments
Closed

Allow for linear/date scales on line charts #10

npirlot opened this issue Apr 17, 2019 · 2 comments
Labels
type: feature New feature or request

Comments

@npirlot
Copy link

npirlot commented Apr 17, 2019

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

@sluger sluger self-assigned this Apr 18, 2019
@sluger sluger added the type: feature New feature or request label Apr 18, 2019
@sluger
Copy link

sluger commented Apr 18, 2019

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

@sluger sluger removed their assignment Jul 15, 2019
@sgratzl
Copy link
Contributor

sgratzl commented Sep 19, 2019

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

@ghost ghost closed this as completed Nov 25, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants