Perspective TimeSeriesChart Parameters

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:

	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:

	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 ?

Does the warning icon show up? If it does, what does it tell you when you hover over it?
image

Yes I have one error:

For the dataset property I have this:
image
image
I can't delete the "[0]" and there is no binding

I didn't change any property:

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

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

That's working

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:

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.

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.