Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

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 drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Customising which lines are displayed on graphs for Cumulus MX - now solved

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

Post Reply
martinu
Posts: 85
Joined: Wed 01 Jan 2014 7:54 pm
Weather Station: Davis Vantage Vue
Operating System: Raspberry Pi: Raspbian Stretch
Location: Rudston, North Yorkshire

Customising which lines are displayed on graphs for Cumulus MX - now solved

Post by martinu »

On Cumulus 1.9.4 etc,the temperature graph displayed various temperatures (actual, heat index, dew point, apparent temp) but individual lines could be turned on or off by the web site owner (me!). I chose to turn off heat index and apparent temp, so as to make the actual temp line stand out better and reduce clutter.

On Cumulus MX, all the lines are available to be turned on or off by the user, which is even better. However, is there a way for the site owner to set the initial default state of the lines (visible/hidden) when the Trends page is displayed, so some lines are hidden (to reduce clutter) but the user can still turn on the display of those lines if he wants?

Likewise, is it possible for the site owner to customise what colours are used for the various lines on a graph? For example, to use pale colours for derived lines and a bold colours for actual ext/int temperatures.


What is happening about ongoing support and bug-fixing for Cumulus now that Steve has retired? Will anyone else be able to take over development and enhancement to carry on his excellent work? Is there any chance that any bugs will be fixed - for example the one which always displays 24 hours of data on the graphs irrespective of what period is set in the Settings page?
Last edited by martinu on Wed 17 Oct 2018 6:47 pm, edited 1 time in total.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Customising which lines are displayed on graphs for Cumulus MX

Post by steve »

I’m not sure the options you mention exist, but I would have to look at the code to confirm, when I next have my laptop out.

I don’t remember the bug you mention, can you point me at the thread where this was reported, so I can see what my response was? I’m pretty sure the setting is in use and working for some users at least.

I’ve posted several times about the future of Cumulus, but to repeat, I am still supporting Cumulus as far as being active in the forum is concerned; I may start to develop Cumulus again myself before too long, or I may release the source code. Or neither of those, I have yet to decide.
Steve
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Customising which lines are displayed on graphs for Cumulus MX

Post by BCJKiwi »

Have
settings / station / settings / graphs / graph hours set to 51
and
settings / station / settings / graphs / graph days set to 32

Both work fine and as far as I recall always have.
https://silveracorn.nz/cumulus/trends.php
martinu
Posts: 85
Joined: Wed 01 Jan 2014 7:54 pm
Weather Station: Davis Vantage Vue
Operating System: Raspberry Pi: Raspbian Stretch
Location: Rudston, North Yorkshire

Re: Customising which lines are displayed on graphs for Cumulus MX

Post by martinu »

The Graph Hours setting doesn't work for me. http://www.martinunderwood.f9.co.uk/Weather/trends.htm shows 24 hours, even though I've increased the value to 48 or even 51 and then restarted CumulusMX.

Likewise Graph Days is staying at 31 - even though I've modified it to 60 or 20, the earliest date is still 28 August, 31 days ago.

Is there anything else I need to do after changing these values, other than stopping and restarting sudo mono CumulusMX.exe. I've confirmed that the changed values are being written to the ini file: after restarting Cumulus and going back to the config page, it shows the new values. Weird.

I presumed it was "Graph data loaded from logs at start up is always for last 24 hours rather than configured period - should be fixed in 3031" on https://cumulus.hosiene.co.uk/viewtopic.php?f=27&t=12943 but if other people are not having a problem, maybe that relates to a different problem.

(PS: When you look at the page, it won't have updated since about 09:50 because I'm about to connect the weather station back to the PC that is running Cumulus 1)
martinu
Posts: 85
Joined: Wed 01 Jan 2014 7:54 pm
Weather Station: Davis Vantage Vue
Operating System: Raspberry Pi: Raspbian Stretch
Location: Rudston, North Yorkshire

Re: Customising which lines are displayed on graphs for Cumulus MX

Post by martinu »

Cancel my previous post! It does work, but there seems to be a delay of several minutes between restarting Cumulus after changing a value and the graph changing its scale. It's not due to the trends.htm page not updating or the browser caching an old page, because I can see that the timestamp at the top of the page changes every minute (I set it to a short time so I'd see the effect of config changes sooner!).

Is it plausible that my browser could show an updated htm page (with up-to-date time) and yet the graphs on that page are not redrawn for a while after that?

At least I know that it does work, as long as I allow for not seeing results immediately!
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Customising which lines are displayed on graphs for Cumulus MX

Post by water01 »

Quite plausible if the page was cached in your browser and the Internet settings were not set to always reload from the server and therefore used the cached copy.
David
Image
martinu
Posts: 85
Joined: Wed 01 Jan 2014 7:54 pm
Weather Station: Davis Vantage Vue
Operating System: Raspberry Pi: Raspbian Stretch
Location: Rudston, North Yorkshire

Re: Customising which lines are displayed on graphs for Cumulus MX

Post by martinu »

I went hunting in the code, and I've found how to alter the default state of the lines on (for example) the temperature graph. Fortunately it's in a .js file; my worry was that it was in a file that had been compiled and was therefore inaccessible without industrial-strength reverse-engineering :-)

The file that you alter is CumulusMX/webfiles/js/cumuluscharts.js. Usual precaution: save a copy of the file before modifying it!


Temperature Graph

I wanted to change which lines were visible by default on the temperature graph.

Starting on line 134 is a list of the lines, as defined in the legend below the graph. By default, all are displayed except the last one, "Inside", which has an extra attribute ", visible: false". I removed that line and added it for most of the other lines (Dew Point, Apparent, Wind Chill and Heat Index), giving:

series: [{
name: 'Temperature',
zIndex: 99
}, {
name: 'Dew Point',
visible: false
}, {
name: 'Apparent',
visible: false
}, {
name: 'Wind Chill',
visible: false
}, {
name: 'Heat Index',
visible: false
}, {
name: 'Inside'
}],


Rainfall Graph

I also find that on the Rainfall graph, the solid fill for the cumulative rainfall tends to mask the rainfall rate, so I changed this:

Line 626 (or thereabouts) has:

name: 'Daily rain',
type: 'area',
yAxis: 1,
tooltip: {valueSuffix: config.rain.units}

and I changed "area" to "line", as for the Rain Rate graph defined just above it. Ideally I'd have liked to fill the area with a paler shade of the same hue (green) but I've not found a way of modifying colours yet.


Uploading the modified file

Finally, upload that file over the top of the existing one in ./web/js on your web server.
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Customising which lines are displayed on graphs for Cumulus MX - now solved

Post by sfws »

martinu wrote:Ideally I'd have liked to fill the area with a paler shade of the same hue (green) but I've not found a way of modifying colours yet.
EXAMPLE: http://jsfiddle.net/gh/get/library/pure ... olor-area/
SYNTAX: https://api.highcharts.com/highcharts/plotOptions.area
martinu
Posts: 85
Joined: Wed 01 Jan 2014 7:54 pm
Weather Station: Davis Vantage Vue
Operating System: Raspberry Pi: Raspbian Stretch
Location: Rudston, North Yorkshire

Re: Customising which lines are displayed on graphs for Cumulus MX - now solved

Post by martinu »

sfws wrote:
martinu wrote:Ideally I'd have liked to fill the area with a paler shade of the same hue (green) but I've not found a way of modifying colours yet.
EXAMPLE: http://jsfiddle.net/gh/get/library/pure ... olor-area/
SYNTAX: https://api.highcharts.com/highcharts/plotOptions.area
Thanks for that. I'll investigate further now I've got links to the documentation.
martinu
Posts: 85
Joined: Wed 01 Jan 2014 7:54 pm
Weather Station: Davis Vantage Vue
Operating System: Raspberry Pi: Raspbian Stretch
Location: Rudston, North Yorkshire

Re: Customising which lines are displayed on graphs for Cumulus MX - now solved

Post by martinu »

Here are a couple more tweaks which I've made which people might like to take advantage of:

1) The x-axis lists the time of day for the graphs. It typically shows labels such as "19 Oct, 04:00, 08:00, ..., 20:00, 20 Oct" - all in the same size and colour of text. I've modified it so the date (denoting "00:00") is a different colour, so the changeover from one day to the next is more obvious.

Look for lines

dateTimeLabelFormats:
{
day: '%e %b',
week: '%e %b %y',
month: '%b %y',
year: '%Y'
},

and change the "day" line to

day: '<span style="fill: red;">%e %b</span>',

For completeness you could do the week, month and year formats as well.

There is one of these for each graph, except the daily temp and rainfall graphs which don't need the change.

The change is more useful if you've changed your graph period from the default 24 hours to 48 hours, when there could be data from up to three different days and it is more important to be able to distinguish them at a glance.

Note that I also reversed the order of month and day - I think it was originally "%b %e" US format. Or maybe that was in the tooltip section everywhere.


2) I've reduced the opacity of the fill in the green Rainfall area chart so the blue Rainfall Rate line shows through it better.

In the doRain function, find the lines:

series: [
{
name: 'Rainfall Rate',
type: 'line',
yAxis: 0,
tooltip:
{
valueSuffix: ' ' + config.rain.units + '/hr'
}

},
{
name: 'Rainfall Today',
type: 'area',
yAxis: 1,
fillOpacity: 0.2, // so Rainfall Rate line shows through the fill of Rainfall Today
tooltip:
{
valueSuffix: ' ' + config.rain.units
}
}],

and add the fillOpacity line that I've highlighted.
Dolmen
Posts: 13
Joined: Thu 23 Jan 2014 7:21 am
Weather Station: Davis VP2
Operating System: Windows 7
Location: Genoa - Italy

Re: Customising which lines are displayed on graphs for Cumulus MX - now solved

Post by Dolmen »

Excellent job!
Any idea about obtaining the same results on the localhost standard UI charts page?

Thank,
Ale
Post Reply