Display historical data as calendar grid

I’d like to make a widget to display hisgtorical data in a grid format rather than chart form. As a concrete example, take this chart of historical rainfall:

and display it in a calendar format, with 4-5 rows of 7 columns.

With thumbnails not displaying in the UI add-on marketplace, I’m having difficulty finding an existing widget that I might use as a starting point.

I know exactly your feeling. I have given Kai 2 examples and hope this is raising priority among all the other important stuff he is doing and it will be resolved some time.

Unfortunately I think this is due to some back-end Forum changes/migration broken link structure and there is nothing I can help with.

Best
Mario

I don’t think there’s any built-in way to do this. The chart widgets all process the persistence data internally so you do not have access to those numbers in other widget components, and there’s no calendar chart to do it directly.

There may be enough use for something like this, however, that you could put in a feature request on the webui repository for it and see if someone wants to create a new calendar chart option.

In the meantime, the best way to do this will require also using a rule. Personally I would create a String Item, and use a rule running every midnight to add the previous day’s total to a JSON array which gets stored in that string. Then in a widget you can use an oh-repeater to parse that JSON string and use the data in the array in any way you choose, including building a calendar (which will also have a few technical challenges, but nothing too difficult).

Here’s an example of a similar system I’ve posted previously:

(Alas, it is subject to the current forum image issues, but the images are not the critical part.)

2 Likes

I feel a little better. I’ve been thinking about this for a while and wondering what I was missing.

I’ll go down the JSON text string avenue and see how it works out.