# Creating Live Data Graphs on Thunkable

**URL:** https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463
**Category:** Questions about Thunkable X
**Created:** [November 19, 2021, 9:16am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463 "2021-11-19T09:16:12Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [November 23, 2021, 7:23pm UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/21 "2021-11-23T19:23:10Z")

</div>

I would like to create a similar graph to this, I have created this using quickchat io by keying in the labels for the dataset and also keying in the dataset. However, for my Thunkable project, I am creating a productivity monitor which shows the estimated duration process time (taken from google sheets) and the actual duration process time to be the time output using the timer feature by storing the amount of time taken. Hence, I would like to create a graph whereby I will be able to show the estimated duration VS actual duration taken.

 ![Screenshot 2021-11-24 at 3.19.36 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/2/827b70ea5cbbd2e1370b076db2086c9ae8d30330.jpeg)

---

<div class="post-metadata">

### Author: ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)
#### Post date: [November 24, 2021, 10:43am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/22 "2021-11-24T10:43:11Z")

</div>

i don’t think you can have it live, in the sense that chart is slowly moving to the left while new points appear on the right. however you can use the technique of @tatiang and recompute the chart when you press a button marked “Chart Now”. simply replace new values in the datasets with whatever came from the stored timer captures and the durations from the spreadsheet.- for the most current time period.

---

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [November 24, 2021, 10:59am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/23 "2021-11-24T10:59:53Z")

</div>

![Screenshot 2021-11-24 at 6.55.42 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/6/067d5c3afe7504a9688c55170236e1abb24e2e17.jpeg) - my thunkable project  
![Screenshot 2021-11-24 at 6.59.18 PM|690x432] (upload://m8FTOssX1Gvaw4eW0idt4FvatvY.jpeg) - @tatiang thunkable project

Hi, I am using the drag and drop interface. However, the project that @tatiang has made, not using the drag and drop interface. Hence, I do not have the web API function the same as him. May I ask if there are any solutions to this?

---

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [November 24, 2021, 11:01am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/24 "2021-11-24T11:01:31Z")

</div>

sorry, the screenshot did not go through for @tatiang thunkable project.  
this is his project’s version

 ![Screenshot 2021-11-24 at 6.59.18 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/b/9b2ae3f2a701a54039aed46cc573da9fb771ad32.jpeg)

---

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [November 24, 2021, 2:46pm UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/25 "2021-11-24T14:46:37Z")

</div>

@jared will it be okay if you look through my queries 😀

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [November 24, 2021, 2:56pm UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/26 "2021-11-24T14:56:04Z")

</div>

Have you followed along with the video series that I’ve posted?

> [@\[Tutorial\] Dynamic interactive charts](https://community.thunkable.com/t/tutorial-dynamic-interactive-charts/563880):
>
> I wanted to post this example for those who are making quiz apps or study apps. The ability to see your progress visually is uber important. This is why we have charts in the first place. seeItLive incorporating charts in the past has been difficult. Here is an easy example you can fork or use yourself to incorporate a correct/incorrect chart into your app. This is based on the standard celebration chart that is used in the world of Precision Teaching and Applied Behavior Analysis. This allows…

If you follow along, you should be able to create the demo chart

---

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [November 24, 2021, 4:25pm UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/27 "2021-11-24T16:25:44Z")

</div>

Yes sir i did however it does not show a graph when I created it

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [November 24, 2021, 4:42pm UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/28 "2021-11-24T16:42:42Z")

</div>

If you want to share the html file you’re using, I can take a peek at some point.

for example,

```auto
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js"> <!--<![endif]-->
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="https://cdn.jsdelivr.net/npm/c3@0.7.20/c3.min.js"></script>
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/c3@0.7.20/c3.min.css">
        <script src="https://d3js.org/d3.v5.min.js"></script>
        <script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js" type="text/javascript"></script>
    </head>
    <body>
        <div id="chart"></div>
        
        <script>
var chart = c3.generate({
    data: {
        columns: [
            ['data1']
        ]
    },
    axis: {
        x: {
            type: 'category',
            categories: []
        },
        y: {
            max:100,
            min:0,
            padding:0
        }
    }
});

ThunkableWebviewerExtension.receiveMessage(function(message) {

var thunkData = JSON.parse(message);

var xValues = thunkData.xvalues;
var yvalues = thunkData.yvalues;
var chartName = thunkData.chartName;
var chartMax = thunkData.max;
var chartMin = thunkData.min;

chart.load({
    columns:[['data1'].concat(yvalues)],
    categories:xValues,
    names: {data1:chartName},
});

chart.axis.max(chartMax)
chart.axis.min(chartMin)

});

        </script>
    </body>
</html>

```

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [November 24, 2021, 4:59pm UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/29 "2021-11-24T16:59:36Z")

</div>

@teamzaddysn9m may I revert you back to post #4 where I suggest you use something similar to what @tatiang demonstrated and shared the project.

Yes, there is a delay but this delay is part of a second and can be a whole second or a bit over a second in slow links but this is more than sufficient for the graph you shared.

Anyway, even if you don’t see it fit for this specific purpose it is always a good idea to learn more than one way to achieve the same thing.

This just an opinion.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [November 24, 2021, 9:03pm UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/30 "2021-11-24T21:03:16Z")

</div>

I’m not in my computer so can’t really post a screenshot but if you need the API component, it’s in the Advanced drawer.

---

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [November 26, 2021, 5:43am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/31 "2021-11-26T05:43:18Z")

</div>

@tatiang Hi i have tried to modify your project to suit my project. However I have query with regards to this part shown in the screenshot I have attached. I am unsure where the % has come up from.  
Hence may I ask why is there %?

 ![Screenshot 2021-11-26 at 1.41.06 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/3/a3206dd154bcba875a1707495ba6c71e2690e03b.png)

---

<div class="post-metadata">

### Author: ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)
#### Post date: [November 26, 2021, 6:28am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/32 "2021-11-26T06:28:20Z")

</div>

%27 is the hexadecimal (aka ASCII) code for the apostrophe (aka single quote). in this case it is used to delimit a variaible, here, it’s a date. The join block is concatenating several string segments together so if you peek at the string, the middle part will show

`... datasets:[{label:'2021-11-25',data:[...`

---

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [November 26, 2021, 8:10am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/33 "2021-11-26T08:10:20Z")

</div>

Hi, may I ask if you know how @tatiang did the graph on [quickchart.io](http://quickchart.io)? How did he connect the graph to be able to reflect the dataset in the project? I am currently using google sheets instead of creating my own table like @tatiang [Screenshot 2021-11-26 at 4.07.20 PM|634x474](https://community.thunkable.com/uploads/short-url/o9y2XMmras1fDcG6csxKOmpGERs.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [November 26, 2021, 8:30am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/34 "2021-11-26T08:30:01Z")

</div>

The function called `refresh chart` in my demo is where I pull the data from the local data source. The top part of the function is where I get the specific row of data:

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

You could just as easily use Google Sheets or Airtable. You just connect that data source to your project and use the Data Sources blocks to pull the info you need.

---

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [November 26, 2021, 9:30am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/35 "2021-11-26T09:30:41Z")

</div>

May I also ask, will it be possible for you to explain this “make text from list” block? Thank you.

 ![Screenshot 2021-11-26 at 5.29.29 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/6/36b7e3ffe7acb627f48f55ca83bdf570a83bd1fb.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [November 26, 2021, 5:15pm UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/36 "2021-11-26T17:15:13Z")

</div>

Sure! First, I’m getting the row object from the data source. Because it’s an object, I have to use the `get property of object` blocks to retrieve individual data.

So I’m taking each property’s value (e.g. the “Sleep” value might be 3) and creating a text string separated by commas (e.g. “3,2,4,4,2”). This is just to provide [quickchart.io](http://quickchart.io) with a properly formatted url.

An example of a [quickchart.io](http://quickchart.io) url is:

[https://quickchart.io/chart?bkg=white&c={type:'bar',data:{labels:["Exercise","Sleep","Stress","Nutrition","Social"],datasets:[{label:'Users',data:[120,60,50,180,120]}](https://quickchart.io/chart?bkg=white&c=%7Btype:%27bar%27,data:%7Blabels:%5B%22Exercise%22,%22Sleep%22,%22Stress%22,%22Nutrition%22,%22Social%22%5D,datasets:%5B%7Blabel:%27Users%27,data:%5B120,60,50,180,120%5D%7D)]}}

**Edit:** reposting url in a different format because the forum code appears to break the one directly above this.

```auto
https://quickchart.io/chart?bkg=white&c={type:%27bar%27,data:{labels:[%22Exercise%22,%22Sleep%22,%22Stress%22,%22Nutrition%22,%22Social%22],datasets:[{label:%27Users%27,data:[120,60,50,180,120]}]}}

```

You’ll notice that the “data” section contains values separated by commas (120,60,50,180,120). This is basically what I’ve created using the `join` block in Thunkable.

---

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [December 1, 2021, 5:48am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/37 "2021-12-01T05:48:34Z")

</div>

Hi sorry but the website you have attached is not accessible.

---

<div class="post-metadata">

### Author: ![teamzaddysn9m](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@teamzaddysn9m](https://community.thunkable.com/u/teamzaddysn9m)
#### Post date: [December 1, 2021, 5:50am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/38 "2021-12-01T05:50:11Z")

</div>

May i also ask for the datas keyed in, did you manually key it in or?

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 1, 2021, 6:17am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/39 "2021-12-01T06:17:18Z")

</div>

> [@teamzaddysn9m](#):
>
> Hi sorry but the website you have attached is not accessible.

Try the one I just posted in the comment above.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [December 1, 2021, 6:17am UTC](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463/40 "2021-12-01T06:17:59Z")

</div>

Yes, I manually entered the data values.

[Previous page](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463.md?page=1)

[Next page](https://community.thunkable.com/t/creating-live-data-graphs-on-thunkable/1624463.md?page=3)
