Page 1 of 1

directly linking to charts

Posted: Sun 06 Mar 2016 7:42 pm
by malone
I've just transferred my old Cumulus system from an XP machine to a CumulusMX system on a Windows 8 machine with no difficulty and no problems have emerged in the first few days.

One question. With the previous Cumulus I could have a direct link to various charts as .png files - for example \\fujitsu\Cumulus\web\images\raint.png would display the rain chart. Now that the images are generated differently it appears I can only link directly to http://fujitsu:8998/charts.html and then have to navigate to the rain chart. Can someone explain how I can link directly to the rain chart, or any other chart?

Many thanks.

Re: directly linking to charts

Posted: Sun 06 Mar 2016 8:01 pm
by steve
I can't think of any way that you can do that with the code that I've supplied, but of course the code is there to be modified as required. One way to do it would be to pass a parameter on the URL (...?chart=temp) and change the javascript so that it extracts that parameter and opens the requested chart.

Or you could use these: https://cumulus.hosiene.co.uk/viewtopic.php?f=27&t=13189

Re: directly linking to charts

Posted: Mon 07 Mar 2016 2:46 am
by malone
Thanks very much for those pointers Steve. Unfortunately my currently rather limited knowledge of javascript and associated techniques means that I'm going to have to spend some time getting up to speed with those approaches. In the meantime I've just quickly written a program using VBA in Excel (with which I am very familiar) which extracts relevant data from the files(s) in the Cumulus/data folder and produces a rudimentary chart - not very pretty, but adequate for my requirements.

Re: directly linking to charts

Posted: Tue 08 Mar 2016 2:45 pm
by njc
If you replace the cumuluscharts.js file with the one I have attached, you can do this:

/trends.htm?graph=temp or /trends.htm?graph=press , etc.

The options are:
  • temp
  • dailytemp
  • press
  • wind
  • windDir
  • rain
  • dailyrain
  • humidity
  • solar
  • sunhours
I've added a comment block in the file indicating what I've added/modified. It's all at the top of the file.

Nick

Re: directly linking to charts

Posted: Tue 08 Mar 2016 7:29 pm
by malone
Thanks Nick - that works fine. And it's also going to be extremely useful for me to examine your code to understand how you did it..

Re: directly linking to charts

Posted: Wed 09 Mar 2016 4:40 pm
by njc
@malone: Glad it works, let me know if you have any questions about it.