# Plot data in a dashboard chart

**URL:** <https://discourse.nodered.org/t/plot-data-in-a-dashboard-chart/21565>\
**Category:** General\
**Created:** [11 February 2020 21:01 UTC](https://discourse.nodered.org/t/plot-data-in-a-dashboard-chart/21565 "2020-02-11T21:01:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [11 February 2020 23:40 UTC](https://discourse.nodered.org/t/plot-data-in-a-dashboard-chart/21565/3 "2020-02-11T23:40:22Z")

</div>

Have you looked at my suggestion in your previous topic? Rather than printing the raw output to stdout, print the output as json string. Every time you print a line, it gets added to the `msg.payload` coming out of your pythonshell node. Meaning that in order to use it you have to split lines first, then parse the context. If instead you were to format your **entire** output to a python dictionary, then call json.dumps on it and print that, you can convert that single string to an object back in node-red through the JSON node. You can then use regular nodes to get the different outputs out and plot them to a chart, see the link in Paul’s message for that.  
But keep in mind for that to work, you have to deliver properly formatted input first.

Context for others reading this:

> [@Python function](https://discourse.nodered.org/t/python-function/21510/12):
>
> Thank you. I got this thing in the python code and it still works when it runs.I also added the json parser node. Now i have no idea of what i can do to plot my array in a chart of the dashboard.

---

_[View the full topic](https://discourse.nodered.org/t/plot-data-in-a-dashboard-chart/21565)._
