Vision chart - Data quality color

Hello,

I'm using chart/easy chart in Vision and I'm trying to display OPC UA data value on this graphic. I would like to display the quality of the trending value by changing the color of the trend.
For exemple the tred is green when the values are GOOD and then the BAD quality points become red. So basicly each point on the chart could be red or green depending to their OPC quality.

Is it possible with Ignition? Maybe only with Perspective?

Thank you for your help and sorry if it's a dumb question, i'm new on this SCADA.

You need to think this through.
I look at that and I'm confused about what it is showing because it is showing a trend but no points. And if you add points the line will probably be green all the way up to the point, etc.

Instead, make your trend a neutral colour - just showing the trend - and add red and green coloured points for the data. Always be aware that some of your users may be red-green colour blind so give some other visual cue in the style of markers - circles and Xs, for example.

You may need to create three plots. One for the trend and one each for the good and bad points. I haven't used Vision charts for some time so someone else may have better ideas.

  • Standard chart will have to be used
  • Two datasets should do it. The good plot is the trend, according to the OP.

Sorry about the confusion about trend and points.
In other words I just want to trend an OPC value and show the quality of the data by changing the color of the trend. The difficulty is when I display GOOD and BAD quality values on the same chart.

I've setted up an OPC UA server with Ignition and simulate a BAD quality data: The chart does not trend any BAD data on the chart:

I've found some information about org.jfree.chart.renderer: Do you think this could be the way to display the quality of my points with a different color?

I think this could work:

public class XYBlockRenderer
extends AbstractXYItemRenderer
implements XYItemRenderer, Cloneable, PublicCloneable, Serializable

A renderer that represents data from an XYZDataset by drawing a color block at each (x, y) point, where the color is a function of the z-value from the dataset.

With X as timestamp, Y as OPC data Value and Z OPC data Quality

I just need to understand how to use it with Ignition Chart :slight_smile:
What do you think?

I don't believe that anything custom is needed here; simply display the data in a regular chart. In the chart's native dataset, put the good data in column one and the bad data in column 2. In the rows where the data points are good, use null values in the bad data column, and conversely, in the rows where the data points are bad, use null values in the good data column.

At transition points between good data and bad data, allow the value to be included in both columns, so that the data points overlap and connect.

Example:
image

Result:
image

Thank you for this idea, it looks good.
The main problem is that solution will create an extra plot for each plot I want to display. I can have 20 plots on the same chart, with 2 000 pts/plot: This doesn't look like a very scalable/most effective solution.
Maybe I'm wrong?

But I keep in my this good idea :slight_smile:

2000 pts per plot doesn't sound that bad.

It doesn't. It would be better to say that it creates an extra column in the plot's dataset per pen. It's a much simpler solution that building a custom renderer, and I imagine it would be much more maintainable as well.

1 Like

OK then I'll try to implement that solution :slight_smile:
Thank you for your help, Ignition's community is very nice!

1 Like