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

defaultLabelValue not working

1 Answer 55 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
wj
Top achievements
Rank 1
wj asked on 23 Nov 2009, 10:29 PM

The defaultLabelValue is not working for me..
Here is my code:

              
chartControl.ChartTitle.TextBlock.Text = "My RadChart";  
            ChartSeries chartSeries = new ChartSeries("Sales",ChartSeriesType.Bar);  
 
            for(int i=0;i<10;i++)  
            {  
                chartSeries.AddItem(i+10,"hello"+i);  
            }  
            chartSeries.DefaultLabelValue = "#Y";  
            chartControl.AddChartSeries(chartSeries); 
 chartControl is my radChart..
I want the labels to be the integer values instead of the string displayed..
Thks for your help.

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 26 Nov 2009, 11:22 AM
Hello wj,

The reason is in this line:

chartSeries.AddItem(i+10,"hello"+i);

The second parameter sets the label explicitly. In this case, the DefaultLabelValue setting is ignored. Just use this:

chartSeries.AddItem(i+10);

Sincerely,
Ves
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Chart (Obsolete)
Asked by
wj
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or