Trouble setting up Highcharts

66 views
Skip to first unread message

steeple ian

unread,
Jun 1, 2019, 5:14:12 AM6/1/19
to weewx-user
Gary,

I installed Highcharts extension a couple of years ago without any problem. Since then after a couple or so of re-builds of my system, the extension was never re-installed. I now want to revisit some of what I did before and re-installed the extension. For the life of me I cannot get it to work. The generation of the json data files is happening, but when it comes to using the example graphs.html web page, no charts are rendered. 

I have gone through the logs and nothing jumps out at me. I have uninstalled/reinstalled a couple of times to no avail. Have checked all the paths, again nothing obvious turns up. The only difference from my previous set up was obviously an older version of WeeWX via a Deb install, whereas now I am using 3.9.1 via a setup.py install.

It looks like I am missing something very obvious, but its just not jumping out at me.

Thanks,
Ian





gjr80

unread,
Jun 1, 2019, 9:38:19 PM6/1/19
to weewx-user
Ian,

The two main parts to the Highcharts extension are the WeeWX skin that generates the json format data file and the html/javascript that displays the plot(s). WeeWX only real involvement is the generation of the json format data file, nothing fancy there and 3.9.1 should be compatible with the skin. The only issue I can think of here is perhaps the new skin config sitting hierarchy introduced in WeeWX 3.9.0, but that would likely only (at worst) result in unexpected number formats or units. If your json file is being generated without error it should be usable (a useful tool for checking your json output is one of the online json validators, I use jsonlint.com, just open the validator page, copy the contents f your json format file and paste into the validator, hit the button and it gives you a yay or nay.

Given your description, it sounds like a javascript issue on your page. Easiest way to troubleshoot Highcharts is to through your browsers console/web console. where you can see any javascript errors. Where to find the console is browser dependent, I mainly use Firefox and it is under Web Developer -> Web Console or Web Developer -> Browser Console.Under Chrome it is under More Tools -> Developer Tools. Once you have the console open, clear it if it has any content and then force a reload of your html. Then its a case of looking for any (relevant) errors in the console output. Likely errors are a script (including Highcharts) loaded by the page being unable to be found, a script being unable to locate a file or Highcharts choking on incorrect data/settings in a file.

If your graph page is public facing if you are happy to give us the address I can look at the javascript console myself.

Gary

steeple ian

unread,
Jun 2, 2019, 2:27:42 AM6/2/19
to weewx...@googlegroups.com
Gary,

Thanks for your detailed response. It is on my test server which it is no public facing. I will give it another go using your hints. If I continue to fail I will install on my public server to let you have a look.

Thanks again,
Ian

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/43f50af3-38c6-41a4-84e6-e8eb58c3599e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

steeple ian

unread,
Jun 2, 2019, 4:21:15 AM6/2/19
to weewx...@googlegroups.com
Hi Gary,

All working thanks to your hints.

It did not like these two lines in graphs.html: -

    <script src="../scripts/js/theme.js" type="text/javascript"></script>
    <script src="../scripts/js/plots.js" type="text/javascript"></script>

I dropped the ../ in front and hey presto! I knew it would be something so obvious that I had not spotted.

Thanks once again.

Ian


Reply all
Reply to author
Forward
0 new messages