Hi,
I noticed that the degree days charts have no values. The graph is drawn, but the numbers are missing. I've looked at other users' websites and it works fine for them, e.g. in your site Hans.
As if you'd take a look at it
https://pogodarybnik.pl/graphsmisc.htm
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Misc graphs (degree days) without values
Moderator: HansR
- HansR
- Posts: 6025
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: Misc graphs (degree days) without values
There is a javascript function
which resides in cumulusutils.js.
Originally it was copied several time in each graphs file where required (two at the moment) but I moved it to cumulusutils.js to have only one entry point.
You have two options (as you create your own CUtils environment more or less):
Code: Select all
function DayNumber2Date(dayNumber, year) {
const date = new Date(year, 0, dayNumber);
return date.toLocaleDateString('nl-NL');
}
Originally it was copied several time in each graphs file where required (two at the moment) but I moved it to cumulusutils.js to have only one entry point.
You have two options (as you create your own CUtils environment more or less):
- You include the function in your file where you need it as a <script>
- You include cumulusutils.js in your file. The advantage of this is that if I make changes you will have them automatically, the disadvantage is a performance penalty (though that may that may not be too big). I have no idea about secondary effects. If any you may have to switch back to the
previous point.
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
- HansR
- Posts: 6025
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: Misc graphs (degree days) without values
I assume you just include graphsmisc.txt in your webpage? Do you edit this manually?
I'll have to find a better method for inclusion of this function I assume.
I'll have to find a better method for inclusion of this function I assume.
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
- Dador
- Posts: 234
- Joined: Thu 24 Nov 2011 2:22 pm
- Weather Station: Davis VP2 Plus & Ecowitt
- Operating System: Windows 10
- Location: Rybnik, Poland
- Contact:
Re: Misc graphs (degree days) without values
I used the second way. Works. Once again thanks for your help .HansR wrote: ↑Sat 02 Sep 2023 5:36 pm You have two options (as you create your own CUtils environment more or less):
- You include the function in your file where you need it as a <script>
- You include cumulusutils.js in your file. The advantage of this is that if I make changes you will have them automatically, the disadvantage is a performance penalty (though that may that may not be too big). I have no idea about secondary effects. If any you may have to switch back to the
previous point.
I do that
Code: Select all
<?php include('graphsmisc.txt');?>
- HansR
- Posts: 6025
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: Misc graphs (degree days) without values
Good.
That's what I suggested originally a long time ago so I can live with that
It only means I have to find the solution within the graphmisc module to maintain modularity.
I'll look at it, if anything found you'll see it in the release notes.
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
- HansR
- Posts: 6025
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: Misc graphs (degree days) without values
And looking back at the code: are you generating the module graphs separately or are you generating website and using the files resulting from that?
The solution should already be there if you generate graphs (or at least it should be) and include the resulting graphsmisc.txt in which case you do not need to include cumulusutils.js
I don't think anybody used this before so it has not been verified.
The solution should already be there if you generate graphs (or at least it should be) and include the resulting graphsmisc.txt in which case you do not need to include cumulusutils.js
I don't think anybody used this before so it has not been verified.
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
- Dador
- Posts: 234
- Joined: Thu 24 Nov 2011 2:22 pm
- Weather Station: Davis VP2 Plus & Ecowitt
- Operating System: Windows 10
- Location: Rybnik, Poland
- Contact:
Re: Misc graphs (degree days) without values
In fact, I've been using Extrasensors Top10 Graphs modules since it's possible. I am not generating the entire website.
- HansR
- Posts: 6025
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: Misc graphs (degree days) without values
OK. I'll look at it again, it should work without the additional inclusion of the runtime.
Hans
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3