DEV Community

Discussion on: ChartJS with Rails 6 and Webpacker

Collapse
 
alexreservationgenie profile image
Alex Key

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