When using geom_bar with already computed statistics and stacking them based on some additional fill column (different groups by color), the generation of the plot can fail if not every group is present in each "stack" (has a value for each label of the fill column).
This is because in filledIdentityGeom (called due to stat = "identity") we do not call addZeroKeys as we do in filledCountGeom:
https://github.com/Vindaar/ggplotnim/blob/master/src/ggplotnim/postprocess_scales.nim#L813
Possibly the fix is as simple as adding such a call to the "stack" logic here:
https://github.com/Vindaar/ggplotnim/blob/master/src/ggplotnim/postprocess_scales.nim#L467