Open rjtavares opened 1 year ago
Thanks again for finding this!
I opted to add formatter arguments to plot functions that add a text object (bar and progress_donut). Now a formatter can easily be provided to the plot_kw as such:
+ [
ColumnDefinition(
name=knockout_stage_cols[0],
title=knockout_stage_cols[0].replace(" ", "\n", 1),
# formatter=decimal_to_percent, # this won't raise anymore but won't do anything
# because a SubplotCell with no text property is created
group="Knockout Stage Chances",
border="left",
plot_fn=progress_donut,
plot_kw={'is_pct': True, 'formatter': decimal_to_percent} # <-----
)
]
This keeps providing a formatter to a text column seperate from providing one to the plot function.
It would be an option to check whether a plot function and a formatter are provided, and to pass the formatter onto the plot_kw dictionary automatically if this is more intuitive.
I'll leave this open for now.
I changed the ColumnDefinition for one column on the wwc example, from:
to:
It outputs an error:
Commenting out the formatter solves the issue (but keeps the ugly format). Intuitively though, this combination should work together.