Page 23 of 24

Re: Highcharts Graphs

Posted: Sun Aug 13, 2017 7:58 pm
by Mapantz
jlmr731 wrote:
Mapantz wrote:
Could you upload or link me to your .js for me, i'll have a look.



here is the script, as you can see its pretty much the default cumulusmx script only change i made was to add in a few more buttons on the temp graph and to a php file to get data from mysql

http://www.youngstownweather.com/js/mycumuluscharts.js


What's the graph page that uses that .js? I need to see what's happening, re the buttons disappearing..

Edit: Are you talking about the buttons being greyed out so you can't click them? If so, that would because you don't have enough data to show at those time/date ranges.

Re: Highcharts Graphs

Posted: Sun Aug 13, 2017 9:06 pm
by jlmr731
Mapantz wrote:
jlmr731 wrote:
Mapantz wrote:
Could you upload or link me to your .js for me, i'll have a look.



here is the script, as you can see its pretty much the default cumulusmx script only change i made was to add in a few more buttons on the temp graph and to a php file to get data from mysql

http://www.youngstownweather.com/js/mycumuluscharts.js


What's the graph page that uses that .js? I need to see what's happening, re the buttons disappearing..

Edit: Are you talking about the buttons being greyed out so you can't click them? If so, that would because you don't have enough data to show at those time/date ranges.


Sorry thought you wanted the js page
The main page would be http://www.youngstownweather.com/trends1.php
right now the selected: 0 is in there where you thought it should go
It will show the graph as expected but dont get the buttons to change range

Re: Highcharts Graphs

Posted: Sun Aug 13, 2017 9:27 pm
by Mapantz
Change the 0 to a 1, 2 or 3.

If you move the range selector along the bottom of the graph, the buttons appear. :D

Re: Highcharts Graphs

Posted: Sun Aug 13, 2017 10:30 pm
by jlmr731
Strange that they appear after movement, and changing the option does not help that.

Atleast im getting somewhere with it.
thanks

Re: Highcharts Graphs

Posted: Thu Aug 31, 2017 12:45 am
by UncleBuck
Hi Mark,
I was wondering if you would be willing to share your table structure and trigger you use with the "comfort" graph?
I have it nearly all working now but that one graph is causing me grief as it appears to have changed quite significantly from the very first incantation of it.

Regards,
Colin.

Re: Highcharts Graphs

Posted: Sun Sep 10, 2017 1:44 pm
by billy
I can't find the right way of getting the source code of utils/realtimeLogSql.php for the recent graphs. I can run it from Mark's web site but can't download it as I have been able to do with all the php scripts for the historic graphs. Help would be appreciated.

Re: Highcharts Graphs

Posted: Mon Sep 11, 2017 1:36 am
by billy
I'll answer my own question: http://weather.wilmslowastro.com/utils/realtimeLogSql.php?view=sce. It's the subtle variations in parameter settings you idiot. :groan:

Re: Highcharts Graphs

Posted: Thu Jan 11, 2018 2:03 pm
by billy
Is there a simple answer to my dilemma? For some days, wind data (only) are missing because contact with the sensor was lost. There are a few occasions where this has occurred, with some instances of some consecutive days of missing data. The dayfile records are uploaded to a MySQL db and for the days where there is a complete absence of data, the wind values are zero. So, I would like suggestions on the relative benefits of these options:

1. Leave as is. Let sleeping dogs lie and accept that historic daily wind graphs, for example, have some dips down to zero.
2. Replace the zeros with interpolated values from either side of the missing periods. Would lead to some improvement in the look of the graph at least?
3. Get the data from nearby stations; although don't know whether this is possible. But it would/should improve the graphs appearances.
4. Change the wind variables to allow null values and set the zeros to null. And what might the flow-on effects of this be?

I'm sure others with much wiser and more experienced heads than mine, have thought this through. What do you suggest?

Re: Highcharts Graphs

Posted: Sun May 06, 2018 10:39 am
by uncle_bob
Hi Mark, or anyone else with an answer :)
I'm tying to set up the ImportCumulusFile.php script but it bombing out with the following.
Any ideas?

Running from web server
Script start: 06/05/18 - 12:34:38
Importing file: C:\Cumulus\data\dayfile.txt, To table: Dayfile ...
Connected to database OK.
Set MySQL TZ OK.
Processing dayfile...
Target table already exists.
Prepared SQL statement OK.
Inserting data...
Error: Failed to bind the SQL parameters!

Re: Highcharts Graphs

Posted: Sun May 06, 2018 4:59 pm
by mcrossley
Which version of the script?
Which version of the script created the database tables?

Re: Highcharts Graphs

Posted: Sun May 06, 2018 10:04 pm
by uncle_bob
3.1 for both (it's a new installation, just have run the script more that once)

Would I see that if the path is wrong to the log file?
It's running on Xampp on Windows and Cumulus1 is on C:/Cumulus (

Re: Highcharts Graphs

Posted: Mon May 07, 2018 9:08 am
by mcrossley
Ah, how far back does your data go?

I suspect that you may be being caught by the fact that newer versions of Cumulus added extra data to the file. The script may be trying to import data to columns for which no data exists in the file (or at least the number of "empty" commas doesn't match the number of fields in the current version).

Re: Highcharts Graphs

Posted: Mon May 07, 2018 10:20 am
by uncle_bob
Here's the first five lines from the dayfile.

Code: Select all

31/12/01,13.0,22,11:03,20.7,09:01,30.1,11:29,1010.7,11:24,1011.7,09:04,0.0,09:00,0.0,25.0,2.9,3.9,11:24,44,11:04,67,09:00,0.00,0.0,30.4,11:29,31.9,11:29,22.1,09:01,0.0,09:00,20.7,09:01,16.9,11:29,14.4,09:01,347,0.0,0.7,,,,
31/12/01,6.5,360,02:02,0.0,01:34,26.7,01:35,0.0,01:34,1013.0,08:02,0.0,01:34,0.0,22.0,6.5,6.5,02:02,0,01:34,63,08:02,0.00,0.0,27.0,01:35,27.9,01:35,0.0,01:34,0.0,01:35,0.0,01:34,16.9,01:34,7.3,02:02,359,0.0,1.1,,,,
31/12/01,6.5,360,11:33,21.0,09:00,24.7,11:37,1011.1,10:40,1011.7,09:57,0.0,09:00,0.0,22.6,0.0,0.5,11:37,69,11:33,82,09:00,0.00,0.0,24.7,11:37,27.8,11:37,23.6,09:03,0.0,09:00,21.0,09:00,18.9,11:37,17.6,09:03,8,0.0,0.5,,,,
01/01/02,25.9,135,15:15,21.9,09:02,30.8,13:02,1010.1,14:02,1012.7,09:02,0.0,00:00,0.0,26.7,72.5,7.8,15:15,34,13:02,61,09:02,0.00,0.0,29.9,13:02,31.8,13:02,23.2,09:02,0.0,00:00,21.9,09:02,15.1,12:02,10.7,15:15,132,8.4,0.0,0,00:00,0.0,00:00
17/08/11,27.0,67,21:48,0.0,03:47,10.4,00:26,943.7,04:14,948.2,21:51,18.0,00:59,62.2,8.1,30.7,27.0,21:48,89,00:56,92,05:33,0.00,0.0,20,05:47,21,05:47,-2.2,03:47,5.2,00:28,2.2,21:48,50.8,03:44,2,03:03,,,,,,,


So there's bad data right there as I never had a station in 2001

EDIT: So I deleted that bum data and tried again, no dice yet.

Re: Highcharts Graphs

Posted: Mon May 07, 2018 10:43 am
by uncle_bob
Just to note that I tried a monthly and that worked!

Re: Highcharts Graphs

Posted: Mon May 07, 2018 1:31 pm
by mcrossley
OK, I'll use that data to try it later tonight.

If you fancy trying version 2.8 of the script, that does not use parameter binding, it isn't as fast for bulk uploads, but it may be interesting to see if that works, and if not the error may be more helpful.