Perspective Time Series Chart - Pen Colors

I have configured three series along with three plots. Each series(two data points in each) is on its own plot, see screenshot. I am trying to get different pen colors for each plot but I can’t find where to configure this. It appears that the first color that I specify goes to the first data point name in the series, and the second color goes to the second data point name in the series and so on. Same applies for the colorScheme property.
For example, I want red and blue on plot 0, orange and green on plot 1, grey and pink on plot 2.
Thanks-

Hi @vcgasman, those defaultStyles apply to all charts. To create a unique style for each trend, there is a columns array where you can limit or configure the columns to display in the trend. You’ll need to enter the column key (which is the column name in the series to which the trend is bound), and then you’ll have the ability to apply style to that specific column. You can either give it a color, or you can provide styles for any of the four states (normal, highlighted, selected, and muted). Note that these styles are additive. Anything that you configured in defaultStyles will be taken into account, but these column-specific styles will override in the case of a style conflict.

2 Likes

Ok- Thank you. I had missed that. And thanks for the quick reply on all of my posts. It is appreciated.

No prob!

Hi Jball,

I have a similar question with perspective. I have a chart with 2 datasources.

DataSource 1 it is a yellow line in the graphic.
DataSource 2 there are some green bars in the graphic.

I want to change the color of DataSource 2 depending of DataSource 1. Meaning, If my green bar is smaller than the yellow line, I want to display red color in the bar, otherwise, I will keep the green color. Is this possible?

I have like 8 different bars in my graphic but I just want to change the colors of the one´s smaller than my yellow line.

Thanks,
Juan.

Hi @chuache_sanse, yes that would be possible by using a property change script to interrogate the dataset that you have bound to the chart. You could have custom view properties that can hold a color value that you can change based on data conditions in your property change script. Those properties can then be bound to the fill/stroke colors of the chart.

Hi jball,

If I bound my dataset to the fill property, t doesn´t take the colours, it just not recognise the data and gives me the default blue colour.

Also, if I give the fill property a specific colour, it changes the colour of all the bars in my graphic. Is it possible to decide individually even thought all the bars have the same fill property?

Also, if I give the fill property a specific colour, it changes the colour of all the bars in my graphic. Is it possible to decide individually even thought all the bars have the same fill property?

Yes, you can create a trend that is bound to the series that you want to display. Each trend has the ability to specify the columns that you want to show under its properties. This configuration is exclusive, so once you've properly configured a column, only this configuration will be used to chart your data. Use the key property of the column to point to the column in your series data that you want to show. From there, you can either specify a color property for the column, or you can use the styles property for tighter control of the style for all of the different states.

If I bound my dataset to the fill property, t doesn´t take the colours, it just not recognise the data and gives me the default blue colour.

To use dataset values as a way to change the color of columns in your trends, you'll need to do the following:

  1. Setup a view property to which you will set a color value based on conditions being met in your dataset. You'll want to default this value to an initial color.
  2. Bind the color property of the column that will change to this view property.
  3. Create a property change script on your series data where you handle the comparison of data values to determine if you should change the color of your trend. When you determine that a color change should be made, write the color value to that view property.