Dont want to show itemlables which are not fit into size of HorizontalStackbar100 series item labels

2 posts, 0 answers
  1. Rajkumar
    Rajkumar avatar
    5 posts
    Member since:
    Sep 2010

    Posted 26 May 2011 Link to this post

    Dont want to show itemlables which are not fit into size of  horizontalStackbar.
    Mycode

    h1.LabelSettings.LabelDisplayMode = LabelDisplayMode.Inside;
    chart.DefaultView.ChartArea.SmartLabelsEnabled = false;
    please help me
  2. Rahul
    Rahul avatar
    116 posts
    Member since:
    Feb 2011

    Posted 26 May 2011 Link to this post

    Check out the following code that can help.


        foreach
    (ChartSeriesItem myitem in chartDef.Series[0].Items)
        {            
         //Put here some logic to calculate the percentage for chart series item. Those items
               //falling below that percentage. Make it false.
                    if (myitem.YValue == 0)
                    {
                        myitem.Label.Visible = false;
                    }
    }
  3. DevCraft banner
Back to Top