Page 1 of 1

Sanday Weather mouse over charts

Posted: Mon 10 Nov 2014 7:24 pm
by mareid123
How do you make the charts like the ones on your website: http://www.sanday.org.uk/weather/trends.htm? I am using Cumulus v.1.9.4, and my trend page is not like yours. My graphs are not interactive and don't have the mouse over feature.

Re: Sanday Weather mouse over charts

Posted: Mon 10 Nov 2014 8:19 pm
by steve
It's the new version of Cumulus that I'm still developing.
2014-11-10 20_16_20-Sanday weather.png
It uses a JavaScript charting package called NVD3 (based on d3.js).

You can do something similar with the current version of Cumulus using NVD3, or something like Highcharts, see http://wiki.sandaysoft.com/a/Highcharts_-_Realtime for example.

Re: Sanday Weather mouse over charts

Posted: Mon 10 Nov 2014 8:55 pm
by Spider-Vice
Looks like we inadvertently got a sneak peek at the new graphs in Cumulus 3! :p Jokes aside, that actually looks pretty awesome.

Re: Sanday Weather mouse over charts

Posted: Mon 10 Nov 2014 9:42 pm
by mcrossley
Spider-Vice wrote:Looks like we inadvertently got a sneak peek at the new graphs in Cumulus 3! :p Jokes aside, that actually looks pretty awesome.
Yep, very nice.

One small problem Steve, on the two machines I've tried the graph does not draw the first time the page loads. On a refresh it is fine, I noticed it on my laptop and phone, both using Chrome. I cannot reproduce it once the page has been loaded once, even after clearing the cache, so I'm not sure what the problem is.

Re: Sanday Weather mouse over charts

Posted: Mon 10 Nov 2014 10:53 pm
by steve
It always loads first time for me. Do you get any javascript errors?

Re: Sanday Weather mouse over charts

Posted: Mon 10 Nov 2014 11:21 pm
by PaulMy
I also took a peek and it loaded correctly (actually looked more than once ;) ) and ok each time.

Paul

Re: Sanday Weather mouse over charts

Posted: Tue 11 Nov 2014 3:32 am
by mareid123
They work (and look) great on my computer! I didn't have any issues, even on the first load. I tried playing with Highcharts, but I haven't had any luck with them yet. I really like the look and functionality of your updated trends. They are what made me ditch VWS and install Cumulus.

Re: Sanday Weather mouse over charts

Posted: Tue 11 Nov 2014 6:12 am
by nossis
Ah very nice.... Worked fine for me in Aus. Took a bit to load but no need to refresh
Worked in IE11 and Firefox 33

I have been wanting to do High Charts or similar but since I am technically challenged and often lazy... This addition would be very much appreciated within the standard setup! Looks mighty fine! :clap:

Re: Sanday Weather mouse over charts

Posted: Tue 11 Nov 2014 7:36 am
by steve
Mark, could the problem that you're seeing be something to do with the order of loading of the js files, and/or where on the page they are loaded? The page could do with tidying up anyway, with its mix of internal and external css and js.

It's odd that only you seem to have a problem. Quite a few people have commented on the graphs in the three months that they've been on my web site, but no-one before has ever mentioned having a problem.

Re: Sanday Weather mouse over charts

Posted: Tue 11 Nov 2014 10:00 am
by mcrossley
steve wrote:Mark, could the problem that you're seeing be something to do with the order of loading of the js files, and/or where on the page they are loaded? The page could do with tidying up anyway, with its mix of internal and external css and js.

It's odd that only you seem to have a problem. Quite a few people have commented on the graphs in the three months that they've been on my web site, but no-one before has ever mentioned having a problem.
It could be, and there was a JS error, but I didn't catch it. It was one of the core modules (NV ?iirc?) was not declared when it was required, which is odd as all the scripts should be downloaded before any is run.

I still cannot reproduce the issue though so I wouldn't worry about it.

One optimisation would be to move the inline script in the header to your page cumuluscharts.js file.