datadoge
Posts: 27
Joined: Sat Aug 28, 2021 11:34 pm

Sparkline dynamically from json

Hi, I want to create a sparkline chart where the amount of rows is not hardcoded but adjusted dynamically according to the data given in a json file (the complete data is in the json and the number of entries defines the number of sparkline rows). Could you help me with a MWE? Thanks!
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Sparkline dynamically from json

Hello,

Thanks for contacting us with your question!

You can just add data to the table before initiating the chart.

Demo: https://jsfiddle.net/BlackLabel/vsznhkt7/

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
datadoge
Posts: 27
Joined: Sat Aug 28, 2021 11:34 pm

Re: Sparkline dynamically from json

Thanks, that's perfect!
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Sparkline dynamically from json

You're welcome!

Feel free to ask any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Usage”