Open Codecrimper opened 1 year ago
The trick I found to work on my cases is to set the value to None
in these situations. This could work to set the label to empty too depending on how the label is set up.
I am not sure if this will match perfectly your use case, but it is worth a test.
Is there a possibility to suppress zero values in a stacked bar chart like the following.
Manually, it's at least possible to remove the zero values in the Excel workbook while keeping the order (bad, medium, good). I tried to replace the zeros in the numpy array by NaN and then adding it by using add_series. As soon as I want to replace the data, I get the following error:
My code snippet looks like:
Or is there an alternative going deeper in the xml code to hide specifically zero labels?
Link to stackoverflow: https://stackoverflow.com/questions/73853536/python-pptx-suppress-zero-values-in-a-stacked-bar-chart