# Keeping series datasets consistent but showing correct label in TimeSeriesChart?

**URL:** <https://forum.inductiveautomation.com/t/keeping-series-datasets-consistent-but-showing-correct-label-in-timeserieschart/92330>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [June 25, 2024, 1:04pm UTC](https://forum.inductiveautomation.com/t/keeping-series-datasets-consistent-but-showing-correct-label-in-timeserieschart/92330 "2024-06-25T13:04:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [June 25, 2024, 1:04pm UTC](https://forum.inductiveautomation.com/t/keeping-series-datasets-consistent-but-showing-correct-label-in-timeserieschart/92330/1 "2024-06-25T13:04:51Z")

</div>

For fun project with stock tickers.

I have a TimeSeriesChart in perspective I am trying to show prices in. I made a named query that grabs the date and closePrice of the day and a function that provides this data along with a name to the series property but then it comes through as just showing `closePrice` which makes it impossible to differentiate

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/9/198b7f65b5db4c2b8f4a5fecaefd994e7c1e42bd.png)

with the series like  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/4/74667b2474599ece6ce96b6699662c46b8da554d.png)

The only way I was able to get the actual ticker name on the chart as to make the column name the ticker name when I create the data like

```python
series = [
    {
        'name':ticker,
        'data':system.dataset.toDataSet(['date',ticker], 
        system.db.runNamedQuery('tickers/getPriceFromYear',{'ticker':ticker,'year':year}))
    }
    for ticker in tickers]

```

However this then makings union-ing the datasets in the series not work immediately due to all of them having different column names.

I was able to randomly assign colors by changing `plots[0].trends` so I thought that might be where I was able to modify the labels and keep the datasets the same column setup, but I had no luck.

It feels like I am missing something here about how to label the lines - that I should be able to have each series data property have the same dataset structure with a `date,closePrice` columns and then only modify how it's shown on the UI in some property - but I can't figure it out. Is this possible, or do I need each dataset to have the ticker name as the column name?
