For those interested, I solved this by doing exactly what I termed “hack” previously. Programmatically, it consists in actually giving each entry its absolute width as a value. If entries in the dataframe (I used pandas) don’t have their level explicit (in which case you can simlpy iterate through levels using groupby
and in each group, set value to 1 / groupsize), you can go through the hierarchy recursively and give each group of children to a parent entry their parent’s value multiplied with the number of children it has.
I wonder, though, if setting the section sizes to “equal” might be a sensible option to the branchvalues
parameter.