Hiding Zero Values in Pie Chart

2 posts, 0 answers
  1. Saravanan Thiruchabai
    Saravanan Thiruchabai avatar
    11 posts
    Member since:
    Mar 2010

    Posted 25 Apr 2010 Link to this post


    How to hide the zero values in a Pie Chart?

  2. Nikolay
    Nikolay avatar
    397 posts

    Posted 28 Apr 2010 Link to this post

    Hello Saravanan Thiruchabai,

    Thank you for your interest in our controls.

    In order to hide the labels of items with zero values, you can simply remove the DataPoints in the following manner :
    RadChart1.ItemDataBound += new EventHandler<ChartItemDataBoundEventArgs>(RadChart1_ItemDataBound);
    void RadChart1_ItemDataBound(object sender, ChartItemDataBoundEventArgs e)
               if (e.DataPoint.YValue == 0)

    Alternatively, you may refer to the MeteoChart example, which uses a LabelVisibilityConverter class. Perhaps reviewing it would be helpful for you. Simply navigate to the Meteo Chart demo and press the View Code button to find the LabelVisibilityConverter.cs file.

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top