Vision EasyChart doesn't show data from outside date range


Before you say “duh, because the data is outside of your date range”…

I have this trend below, displaying raw data:

Note no data shown at the start for both pens.

If I extend the chart to 2 minutes before, this happens:

I feel I know the reason for why this data is missing, as within the given date range these data points don’t exist. However I don’t think that’s a valid reason not to show the pen trend extended to the edge of the chart, at the value it is at the first data value before the date range, and the last value shown at the end of the date range.

The only option I see to fix this is to force all pens to trend their values at least every 5mins, but then the trend tables will become significantly larger and less efficient to return… As otherwise if an operator zooms in, the chart is pretty useless, especially for values that don’t change every second.

Example: This is zoomed in on the same trend, when the red line is a constant value for a while, with data points outside of the zoomed range, so the red line just isn’t shown at all…

Unfortunately, this is a limitation with JFreeChart - it completely discards information outside of the series axis. It’s been a problem with Vision basically forever.

Is there another chart component that the EasyChart could be based on without this, IMO, crucial feature missing? I realise that it’s the underlying component - not developed by IA - that has the issue, but as you can see from the last screenshot above, the second pen is just completely missing from the trend, where it should be sitting at around 6000. For an operator trying to diagnose an issue, this is just completely unacceptable and deceptive.

Would IA have any influence over the developers to change this behaviour, or at least option it?

JFreeChart’s largely frozen, and we’re unlikely to implement a major refactor to Vision’s charting at this point in its development lifecycle. Without getting into zooming, which complicates things, it’s not too hard to work around using scripting - just add a data point at the minimum and maximum domain value that’s the same as the previous/next datapoint in the actual series data.

For a more general solution than working around it yourself, you can definitely post to, or maybe sweet-talk @pturmel into making a change to his NoteChart module with a flag for this.

1 Like

Heh. Though I’m not sure I would have an easy fix: The issue is that history isn’t providing the values immediately before and after the timespan, so there’s nothing to work with to generate the intersection values at the bounds. I don’t know how any chart could possibly deal with this, JFreeChart or otherwise. It would have to be solved by a flag to the history query to retrieve one additional point outside each end of the timespan.

1 Like