# Best way to push DB1 data series to DB2 for chart?

**URL:** <https://discourse.nodered.org/t/best-way-to-push-db1-data-series-to-db2-for-chart/91029>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [16 September 2024 19:15 UTC](https://discourse.nodered.org/t/best-way-to-push-db1-data-series-to-db2-for-chart/91029 "2024-09-16T19:15:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 September 2024 19:31 UTC](https://discourse.nodered.org/t/best-way-to-push-db1-data-series-to-db2-for-chart/91029/2 "2024-09-16T19:31:51Z")

</div>

You do not say where your data comes form and if you parse it to that format.

Saying that db2 data can come in an array of objects, i.e a result from a db  
`[{"timestamp":1111, "temp": 20,"device":"sensor1"},{"timestamp":1111, "temp": 20,"device":"sensor2"}]`  
You then set the x, y and series key in the chart to x - timestamp, y - temp, series - device.  
This allows you to set multiple series using the device property, you can set these keys to any property name you wish.  
It is all in the docs of course [Chart ui-chart | Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/nodes/widgets/ui-chart.html#building-charts)  
You can use msg.action to dynamically `append` or `replace` the chart data

---

_[View the full topic](https://discourse.nodered.org/t/best-way-to-push-db1-data-series-to-db2-for-chart/91029)._
