Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - 28 November 2014
Latest Cumulus MX release v3.0.0 build 3046 - 02 January 2019. See the Wiki for download

Highcharts Tides

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Mapantz
Posts: 559
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: null
Operating System: null
Location: null

Re: Highcharts Tides

Post by Mapantz » Sun 30 Dec 2018 9:32 pm

I've uploaded and filled in the necessary stuff, but I get a blank page and no cache file. :cry:

Big Daddy
Posts: 72
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Maplin N96FY
Operating System: Windows 8
Location: Freiston, Lincolnshire, UK

Re: Highcharts Tides

Post by Big Daddy » Sun 30 Dec 2018 9:40 pm

Sorry Mark, but it seems to throw up some other errors as well

PHP Warning: Missing argument 1 for uk7daytides::getTides(), called in /var/www/html/Tides/tideDemo.php on line 15 and defined in /var/www/html/Tides/uk7daytides.php on line 53, referer: http://192.168.0.5/Tides/
PHP Warning: Missing argument 2 for uk7daytides::getTides(), called in /var/www/html/Tides/tideDemo.php on line 15 and defined in /var/www/html/Tides/uk7daytides.php on line 53, referer: http://192.168.0.5/Tides/
PHP Notice: Undefined variable: stationId in /var/www/html/Tides/uk7daytides.php on line 55, referer: http://192.168.0.5/Tides/
PHP Notice: Undefined variable: duration in /var/www/html/Tides/uk7daytides.php on line 56, referer: http://192.168.0.5/Tides/

Doesnt seem to affect the drawing of the graphs.

Andy

Big Daddy
Posts: 72
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Maplin N96FY
Operating System: Windows 8
Location: Freiston, Lincolnshire, UK

Re: Highcharts Tides

Post by Big Daddy » Sun 30 Dec 2018 9:44 pm

Hi Mapantz,

Had the same and already reported back to Mark.

It seems to be caused by the very first line of tideDemo.php file where it has this:
<?php require 'zbblock.php'; ?>

It looks for this file and as it doesnt find it hangs.

I removed it and all is ok.

Read my post on bottom of page 2 of this topic.

Andy

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

Re: Highcharts Tides

Post by mcrossley » Sun 30 Dec 2018 9:47 pm

The zbblock include shouldn't be there, let me take a look at the other errors, but it will be tomorrow now.

The idea of the class is that you can instantiate it once, then call getTide() multiple times with different station IDs, once for each port. If you do not pass a station ID, then it defaults to the one defined in the class file.

That was the theory anyway, I need to check if the files I zipped contained all the latest updates...

Mapantz
Posts: 559
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: null
Operating System: null
Location: null

Re: Highcharts Tides

Post by Mapantz » Sun 30 Dec 2018 9:51 pm

Big Daddy wrote:
Sun 30 Dec 2018 9:44 pm
Hi Mapantz,

Had the same and already reported back to Mark.

It seems to be caused by the very first line of tideDemo.php file where it has this:
<?php require 'zbblock.php'; ?>

It looks for this file and as it doesnt find it hangs.

I removed it and all is ok.

Read my post on bottom of page 2 of this topic.

Andy
I use zbblock myself, so it isn't that. I removed it for now anyway. :)

I've turned on error checking and nothing pops up.

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

Re: Highcharts Tides

Post by mcrossley » Mon 31 Dec 2018 11:40 am

Looks like I updated my local zip and never sync'd it to my server :bash:

I've also added a couple of examples of calling .getTide() to the sample HTML page.

Let's see if this is any better!

User avatar
jdc
Posts: 140
Joined: Tue 19 Jun 2012 8:51 pm
Weather Station: Davis VP2 : Instromet
Operating System: Win 10 : Win XP
Location: Berwick-upon-Tweed, England.
Contact:

Re: Highcharts Tides

Post by jdc » Mon 31 Dec 2018 2:54 pm

I made this page recently using the API but don't have Mark's skills - so kept it simple.
I'd like to 'prettify' the chart a bit more sometime. :?
http://lethamshank.co.uk/met/localwx.htm?page=wx_tide

Going to download for improvement ideas. :oops:

Big Daddy
Posts: 72
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Maplin N96FY
Operating System: Windows 8
Location: Freiston, Lincolnshire, UK

Re: Highcharts Tides

Post by Big Daddy » Mon 31 Dec 2018 3:22 pm

Hi Mark,
Thanks. Will take a look when I get back home in a couple of days. Have had to put my web stuff on hold for some sort of family New Year get together. Funny, it only seems like a week since we had the last get together.

Enjoy the New Year everyone and here is to keeping Cumulus alive.

Andy

Big Daddy
Posts: 72
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Maplin N96FY
Operating System: Windows 8
Location: Freiston, Lincolnshire, UK

Re: Highcharts Tides

Post by Big Daddy » Sun 06 Jan 2019 4:43 pm

Hi Mark,
Firstly, a big thank you for putting this together and getting something out that I have been able to implement. I have spent a few days on this trying to learn whats going on and using some of the little knowledge I gleamed from working with the CumuluxMX charts to get the following.

http://midlifedad.me.uk/weather/boston_tides.php

You can click on the tides button in the top right and select different ports.

One thing I cant work out is that the 1 day zoom only works on the above page and not any of the other 5. All my PHP pages are identical with a couple of minor text changes and a change of name of the variable $data, which is $data on this page, $data2 one another, $data3 etc.

I cant really find any answer on the internet with teh exception that they are automatically disabled in highcharts / highstock if the rleveant data isnt present. When I inspect the webpage in Firefox I can see this particular zoom button shows as "disabled" on all pages except the one above where it say "normal"

Its not a big problem, more of a nicety.

Andy

Mapantz
Posts: 559
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: null
Operating System: null
Location: null

Re: Highcharts Tides

Post by Mapantz » Sun 06 Jan 2019 5:30 pm

I've just got around to the updated version. All working!

I'm just gonna add in my css and stuff. This is very useful to me. Thank you! :)

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

Re: Highcharts Tides

Post by mcrossley » Mon 07 Jan 2019 9:47 am

Big Daddy wrote:
Sun 06 Jan 2019 4:43 pm
One thing I cant work out is that the 1 day zoom only works on the above page and not any of the other 5. All my PHP pages are identical with a couple of minor text changes and a change of name of the variable $data, which is $data on this page, $data2 one another, $data3 etc.
I think may be because 1 day does not give you enough data points to draw the spline curve?

Post Reply