Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.6.10 (build 3086) - 24 June 2020 (please see important announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

See the Wiki to download the software or click on the Downloads link in the Forum Banner.

Server Generated Graphs for MX

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

User avatar
mcrossley
Posts: 6587
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Generated Graphs for MX

Post by mcrossley »

BCJKiwi wrote:
Sun 28 Jun 2020 11:00 am
Suppose I could try php's clearstatcache()
Yep - memory triggered, that is what I had to use. But it was with a script returning data from real time files though.

BCJKiwi
Posts: 962
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Server Generated Graphs for MX

Post by BCJKiwi »

Re:- JpGraphs not updating.

Have found out what is going on.
It appears to be a limitation in the JpGraph xaxis timescale settings.
The data was actually updating but was contained within the old hour, until a new hour.
So the trace was the right length and had the right data but was out of sync with the xaxis hours.

By changing (in graphSettings.php) SetTimeAlign(MINADJ_10)
to
SetTimeAlign(HOURADJ_1);
the graph creates a new hour on the end of the graph when the first data after the hour arrives.
So when the update is on the hour, the xaxis is the same length as the hours of the data.
When the data is for say xhours + 10 or 20 minutes etc, the xaxis is one hour longer.
The trace is the right length but "slides" across the over-width graph until the next hour when the extra hour goes away until the next data arrives.

Was unable to find a better solution and noticed that there are actually examples of this behaviour in the JpGraph documentation.

At least with this configuration, the end of the trace with the latest data is always in the right hour.

User avatar
mcrossley
Posts: 6587
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Generated Graphs for MX

Post by mcrossley »

I don't see the setting "SetTimeAlign(MINADJ_10)" in the graphSettings file?

There is a commented out "SetTimeAlign(HOURADJ_6)"

Here is my test page https://weather.wilmslowastro.com/test/ ... empOut.php

BCJKiwi
Posts: 962
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Server Generated Graphs for MX

Post by BCJKiwi »

Hmmm that's interesting.
Have gone back through the various files I have and all have (had) a working SetTimeAlign(MINADJ_10);

Have just tested it with the SetTimeAlign(HOURADJ_1); line remmed out and it has automatically created the same chart with a 1 hour addition in the first 10 mins after the hour.

It seems that when no SetTimeAlign(xxx_xx) line is active, JpGraph must make an automatic adjustment based on the tick mark interval which is 1 hour on the image you posted and is also 1 hour on the graphs I have.

It is a pity that in all the discussion on this topic in the JpGraph documents I did not see this (or did I miss it?).
Well, live and learn.

So thanks for the feed back Mark - a big help. :clap: :clap:

Post Reply