So you mean the weewx-highcharts extension <https://github.com/gjr80/weewx-highcharts>? If so that extension was never designed to provide non-aggregate monthly data files. This was for a couple of reasons. Firstly file size, a week of non-aggregated observations results in a data file of around 700kB, a month would blow this out to around 3MB. Secondly, and probably more important, was the generation time. At the time of writing and on the hardware (RPi) I had at the time the generation time was quite long compared to my five minute archive period. Consequently I chose to implement a week json data file with non-aggregate data and a year json data file that held daily max/min/sum (as appropriate) and the search list extensions involved are hard coded accordingly.
That being said RPs are now more powerful so a monthly non-aggregate data file may be usable. You would need to edit the HighchartsWeek() search list extension source code in user/highchartssearchlist.py, around line 378 change: _start_dt = _ts_dt - datetime.timedelta(days=7) to: _start_dt = _ts_dt - datetime.timedelta(days=30) Not essential but you might also want to change the name of the template in skins/Highcharts/json from week.json.tmpl to month.json.tmpl or something else to avoid confusion. I believe there is no need to change the content. That gets you a month json data file but then you need Highcharts to render the data. The javascript file plot.js may need some changes. Certainly if you change the json data file name from week.json you will need to change all occurrences of week.json in plot.js (perhaps this is cause enough to leave the json data file name as week.json). I think Highcharts will automatically set the plot scales etc but maybe not. I had a quick look at plot.js and saw no other obvious issues. I'm sorry but I don't have the time just now to be able to rewrite the extension for you. On Monday, 22 November 2021 at 16:37:48 UTC+10 Astrid wrote: > Hello! > > Sorry, I forgot to write, that I mean week.json, which is from your > pretty highcharts. > > Regards, Astrid > > gjr80 schrieb am Sonntag, 21. November 2021 um 20:46:48 UTC+1: > >> Impossible to say without knowing how you are generating week.json; is >> this a report you have written or an extension you have installed? Either >> way we need some details. >> >> Gary >> >> On Sunday, 21 November 2021 at 23:40:26 UTC+10 Astrid wrote: >> >>> Hello! >>> >>> How can I change the configuration of weewx (v 4.5.1) that >>> in the file week.json the data of 30 days will be collected? >>> >>> Thanx. >>> >>> Regards, Astrid >>> >> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/590e9a6b-42dd-4108-9db9-3dc0d5e7e536n%40googlegroups.com.
