# Perspective TimeSeriesChart Parameters

**URL:** <https://forum.inductiveautomation.com/t/perspective-timeserieschart-parameters/75407>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 22, 2023, 5:31pm UTC](https://forum.inductiveautomation.com/t/perspective-timeserieschart-parameters/75407 "2023-06-22T17:31:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Pasquereau](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Alexandre\_Pasquereau](https://forum.inductiveautomation.com/u/Alexandre_Pasquereau)\
**Post date:** [June 22, 2023, 5:31pm UTC](https://forum.inductiveautomation.com/t/perspective-timeserieschart-parameters/75407/1 "2023-06-22T17:31:42Z")

</div>

Hi,

I'm trying to display two series of value in a TimeSeriesChart. Actually it's working, I can see 2 trends on my chart, but as I added them in two distinct series in the chart I have 2 y-axes, and I'd like to have one for both. So in my script, I tried this:

```auto
	self.getSibling("TimeSeriesChart").props.plots.axes = [{'name': 'pH', 'min': 0, 'max': 10}]
	self.getSibling("TimeSeriesChart").props.plots.trends = [{'series': tagName, 'axis': 'pH'}, {'series': 'testpH', 'axis': 'pH'}]

```

and this:

```auto
	self.getSibling("TimeSeriesChart").props.plots[0].axes = [{'name': 'pH', 'min': 0, 'max': 10}]
	self.getSibling("TimeSeriesChart").props.plots[0].trends = [{'series': tagName, 'axis': 'pH'}, {'series': 'testpH', 'axis': 'pH'}]

```

But none of those is working, I get a "Component error" on my chart.  
I wrote that because I tried this config in another test chart with some random values, I changed parameters in the property editor and it worked. So now I want to do it in the script because at the end, my chart will be dynamic, the values display will depend of what I choose in a dropdown box.  
Can you tell me why this is not working ?

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [June 22, 2023, 5:58pm UTC](https://forum.inductiveautomation.com/t/perspective-timeserieschart-parameters/75407/2 "2023-06-22T17:58:08Z")

</div>

Does the warning icon show up? If it does, what does it tell you when you hover over it?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/72c667051b8c2a96d4bdc25dc6d90c4e081b0e8b.png)

---

<div class="post-metadata">

**Author:** ![Alexandre\_Pasquereau](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Alexandre\_Pasquereau](https://forum.inductiveautomation.com/u/Alexandre_Pasquereau)\
**Post date:** [June 22, 2023, 6:13pm UTC](https://forum.inductiveautomation.com/t/perspective-timeserieschart-parameters/75407/3 "2023-06-22T18:13:48Z")

</div>

Yes I have one error:

For the dataset property I have this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/0/a0b3b82d6fbe0390debaa103993e8d5fbfdce56d.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8f8571ed7d5ce26fadbe5a272080f3326b907068.png)  
I can't delete the "[0]" and there is no binding

I didn't change any property:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/6/a62b9dab42897f4b00a9296ab75233ec9307c47d.png)

---

<div class="post-metadata">

**Author:** ![Alexandre\_Pasquereau](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Alexandre\_Pasquereau](https://forum.inductiveautomation.com/u/Alexandre_Pasquereau)\
**Post date:** [June 22, 2023, 6:17pm UTC](https://forum.inductiveautomation.com/t/perspective-timeserieschart-parameters/75407/4 "2023-06-22T18:17:57Z")

</div>

And here's how I put my data in the chart:

```auto
	self.getSibling("TimeSeriesChart").props.series = [{'name': tagName, 'data': query}, {'name': 'testpH', 'data': query2}]

```

That's working

---

<div class="post-metadata">

**Author:** ![Alexandre\_Pasquereau](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Alexandre\_Pasquereau](https://forum.inductiveautomation.com/u/Alexandre_Pasquereau)\
**Post date:** [June 23, 2023, 12:33pm UTC](https://forum.inductiveautomation.com/t/perspective-timeserieschart-parameters/75407/5 "2023-06-23T12:33:32Z")

</div>

I don't have error anymore but it's still not working. I also displayed the properties I modified in a label with the following command:

```auto
self.getSibling("Label_test_0").props.text = self.getSibling("TimeSeriesChart").props.plots[0].trends[0].axis

```

and I was able to see all the properties I added, so apparently they are well added.

---

<div class="post-metadata">

**Author:** ![Alexandre\_Pasquereau](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Alexandre\_Pasquereau](https://forum.inductiveautomation.com/u/Alexandre_Pasquereau)\
**Post date:** [June 23, 2023, 2:38pm UTC](https://forum.inductiveautomation.com/t/perspective-timeserieschart-parameters/75407/6 "2023-06-23T14:38:52Z")

</div>

Okay I found. I've just defined all properties for axes and trends, because when I tried to display properties that I did not define, I had nothing, seems that it's not filled in automatically (crazy). And then at the end I added also system.perspective.refresh() and that's it.
