Awesome write up! I didn't think about using a dataset on the canvas to store the labels/data. Have you used that method on a larger dataset? I'm working on it now, but wasn't sure if there would be any problems.
Before I always used an ajax call to hit an endpoint that returns the data so I definitely like this method better.
Also, I was getting undefined using ctx.canvas so I just used ctx.dataset.data
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Awesome write up! I didn't think about using a dataset on the canvas to store the labels/data. Have you used that method on a larger dataset? I'm working on it now, but wasn't sure if there would be any problems.
Before I always used an ajax call to hit an endpoint that returns the data so I definitely like this method better.
Also, I was getting undefined using ctx.canvas so I just used ctx.dataset.data