How to store any data on tinydb daily and retrieve theme as weekdays data on a bar-graph?



Hello thunkers,

How to store any data on tinydb daily and retrieve theme as weekdays data(1 week data etc) on a bar-graph,pie-chart etc ?

I had stored tag like this

And tried to retrieve it like this

But it populates error… Any suggestions and ideas were highly appreciated.

Thanks in advance


Nobody replying me…Anyway I had solved this problem myself…

Thank you very much for “22 View” on my thread… :smile: :wink:


First of all don’t be sarcastic. 22 views and no reply is not unusual
maybe none understood what you wanted to do, or
none could give you guidance because they were new Thunkers and lacked in skills, or
maybe none had the time to properly reply you because life happens out there and they did not want to give an incomplete answer…

read this Community Guidelines

anyway even if you solved your problem take a look on the following:

from the blocks that you post above is evident that you need to better understand how to use TinyDB… you can see thunkable docs and tutorials for this…

in the past I needed to add data to my apps per day so I created multiple entries per day with the data I needed
and then I looped through each TinyDB tag and selected the tag if the date was within the week I needed.
However looping through multiple DB tags can be slow when too much data is recorded. Additionally you need to create a procedure to select the relevant week’s dates to use them as criteria for “filtering” the DB tags.

I now create a single DB tag that is a list of lists and the sub lists are the daily data I need to store.
Looping though the list of lists elements is much faster even if there is too much info recorded

In order to avoid finding the relevant week’s dates you can add in each record the week number (I think that clock now block gives you an instant that also has week number) this can make filtering your data much simpler…

(to be more specific when I say "relevant week’s dates ", assuming that the 1st day of the week is monday
then if I select a date, say 23/08/2018 then the dates between Monday 20/08/2018 to Sunday 26/08/2018 are in the relevant week)

for displaying charts read this thread: