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 4017) - 17 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:My graph went missing thou
The version on my pc I used to test with is ok, so I don't know why yours is not.
I have tried deleting my copy and copying back the version 3 that I previously zipped up and that also works on my PC.
Maybe your download got corrupted?

I have produced a version 3.1 that slightly changes the handling of minutes on the x-axis again. But the main change is to the HTML paragraphs describing the graphs, I have tidied those up now. EDIT - version 3.1 originally posted here now removed as superceded by later version.

Duke - Just finished doing some watering with my hose and locked up the doors. The additional burden on me is I spend several days away from my garden because of some of my responsibilities. I might be interested in weather for why the showers miss me, but it is this coding lark that is annoying me by taking me away from the few hours I can be in the garden...
Last edited by sfws on Thu 07 Aug 2014 8:54 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 »

Now it works again, dont know what was wrong. However now the x-axis scale is wrong way and I dont seem to be able to flip the graphs to RHS by setting the reverse switch true or false. But this isnt a mayday so please take your time with garden by all means :)
You do not have the required permissions to view the files attached to this post.
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 »

Okey so I moved reversed: true down a bit (below one brackets) and now its flipped to RHS. However now the scale is flipped wrong too xD. Well, Ill experiment with it :)
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 »

I thought '7 days ago' was earliest and you wanted that on left side.

Code: Select all

				startOnTick: false,
				tickInterval: 24, // mark off days (24 hours)
				tickWidth: 3,
				labels: {
					formatter: function() { // function to convert 'string' hours into days for x-axis labels
						var hoursAgo=parseInt(this.value,10);
						var daysAgo=hoursAgo/24;
						//var dayNameArray=[],dayLabel;
						//dayNameArray= metDayName("<#dayname>");
						//dayLabel=dayNameArray[daysAgo]+' (Noon)';
						 var textAgo=(daysAgo==1)?daysAgo+' day ago':daysAgo+' days ago';// singular or plural
						 return textAgo;
						//return dayLabel;
					}
				},
				reversed: true
			},
			legend: {
determines what appears as labels on x axis. 'this.value' is the x-axis count from the left.
The 'reversed' property is true if the first value in your arrays is to be plotted on the right hand side, false if the y values are to be plotted left to right in the same order as they appear in the arrays declared for the series.

I did originally start the design for you with days of week shown, but that was really complicated to do with my original most recent on left and I gave up. I have days of week shown on my test version at noon each day , but it is a messy solution as the commented out bits in my code above suggest, so I have not shared it and perhaps someone else has a neater solution.
tempe wrote:Okey so I moved reversed: true down a bit (below one brackets) and now its flipped to RHS. However now the scale is flipped wrong too xD. Well, Ill experiment with it :)
With my posting of my first version I mentioned positioning of brackets was very tricky. Whilst I cannot be absolutely certain all my brackets are correct, (EDITED rest of this posting in light of reply to above part of this posting) I was surprised to see that I had got that wrong, but thanks for letting me know I had made a mistake again. Would those who download my version 3.1 be aware they need to apply the correction that you have applied by moving reversed: true to new position as shown in code example above (ignore extras that I have commented out about day names) and make change mentioned in next reply.

I have a busy few days now so I will not be doing any experimenting nor correcting of my zipped version 3.1.

You've now shown a tooltip successfully, you can match values shown in that tooltip against what you see if you use View menu, Data Logs option and load the Aug14log.txt file.
Last edited by sfws on Mon 04 Aug 2014 9:05 pm, edited 4 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 »

Yes I changed var hoursAgo=168-parseInt(this.value,10); to var hoursAgo=parseInt(this.value,10); and positioned the reverse switch one bracket down so it would affect x-axis instead of labels, now it works perfectly! New data on the right side. Thanks! And sorry if I my writings were confusing, probably didnt make myself clear which way etc it should be :)
duke

Re: Different time trends ?

Post by duke »

I might be interested in weather for why the showers miss me
They miss you too....
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 was moved into "3rd Party tools" sub-forum because it drifted away from its original query in Cumulus main forum of what Cumulus software could do, with this experiment by me on how 'recent history' tags and 'Highcharts' scripts could be combined.

In '3rd party tools' you will find there is a new topic at https://cumulus.hosiene.co.uk/viewtopic.php?f=18&t=12321 that will contain any newer versions of my variant on 'trendsT.htm', so I no longer support anything that was in this thread.
Last edited by sfws on Fri 07 Nov 2014 9:12 am, edited 1 time in total.
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 »

Back to original subject on this topic ...http://sanday.org.uk/weather/trends.htm
Has anyone else noticed that Cumulus 3 seems to be proposing to replace thumbnails with buttons and use a different approach for the large graphs?

Whilst I have not had time to study 'cumuluscharts.js' to work out where the data points come from, there is presumably some scope for tailoring the graph to some different periods?
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: Different time trends ?

Post by steve »

sfws wrote:Has anyone else noticed that Cumulus 3 seems to be proposing to replace thumbnails with buttons and use a different approach for the large graphs?

Whilst I have not had time to study 'cumuluscharts.js' to work out where the data points come from, there is presumably some scope for tailoring the graph to some different periods?
The data comes from JSON files generated and uploaded automatically by the new version of Cumulus. Yes, it would definitely be possible to allow different time periods, and I was going to add that to the first release, but as I still have quite a bit to do on the user interface (which has the same graphs), I decided I would leave that for further enhancement later on.
Steve
duke

Re: Different time trends ?

Post by duke »

Slightly off topic - sorry. Steve, you hinted in an earlier post that the new Cumulus would have a different 'webtag' template/format. Is it possible you could release a preview/version of that for us that use PHP for our sites to look at?
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: Different time trends ?

Post by steve »

The web tags are 99% the same as in the current version, and the templates are the same apart from the gauges (I'm using Mark's SteelSeries) and the graphs.

The main difference with the web tags is the date/time 'format' parameter. The current version uses Delphi format specifiers, and the new version uses .Net; there's a page describing them here - http://msdn.microsoft.com/en-us/library ... .110).aspx

The differences come about because Delphi is case-insensitive, and .Net is case sensitive, so .Net can use upper and lower case for different items, where Delphi has to use different letters. For example, in Delphi, "nn" means "minutes", and this will need changing to "mm". "hh" in Delphi is the hour in 24-hour format, and in .Net it's "HH".

The other change with the "format" parameter is the different way that .Net escapes characters which are not to used as format specifiers. In Delphi you put the 'verbatim' characters inside single quotes; in .Net you escape each verbatim character with backslashes.

I might be able to produce a converter if the above is a serious issue.
Steve
duke

Re: Different time trends ?

Post by duke »

Thanks for your explanation Steve, I would have to read a bit more later on but it would appear to me that the 'replace all' facility in the average web page editor or Notepad++ would easily be able to deal with this once we are aware of all the differences.
Post Reply