Is it possible to create a dynamic range chart (using charts.js)?

I am trying to use charts.js (based on the example from the forum here) to create a dynamic chart. I want to be able to pass different ranges of data to one chart (for example… being able to either graph 1 number, or 7 numbers, or 14 numbers… into one chart.

Right now, when I use postmessage(), it only displays as many pieces of data(numbers) as there are labels. Is there a way to send a labels array to the html object as well as the actual data array?

I really don’t want to have to create 100’s of different charts with different label arrays precoded and hide or show them constantly (although technically that would work)

Hello, Alex

Check out this article on the updated version of the tutorial you are following:

Best,
Majd