Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide datapoint label when value is zero in a StackedBar

Tags:

People also ask

How do I hide data labels in Excel if zero?

In the Format Data Labels dialog, Click Number in left pane, then select Custom from the Category list box, and type #"" into the Format Code text box, and click Add button to add it to Type list box. Click Close button to close the dialog. Then you can see all zero data labels are hidden.

How do I hide data labels in Excel chart?

On the Design tab, in the Chart Layouts group, click Add Chart Element, choose Data Labels, and then click None.


I have a StackedBar which shows 5 values per bar, with the data value displayed in the middle of each block. So far, so good. However, when the value is zero, the value is still being displayed, which is messy when there are a lot of zeroes.

I would like to be able to hide the label for a zero. How can I do that?

(I presume I could do it the long way by reading the data row-by-row and building the graph step-by-step, but I would prefer to be able to just throw the query results at the control).