defaultLabelValue not working

Thread is closed for posting
2 posts, 0 answers
  1. wj
    wj avatar
    12 posts
    Member since:
    Sep 2009

    Posted 23 Nov 2009 Link to this post

    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.
  2. Ves
    Admin
    Ves avatar
    2927 posts

    Posted 26 Nov 2009 Link to this post

    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.
Back to Top