This is a migrated thread and some comments may be shown as answers.

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

1 Answer 43 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Rajkumar
Top achievements
Rank 1
Rajkumar asked on 26 May 2011, 07:28 AM
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

1 Answer, 1 is accepted

Sort by
0
Rahul
Top achievements
Rank 2
answered on 26 May 2011, 09:35 AM
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;
                }
}
Tags
Chart
Asked by
Rajkumar
Top achievements
Rank 1
Answers by
Rahul
Top achievements
Rank 2
Share this question
or