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

Additional label appearance in xaxis

2 Answers 97 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Arima
Top achievements
Rank 1
Arima asked on 19 Apr 2011, 12:53 PM
Hi

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.

Regards
Arima

2 Answers, 1 is accepted

Sort by
0
Accepted
Evgenia
Telerik team
answered on 25 Apr 2011, 07:55 PM
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.
0
Arima
Top achievements
Rank 1
answered on 28 Apr 2011, 01:21 PM
Hi Evgenia

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

Regards
Arima
Tags
Chart (Obsolete)
Asked by
Arima
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Arima
Top achievements
Rank 1
Share this question
or