Additional label appearance in xaxis

Thread is closed for posting
3 posts, 1 answers
  1. Arima
    Arima avatar
    25 posts
    Member since:
    Mar 2011

    Posted 19 Apr 2011 Link to this post


    I am having a customized object. It has data like below

    Fleet     Month   Actual     TargetLiability
    A320     5           75%          61%
    A330     5           78%          61%
    A340     5           40%          61%
    A320     6           75%          70%
    A330     6           78%          70%
    A340     6           40%          70%
    A320     7           75%          71%
    A330     7           78%          71%
    A340     7           40%          71%

    I have bound data to radchart. Have applied Month as the x axis column and Actual is the Yaxis. Also i have set DataGroupcolumn = Fleet. My question is, i have to display TargetLiability value  for each month  (below the xaxis label appearance). Please see the image for refference. In addition, i would like to make the xaxis position to 100%. Can you please anyone guide me to achieve.

  2. Answer
    Evgenia avatar
    1437 posts

    Posted 25 Apr 2011 Link to this post

    Hi Arima,

    To bind the XAxis's values you may use the DataLabelsColumn property. However this is not appropriate for your scenario as you need to have two labels for a single Axis Item. What I can suggest is that you subscribe to BeforeLayout event of the Chart and set custom value to every Axis Item manually. Here is how you can achieve this:

    protected void RadChart1_BeforeLayout(object sender, EventArgs e) 
            string[] someText = new string[] { "label1", "label2", "label3" }; 
            for (int i = 0; i < someText.Length; i++) 
                RadChart1.PlotArea.XAxis.Items[i].TextBlock.Text = someText[i]; 

    Additionally you may use our MultiLine labels feature as shown in this demo and this help topic.

    Greetings, Evgenia
    the Telerik team

    Browse the 
    vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. Arima
    Arima avatar
    25 posts
    Member since:
    Mar 2011

    Posted 28 Apr 2011 Link to this post

    Hi Evgenia

    Thank you. It is working as expected. It was overriding my previous value. I applied string concatenation function here.

Back to Top