# Graph with stored data

**URL:** <https://discourse.nodered.org/t/graph-with-stored-data/5956>\
**Category:** Dashboard\
**Created:** [19 December 2018 09:58 UTC](https://discourse.nodered.org/t/graph-with-stored-data/5956 "2018-12-19T09:58:25Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [25 October 2020 08:31 UTC](https://discourse.nodered.org/t/graph-with-stored-data/5956/6 "2020-10-25T08:31:47Z")

</div>

Hi @kapusticka welcome to the forum.

First things first, in order to make code more readable and importable it is important to surround your code with three backticks  
`````  
`like this`  
`````

You can edit and correct your post by clicking the pencil icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

> [@kapusticka](#):
>
> data is not defined (line 9, col 42)".

Pretty much as the error says, `data` is undefined yet you attempt to assign`data` to "values"

If you are passing data into the function then it's probably in msg.data or msg.payload.

Add a debug node (set to show complete message) BEFORE the function where the error occurs. Have a look for where your data is.

Ps, as you are new to node red, I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

_[View the full topic](https://discourse.nodered.org/t/graph-with-stored-data/5956)._
