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

Different time trends ?

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
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: Different time trends ?

Post by sfws »

tempe wrote:It seems to show every other temperature value wrong.
That matches my statement that every other pressure was wrong on your previous posting.
What you have has got something else inbetween what you say are the valid points (actually those are not quite right, they are just below what should be plotted) - it shows 14 days as there are 336 points on the plot. If you move your mouse over any of the markers (the points plotted) a tooltip pops up that quotes the x-position in hours and the y-points for each plot. This will show you what has gone wrong, but I have worked it out.

What I zipped and posted had 168 points (h=1 ... h=168) as per my earlier posting. The difference between what you have and what I have is that your numbers in Finland use a comma as separator between the integer and decimal parts, thus my code treated those two parts of the same figure as different plotting points. It is the plotting of the decimal parts that looks wrong. In the UK I use a full stop as my separator, so I plot the integer and decimal parts as a single number. Please swap to this newer version of the code that took me just a couple of minutes to edit all the tags.
EDIT - ATTACHMENT REMOVED - SEE A LATER POSTING FOR A REPLACEMENT - this one had been downloaded 5 times
Please see my 01 Aug 2014 11:19 posting for additional details about using this attachment.
sfws wrote:If you click your mouse on the left of the new graph, hold in the left button and move to above the 5 day tic on the x axis and then release, you will zoom into the new graph and I suspect that smaller portion will then match closer the Cumulus drawn graphs shown below it on the page for you too.
You've actually zoomed in to a different time period to that shown in the cumulus graph below (yellow line), so there is hardly any overlap, but I can still do a match.
Last edited by sfws on Mon 04 Aug 2014 5:36 pm, edited 1 time in total.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Different time trends ?

Post by nitrx »

Hi sws ? I can't find highcharts-exporting.js ? BTW why don't you use the online scripts from Highcharts I think this will more effecient for using the bandwith.
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: Different time trends ?

Post by sfws »

Ron,
If you read the whole thread, both your questions are answered...but I will repeat myself yet again
nitrx wrote: BTW why don't you use the online scripts from Highcharts I think this will more effecient for using the bandwith.
1) I'm not working online with my testing web server, so I use local versions of library scripts too.
nitrx wrote: I can't find highcharts-exporting.js ?
sfws wrote: To make it work, you will need to add a few 'libraries' to whatever folder your HTML is uploaded to by Cumulus, or modify the appropriate 'src' attributes to tell the HTML where these libraries are to be found.
2) You should find this is one of the online scripts from Highcharts you mention. Otherwise simply delete this line in the template, it is only included because the original request wanted to generate static pictures. See my posting of 1 August at 11:19.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Different time trends ?

Post by nitrx »

Ah sorry thank you for the template it works fine I will have an eye on it ( I've comma's instead of points The Netherladns)

This is the part I changed for the highcharts

Code: Select all

<script src="http://code.highcharts.com/highcharts.js"></script><!-- Basic script for basic highcharts -->
	<script src="http://code.highcharts.com/modules/exporting.js"></script><!-- Allows printing or export in various formats of your graphs -->
Sample emplate over here (note menu links dont work all I've to change that http://apeldoorn.tk/weer/trends.htm

again thanks for your work
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Different time trends ?

Post by nitrx »

Just a question I'm missing the first 14 hours in the graph ?
Ron
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: Different time trends ?

Post by sfws »

1.
nitrx wrote:This is the part I changed for the highcharts

Code:
<script src="http://code.highcharts.com/highcharts.js"></script><!-- Basic script for basic highcharts -->
<script src="http://code.highcharts.com/modules/expo ... "></script><!-- Allows printing or export in various formats of your graphs -->

Ron,
Thank you, it is very useful for others to see what I meant in my 1 Aug posting about using source that downloads each time.
My 1 August posting was long enough without including what to put after 'src'.
sfws wrote:modify the appropriate 'src' attributes to tell the HTML where these libraries are to be found.
2.
nitrx wrote: http://apeldoorn.tk/weer/trends.htm

again thanks for your work
Again thank you, Ron, you have provided a link to an online version that shows how it looks for the benefit of others.
And thank you for thanking me!

The links in my posted zip are the same as original Cumulus template, I actually don't know why they have come out wrong for you. But I have a busy life and am in the middle of gardening this afternoon as I peep at my PC and the ongoing replies on this topic when I need to come in to fetch another tool or whatever! So I suppose there is a small possibility of pressing wrong keys in what I post!

3.
nitrx wrote: I'm missing the first 14 hours in the graph ?
Again I answered that earlier in the thread (1 August) - it was 2pm when you created the graph, so it starts the graph at the current time!
sfws wrote:I have set it up so that it shows day boundaries that move across depending on the hour at the time when Cumulus processed the page.
Last edited by sfws on Mon 04 Aug 2014 1:50 pm, edited 1 time in total.
tempe
Posts: 13
Joined: Mon 28 Jul 2014 1:17 pm
Weather Station: Vantage vue
Operating System: win 7
Location: Finland

Re: Different time trends ?

Post by tempe »

It works! Awesome! Thank you gazillion times! Hopefully future versions of Cumulus will enable easier and customisable graphs for longer perioids.
You do not have the required permissions to view the files attached to this post.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Different time trends ?

Post by nitrx »

sfws wrote:

3.
nitrx wrote: I'm missing the first 14 hours in the graph ?
Again I answered that earlier in the thread (1 August) - it was 2pm when you created the graph, so it starts the graph at the current time!
sfws wrote:I have set it up so that it shows day boundaries that move across depending on the hour at the time when Cumulus processed the page.
Ok I read it all but I really dont know what you mean with that sentence (English is not my native language ;)
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: Different time trends ?

Post by sfws »

tempe wrote:Awesome! Thank you gazillion times!
Glad you have what you want. And thank you for thanking me.
The page could be made tidier, the paragraph elements that appear above the new graph apply to the original graphs, so you might want to move them lower and add new explanatory paragraphs above the new graph.
Or even split old and new onto different pages.

I hope you feel brave enough to vary what is included in the arrays, should you wish to have an interval other than one hour. If you do vary that then the little function calculation that changes hourly to days will also need changing.

Code: Select all

function() { // function to convert 'string' hours into days for x-axis labels
						var hoursAgo=parseInt(this.value,10);
						var daysAgo=hoursAgo/24;
						var textAgo=(daysAgo==1)?daysAgo+' day':daysAgo+' days';// singular or plural
						return textAgo;
					}
And of course you could decide to plot something different to temperature, pressure and rainfall, but you would then be into a more complicated script like the one by Mark I provided a link to in an earlier posting.

RON - I do try not to be too technical in what I type, but I am not that good at choosing the best words, my mind struggles with what to say. I also accept that Dutch and (British) English are different and I'm just glad that my code has worked out for you.

Ok I'm closing down my PC (and for me this topic) now that everyone is happy!
tempe
Posts: 13
Joined: Mon 28 Jul 2014 1:17 pm
Weather Station: Vantage vue
Operating System: win 7
Location: Finland

Re: Different time trends ?

Post by tempe »

One question: would it be difficult to switch the graph around in such manner that the recent data would be printed on the right side? Currently the most recent data is on the left side.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Different time trends ?

Post by nitrx »

tempe wrote:One question: would it be difficult to switch the graph around in such manner that the recent data would be printed on the right side? Currently the most recent data is on the left side.
I this you have to reverse the hourcodes

Code: Select all

[<#RCRecentOutsideTemp h=1>, <#RCRecentOutsideTemp h=2>, <#RCRecentOutsideTemp h=3>,
etc

to

Code: Select all

[<#RCRecentOutsideTemp h=168>, <#RCRecentOutsideTemp h=167>, <#RCRecentOutsideTemp h=166>,
andso-on but I'm not sure..

sfws anyway thanks I gonna play with it the couples of week :D
tempe
Posts: 13
Joined: Mon 28 Jul 2014 1:17 pm
Weather Station: Vantage vue
Operating System: win 7
Location: Finland

Re: Different time trends ?

Post by tempe »

It seems my graph deviates 19 hours, or theres blank for 19 hours and it shows current reading at 19 hours. Should I start Cumulus at 23:59 for this to fix itself or is there other way?
You do not have the required permissions to view the files attached to this post.
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: Different time trends ?

Post by sfws »

This thread remains where it was started, but I think now deserves to be moved to 'Third Party Tools' https://cumulus.hosiene.co.uk/viewforum.php?f=18 because very little refers to Cumulus software now! Sorry to Steve for my hijacking of a thread asking what Cumulus could do...


Oh dear, I was not going to contribute any more. I still have some gardening to finsh today before I eat, and I need to get ready for being out all day tomorrow. I really have got lots else to do.
tempe wrote:It seems my graph deviates 19 hours, or there is blank for 19 hours and it shows current reading at 19 hours
sfws wrote:I have set it up so that it shows day boundaries that move across depending on the hour at the time when Cumulus processed the page.
I answered this incorrectly now in two earlier postings, I've made a change on my PC to test a correction and I did get it wrong on what I made available before. Anyway I have deleted version 1 and version 2 and created a version 3 for you both, and the other people who have downloaded it.
The graph starts at the time when it is produced (7pm in your case), you can produce it as often as you like at any time you like.
That is just to ensure that the 'day count' tics on the axis appear at the right place.

Code: Select all

				tickInterval: 24, // mark off days (24 hours)
this is what makes it put tic marks only for each day. The function I quoted previously determines what is shown at the tic mark.

Code: Select all

				series: {
					pointStart: <#hour>
				},
this is what I thought in version 1 and 2 made it start at the current time of day, delete all of this if you want days to be numbered as 0 at the current time of day, and 1 at the same time the day before. I think what you and Ron are telling me is that it should say

Code: Select all

				series: {
					pointStart: 24-<#hour>
				},
because it is in reverse time order.
For example: At 7pm, you want 5 blank hours, then 17 points plotted until you get to the day mark. I am very sorry, I do not have much time to spare for coding and what I did was only intended to be a demo of what could be done. Please note, the new attached version 3 file is actually a bit bigger change than that, it also works to nearest minute I think. (My testing evironment is not sophisticated enough to test the minutes aspect).
Version 3 attachment removed, one person reported problem with it, and I have decided to move the new plot above the existing <p> elements that described the old plot. Please download version 3.1 on later posting
tempe wrote:One question: would it be difficult to switch the graph around in such manner that the recent data would be printed on the right side?
http://jsfiddle.net/gh/get/jquery/1.7.2 ... /reversed/ See the reference I quoted in my first posting to see how to reverse the axis:

Code: Select all

xAxis: {
                        reversed: true
        },
will put earliest day on LHS, latest day on RHS. If anyone downloading the new version (3) does not want earliest on left, please change this 'true' into 'false' in your copy of the template.

I have quickly done both these changes and zipped up a new file. My previous versions had been downloaded 17 times, thanks to everyone who has shown an interest, Please can everyone who downloads this latest version read the full thread, I do not want to write everything down again. For example, this is a Cumulus template, it needs to be processed, and it requires 3 script libaries to also be loaded for it to work, as I previously explained.
Last edited by sfws on Mon 04 Aug 2014 7:06 pm, edited 2 times in total.
tempe
Posts: 13
Joined: Mon 28 Jul 2014 1:17 pm
Weather Station: Vantage vue
Operating System: win 7
Location: Finland

Re: Different time trends ?

Post by tempe »

Thank you for taking even more time on this. My graph went missing thou, it shows the box with writings around but no graphs inside?
duke

Re: Different time trends ?

Post by duke »

@sfws - you are not the only one that gets distracted from the garden by weather related topics ;)
Post Reply