Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Adding/Removing Datasets On Bar Samples Does Not Work As Expected #5662

Closed
TPullen21 opened this issue Aug 6, 2018 · 1 comment
Closed

Comments

@TPullen21
Copy link
Contributor

When viewing the samples for vertical and horizontal bar charts I noticed there's two issues, one with adding datasets and the other with removing datasets.

The issue with adding datasets can be seen straight away when adding a new dataset:

screen shot 2018-08-06 at 10 32 04

When creating the number for the name of the dataset, it doesn't take into account 0 indexing of the dataset array.

The problem with removing datasets is that it removes the first element of the array ".splice(0,1)". However by doing this, you also mess up the naming scheme of the datasets. This can lead to a very strange scenario when mixed with the adding dataset issue:

screen shot 2018-08-06 at 10 35 52

This was achieved by adding datasets up to 'Dataset 4' and then removing and adding a dataset in turn until all the datasets are 'Dataset 4'.

URLs for quick reference:

http://www.chartjs.org/samples/latest/charts/bar/vertical.html
http://www.chartjs.org/samples/latest/charts/bar/horizontal.html

@simonbrunel
Copy link
Member

Fixed by #5663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants