Iotawatt won't save graph

I used to create graphs without problems, give it a name, hit the save button, and I can access that graph anytime.
Now, when I try to save a graph, Iotawatt won’t save the date settings. I configure the date from (start) Feb 17 2026 to (end) Feb 16 2027, but when I try recall the graph, the date is today for both the start and end dates.

Nothing I do seems to be able to force it to save the proper date range.
I tried a reboot but it didn’t work.

I took a quick look and would have to say that I don’t think it ever worked in graph+. That said, the times are saved with the graph so it should be possible. Its been a long time since I worked on that JQUERY code so it will take a few days before I can come back up to speed and make that work. I’ll get back to you.

Upon further examination I see what is going on, why you thought it used to work and now doesn’t and how to either fix it or work around it.

I can recreate the problem by selecting any relative period for the graph and subsequently changing the dates either by explicitly modifying the start or end date, using the zoom/forward/back keys or selecting a section of the existing graph with the mouse. Notwithstanding the period shown is changed to “custom dates”, such a graph when saved restores with the original relative period selected prior to date override and generates the appropriate relative dates. .

On the other hand, if “custom dates” is explicitly selected from the period drop-down, any graph subsequently saved will retain the dates at the time of saving.

I would call this a bug in that the “period” drop-down is automatically changes to “custom dates” whenever you implicitly change the date range, so this graph2.js file will fix the problem in either case. Simply download it and then upload to your IoTaWatt root.

1 Like

Thank you! I did seem to figure it out by manually setting the custom date option, then selecting the dates. It would seem that if I just select dates and let it change to custom dates on its own, it won’t save the changes.
Thank you!!!

When I click on the graph2.js to download I get and can’t seem to get it.

Don’t know what’s going on with discourse. I get the same thing. I’ve modified the post to take you to github where there is a download button for the file. Probably better than putting a static copy in the forum anyway.

1 Like