# SQLITE data to Charts - Various Issues

**URL:** <https://discourse.nodered.org/t/sqlite-data-to-charts-various-issues/56308>\
**Category:** General\
**Tags:** database\
**Created:** [8 January 2022 14:27 UTC](https://discourse.nodered.org/t/sqlite-data-to-charts-various-issues/56308 "2022-01-08T14:27:33Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![MakerMan](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@MakerMan](https://discourse.nodered.org/u/MakerMan)\
**Post date:** [9 January 2022 21:55 UTC](https://discourse.nodered.org/t/sqlite-data-to-charts-various-issues/56308/9 "2022-01-09T21:55:54Z")

</div>

**Sending Database to Charts**

I found a reply on this discussion [Dynamic series identification from message, send data to Chart](https://discourse.nodered.org/t/dynamic-series-identification-from-message-send-data-to-chart/36682/5) by [Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl) providing a great solution in the form of a "DB data to chart" function.  
I slightly modified this function and still using one function node per data series this works really well. Of course there is a certain clunkiness to running eight queries at startup ...

It would be interesting to know if this function could easily be modified to provide each data series on a separate function node output, or of some other approach to separating the data output to send to different charts.

**Reducing the amount of data sent to the charts ...**

One advantage of having the eight queries is that it makes it simple to implement some rudimentary data thinning in each query. My initial approach is to use the condition `Where ROWID % 20 = 0;` in the sql statements which has the effect of selecting every 20th row for the seed data. I just need to tweak so see how many rows I can get off with skipping.

---

_[View the full topic](https://discourse.nodered.org/t/sqlite-data-to-charts-various-issues/56308)._
