Change the color of perspective plot

I have a TimeSeriesChart that contains 2 series and I’d like to plot them in different color.
How can I accomplish this?

@NII, head on over to the docs site to check out your options:

https://docs.inductiveautomation.com/display/DOC80/Perspective+-+Time+Series+Chart

You can accomplish this through a color scheme, or by apply style to each trend individually.

Hello I have the same problem, can you explain how to set multiple color schemes for different series? or how to set up the style for different trend, because there is no style in trend property

The color scheme that is set using the defaultStyles.colorScheme property will apply to the entire chart, so you won’t be able to specify a color scheme per series. One option would be to have one series per chart if you want to display multiple series using different color schemes. Alternatively, you can override the defaultStyles.colorScheme value per trend using the columns property of the trend. You’ll need to specify a key that will match a data column in your series. From there, you can provide a color value to totally override the color, or use the state values (normal, highlighted, selected, muted) to override the different chart states that a color scheme provides:

1 Like

Hello thank you for replying, I tried it but still not works, i am guessing the column name I don’t get correctly. So if I have a 2-column-dateset in the series, the key (or the column key/name) will be the column name of one of my dateset column name right? like the t_stamp in this picture.
image

That’s right. The t_stamp column provides the date/time, so it’ll be the name of any of the other data columns that are returned. It is case-sensitive.