JSON looper for cornerstone charts

I see several videos explaining how to use Cornerstone Charts, but there is no video showing how to work with a JSON looper. I want to have a line chart with two lines, and want to feed it with a JSON.

Can you please link to the documentation? Or share a JSON template?

I’ll post a JSON input chart below.

http://theme.co/app/uploads/share/charts/json-chart.tco

The GraphQL chart is going to work pretty much the same as a JSON chart. Where you use {{dc:looper:field key="value"}}. Where value is the key in your JSON you are trying to access. Let us know if this helps.

https://www.youtube.com/watch?v=SSBX1kg7_HY

Still could not get it to work. I now tried CSV and for some reason that does not work either?

My CSV file is very simple:
image

I have set the labels like so:
image

And I have set the data set like so:
image

image

But for some reason, the chart plots the labels as expected, but no data is showing??

Hi Tristan,

The Looper Consumer was not enabled to the Labelset and the Dataset, it is enabled now and showing the data as expected.

Thanks

1 Like

:man_facepalming:

OMG how could i have overlooked that. Thanks!

Hi Tristan,

Glad that we are able to help you.

Thanks

One more question though…

How do i get two lines to appear in the chart?

I have enabled two data consumers, but only one is showing;

image

Create another Dataset and put your second Data into this other Dataset. Like in this screenshot. Let us know if this helps and have a great day.

image

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.