I found a spot in the AI2 Charts component Usage Guide covering usage of a TinyDB instance as a Data Source:
I haven't tried this yet, but I am guessing organizing your data by month in separate TinyDB NameSpaces of the form yyyyMM (202312) would allow you to keep a table of (day,reading) values under tags for 'weight', 'bloodPressure', etc.
Day of Month makes a nice x coordinate in a graph.
Testing if today's entry had already been added would be done by a lookup by pairs against the two column table of (day,reading) pairs for that reading category.
To add a new day's reading...
- set the TinyDB NameSpace to the desired yyyyMM value
- retrieve the tag/value you want to update (weight) into a variable
- lookup in pairs against that variable to see if it has an entry for the desired day.
- if present, complain
- if not present
- add row (day, reading) to the table
- store the table back into TinyDB
Would you like to see a sample?