Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
995
Hide zero value on the chart
posted

Hello,

I am using a bar chart to display my data, on the chart I have the value displayed on each bar.
However, sometime there is bars with the value 00, so the chart only display 00. Is there a way to remove or hide the "00" when the value is 0?

Thanks

  • 995
    posted

    Hi,

    If the data value is “null” you will need to simply set the following property to not to display the data label for the null bar:

    this.UltraChart1.BarChart.NullHandling = Infragistics.UltraChart.Shared.Styles.NullHandling.DontPlot;

    Since the “0” value is not a null, this is the sugesstion on how to display the labels for non “0” columns. In FillSceneGraph event handler, you have to go throuth primitivies and find the Box object and if the object has not a “0” value, you have to create a new text label to display the data labels. Please have a look at attached sample.

     

    Sample.zip