# How to plot multiple data series for same pio

**URL:** <https://forum.pioreactor.com/t/how-to-plot-multiple-data-series-for-same-pio/586>\
**Category:** User interface\
**Created:** [December 10, 2024, 3:11am UTC](https://forum.pioreactor.com/t/how-to-plot-multiple-data-series-for-same-pio/586 "2024-12-10T03:11:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafik.n](https://forum.pioreactor.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rafik.n](https://forum.pioreactor.com/u/rafik.n)\
**Post date:** [December 10, 2024, 3:11am UTC](https://forum.pioreactor.com/t/how-to-plot-multiple-data-series-for-same-pio/586/1 "2024-12-10T03:11:17Z")

</div>

Hey Cam,

How are the charts generated from the yaml files on the frontend?

Specifically, how must I format the SQL table such that we can get multiple data series on the chart.

Is it ideal to have a separate column for each data series or to have one numeric column and another column containing series info (ie. channel # like you have for OD).

In my use case the data series are all from a single pioreactor and not multiple reactors. Basically have multiple of the same sensor reading in parallel and want to plot their individual output for comparison.

---

<div class="post-metadata">

**Author:** ![CamDavidsonPilon](https://forum.pioreactor.com/user_avatar/forum.pioreactor.com/camdavidsonpilon/32/3_2.png) [@CamDavidsonPilon](https://forum.pioreactor.com/u/CamDavidsonPilon)\
**Post date:** [December 10, 2024, 8:14pm UTC](https://forum.pioreactor.com/t/how-to-plot-multiple-data-series-for-same-pio/586/2 "2024-12-10T20:14:55Z")

</div>

Hi @rafik.n, it is multiple data series _per pioreactor_? That’s harder to do (the OD readings one is an exception, and hardcoded that way).

Generally, you want the table to be structured with columns `timestamp`, `experiment`, `pioreactor_unit`, and some numeric column.

A simple hack might be to use the `pioreactor_unit` column polymorphically - just put your different sensor “names” in there. Does that make sense?

---

<div class="post-metadata">

**Author:** ![rafik.n](https://forum.pioreactor.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rafik.n](https://forum.pioreactor.com/u/rafik.n)\
**Post date:** [December 13, 2024, 7:09pm UTC](https://forum.pioreactor.com/t/how-to-plot-multiple-data-series-for-same-pio/586/3 "2024-12-13T19:09:05Z")

</div>

Great hack recommendation. Got it working.
