# Pens on Graph

Hi,

I am having a problem with my graphs where the pens are trending ok if say the flow is at 68m3/hr but when the flow drops to 0m3/hr the graph is trending this at about 48m3/hr for about an hour to 2 hours and then dropping to 0m3/hr but if i zoom in on this pen at the time that it is trending at 48m3/hr when it should be at 0m3/hr it will show as om3/hr but when i zoom back out it is reverting back to the 48m3/hr. if you require any further information please let me know and any help would be appreciated.

Hi,

Below please find attached screen grabs of the problem i am talking about, if you notice on the first screen grab (Last Day), when i open the graph the ‘flow’ is showing as 40.0056 m3/hr, then when i zoom in (last 2 Hours) the ‘flow’ is showing as 0.1875 m3/hr and then when i zoom back out again (Last Day 2) the ‘flow’ has reduced to 3.4085 m3/hr.

Hi,

Yes, that’s interesting. I suspect your pen is probably set to “average” mode, could you confirm this? On the chart, go to the pen customizer, and edit that pen. If it is, just for testing purposes, could you set it to “min/max” and see how that changes the chart?

I suspect what’s going on (assuming that it really is in “avg” mode) is that the average for the last “window” where it drops is getting calculated differently based on how the values line up for each query. This is fine, but there is clearly something not right- whether the last value is 40, or .18, or 3 doesn’t matter much - the value should only be used for 1 window. The next window should be the correct value. What I’m saying here probably doesn’t make a lot of sense, but the point is that something is a bit off, as I would expect it to drop to the last raw value instead of staying flat.

Speaking of raw values, it might be helpful to know what the real data was for the point. Probably the easiest thing to do would be the following:

1. In the sqlth_te table, find the id for that tag path (use the largest one if there multiple)
2. Run a query like the following:
SELECT * from sqlt_data_1_2011_08 WHERE tagid=? ORDER BY t_stamp DESC limit 10000;

Note: Your table name might be different, depending on your system. Also, you could play with the timestamps to try to just get this range, but that’s a little more work with the unix-time format timestamps, and I figured grabbing the last 10k rows should cover it.

1. Export the result and attach it here.

Also, one more thing to try:
If you look at all of the properties of the easy chart (Change the box to “all” on the properties panel), you’ll see a value for “Tag History Resolution”. What is it currently set to? If you set it higher (try 1000, or 2000), does it help? I don’t really thing this will completely solve the problem, but I’m curious if it changes things at all.

Regards,