# Create a chart from received data

**URL:** <https://discourse.nodered.org/t/create-a-chart-from-received-data/89727>\
**Category:** General\
**Tags:** http-request\
**Created:** [24 July 2024 14:03 UTC](https://discourse.nodered.org/t/create-a-chart-from-received-data/89727 "2024-07-24T14:03:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkssudgktpdy](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@dkssudgktpdy](https://discourse.nodered.org/u/dkssudgktpdy)\
**Post date:** [24 July 2024 14:03 UTC](https://discourse.nodered.org/t/create-a-chart-from-received-data/89727/1 "2024-07-24T14:03:41Z")

</div>

Hello.

I want to get the payload I've been receiving (in real time) and make a chart through http in and template. Is it possible?

And, is this the right way to organize it?

Thank you.

 ![화면 캡처 2024-07-24 230303](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/3/03517bbe7723144af4606c518110c41d2f645fbe.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [24 July 2024 14:12 UTC](https://discourse.nodered.org/t/create-a-chart-from-received-data/89727/2 "2024-07-24T14:12:51Z")

</div>

your `hi` and `bye` endpoints are fine - they will serve up whatever is inside `template`

However, if you expect the function node to update the values in `template` then that will not work. You might need to store payload in context and use context to update the template.

As with any endpoint, they are only called when the browser makes a request (e.g. refresh/ajax)

PS: If you expect new payloads to update the chart (without the browser doing a request) this will never work. You either need to write clientside websocket and _push_ values to the client OR just use one of the contrib nodes like `@flowfuse/node-red-dashboard` or `node-red-contrib-uibuilder` and let them do all the work for you.

---

<div class="post-metadata">

**Author:** ![dkssudgktpdy](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@dkssudgktpdy](https://discourse.nodered.org/u/dkssudgktpdy)\
**Post date:** [25 July 2024 07:03 UTC](https://discourse.nodered.org/t/create-a-chart-from-received-data/89727/3 "2024-07-25T07:03:01Z")

</div>

Thank you for your answer.

So how about using a WebSocket node?

 ![화면 캡처 2024-07-25 160239](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/4/e4dfb5a153d5386de6450b45811abecf15d8c999.png)

---

<div class="post-metadata">

**Author:** ![dkssudgktpdy](https://avatars.discourse-cdn.com/v4/letter/d/ea666f/32.png) [@dkssudgktpdy](https://discourse.nodered.org/u/dkssudgktpdy)\
**Post date:** [25 July 2024 07:12 UTC](https://discourse.nodered.org/t/create-a-chart-from-received-data/89727/4 "2024-07-25T07:12:17Z")

</div>

Oh my god. I did what I wanted by following the configuration of that node! Thank you so much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 September 2024 07:12 UTC](https://discourse.nodered.org/t/create-a-chart-from-received-data/89727/5 "2024-09-23T07:12:33Z")

</div>

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