# Creating graph on Thunkable with quick chart

**URL:** <https://community.thunkable.com/t/creating-graph-on-thunkable-with-quick-chart/3414229>\
**Category:** Questions about Thunkable X\
**Created:** [December 14, 2024, 11:44am UTC](https://community.thunkable.com/t/creating-graph-on-thunkable-with-quick-chart/3414229 "2024-12-14T11:44:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![s180401caspar2zcusii](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@s180401caspar2zcusii](https://community.thunkable.com/u/s180401caspar2zcusii)\
**Post date:** [December 14, 2024, 11:44am UTC](https://community.thunkable.com/t/creating-graph-on-thunkable-with-quick-chart/3414229/1 "2024-12-14T11:44:02Z")

</div>

Hello everyone,

I am trying to create a graph in Thunkable using Quick Chart API, but I keep getting an error:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/optimized/3X/7/1/710b49adff6df476eb1d23812fe6b7cfba0d7f51_2_690x44.png)

Here is my code:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/8/48f1dbca5ec382cf9c094aa8e9d505175e66d849.png)

When I try to show the URL in a label, it shows this URL:  
[https://quickchart.io/chart?c=](https://quickchart.io/chart?c=){“type”:“bar”,“data”:{“labels”:[“Chili”,“Meatball”,“Cabbage”,“Corn”],“datasets”:{“label”:“Waste”,“data”:[1,2,3,4],“backgroundColor”:“rgb(255, 0, 0)”}},“options”:{“title”:{“display”:true,“text”:“Food waste”}}}

I think there may be an error in the code. Please reply to this post if you have dealt with this issue or have advice.  
Thank you in advance for your help!

---

<div class="post-metadata">

**Author:** ![maurizio.polverini89](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/maurizio.polverini89/32/145191_2.png) [@maurizio.polverini89](https://community.thunkable.com/u/maurizio.polverini89)\
**Post date:** [December 14, 2024, 5:24pm UTC](https://community.thunkable.com/t/creating-graph-on-thunkable-with-quick-chart/3414229/2 "2024-12-14T17:24:23Z")

</div>

> [@s180401caspar2zcusii](#):
>
> [https://quickchart.io/chart?c=](https://quickchart.io/chart?c=){“type”:“bar”,“data”:{“labels”:[“Chili”,“Meatball”,“Cabbage”,“Corn”],“datasets”:{“label”:“Waste”,“data”:[1,2,3,4],“backgroundColor”:“rgb(255, 0, 0)”}},“options”:{“title”:{“display”:true,“text”:“Food waste”}}}

Use this one instead:

```auto
https://quickchart.io/chart?c={"type":"bar","data":{"labels":["Chili","Meatball","Cabbage","Corn"],"datasets":[{"label":"Waste","data":[1,2,3,4],"backgroundColor":"rgb(255, 0, 0)"}]},"options":{"title":{"display":true,"text":"Food waste"}}}

```

Also as different solution, instead of using JSON format, you can use string texts joined together to reach the URL - i find it wasier to use, but it’s up to you

---

<div class="post-metadata">

**Author:** ![s180401caspar2zcusii](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@s180401caspar2zcusii](https://community.thunkable.com/u/s180401caspar2zcusii)\
**Post date:** [December 15, 2024, 3:47am UTC](https://community.thunkable.com/t/creating-graph-on-thunkable-with-quick-chart/3414229/4 "2024-12-15T03:47:14Z")

</div>

Thank you for your response!  
I’ve just found out the problems.

1. As you helped me to edit, I need to put the dataset inside a list
2. It doesn’t work if I directly paste it on Thunkable, that’s because of the quotation marks. It works if I replace all the double quotation marks with single quotations! (although I don’t know why it doesn’t support double quotations)

Here is my final code:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/3/e351dbc82bcad846b2db0e6e9315b71cb445bd88.png)

I still used a json formatted file to generate the link, but after that, I replaced all double quotations with single quotations.  
Instead of using the API get method, I listened to your suggestion and put the url directly to the image component.  
Then it works!  
Thank you so much!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [March 15, 2025, 3:47am UTC](https://community.thunkable.com/t/creating-graph-on-thunkable-with-quick-chart/3414229/5 "2025-03-15T03:47:53Z")

</div>

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