@dominiquerenauld
I can do, of course, but it’s nothing very special compared to what I see people do here!
Basically, a single container holds all the books I’ve read, with a pBook prototype with all the relevant attributes (authors, gender, date read, tags, category etc).
Then a series of agents picks off the years I read the books (with a calculated attribute $ReadYear = $DateRead.year), and the display expression shows the gender and other stats:
$DisplayExpression='$ReadYear + " (" + $ChildCount + ") M:" + count_if(children,$Gender="M") + " F:" + count_if(children,$Gender="F") + " N/A:"+ count_if(children,$Gender="N/A")';
There’s a “Config” note which calculates day of the year,
$NumDay=days("01/01/2026",today);
$NumWeek=ceil($NumDay / 7);
$NumMonth=date(today).format("m");
$NumYear=date(today).format("y");
So after that, the dashboard is just a matter of marrying the two up to give this year’s stats. E.g. the Per month figure is:
$Subtitle=format(($ChildCount("a2026") / $NumMonth("Config")),2)
(“a2026” is just the name of this year’s agent…).
Projected is:
$Subtitle=round(($ChildCount("a2026") / $NumWeek("Config")) * 52);
“Read so far” has a subtitle calculate by $Subtitle=$ChildCount("a" + $NumYear("Config"));
and then the Plot pattern set to $Pattern = bar($Subtitle.toNumber,0,125,52), which gives the target line at 52 (one book per week…)
… etc.
I arrived at all this mostly by trial and error, and it’s still very rough and ready. It could do with a lot of polishing and simplifying, but I’m not a programmer, so keep putting it off…
Is there anything you specifically want to know?