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

Line Chart showing Row data to column

3 Answers 73 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 21 Jul 2008, 02:17 PM
I am using the Q12008 ie Ajax Controls for i want the chart like shown below using the below data. I want the different series for the name column (eg A,B,C)...i want 3 series one for A second for B third for C
also i tried copying the sample image of chart but unable to paste here.

 Date Name Value
6-Aug A NULL
6-Sep A 0.9977
6-Oct A 0.9676
6-Nov A 0.9348
6-Dec A 0.9907
7-Jan A 0.9811
7-Feb A 0.9497
7-Mar A 0.991
7-Apr A 0.9823
7-May A 0.977
7-Jun A 0.9796
7-Jul A 0.9764
7-Aug A 0.9726
7-Sep A 1
6-Aug B 0.9827
6-Sep B 0.9499
6-Oct B 0.9341
6-Nov B 0.9907
6-Dec B 0.9635
7-Jan B 0.9544
7-Feb B 0.9542
7-Mar B 0.9591
7-Apr B 0.9798
7-May B 0.9844
7-Jun B 0.9875
7-Jul B 0.9683
7-Aug B NULL
7-Sep B 1
6-Aug C 0.9928
6-Sep C 0.9933
6-Oct C 0.9743
6-Nov C 0.8988
6-Dec C 0.988
7-Jan C 0.9811
7-Feb C 1
7-Mar C 1
7-Apr C 1
7-May C 0.9908
7-Jun C 0.9601
7-Jul C 1
7-Aug C 0.9908
7-Sep C 0.9601

3 Answers, 1 is accepted

Sort by
Telerik team
answered on 22 Jul 2008, 08:47 AM
Hello Rahul Khinvasara,

You can achieve the desired functionality by using the RadChart.DataGroupColumn, and combining it with the approach described here to display DateTime objects on the numerical axes of RadChart.

Attached is a sample application to get you started as well.

Kind regards,
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Rahul Khinvasara
Top achievements
Rank 1
answered on 24 Jul 2008, 08:23 AM
The above solution works well .....thanks alot.
But I found other problem by this.
I am using the same dataset to bind to chart and gridview.
Is it possible to bind the grid in cross tab?
I want to take the dicstinct Name column value rows to columns.
like in the above example 
Date A B C
6-Sep 0.9977 0.9977 0.9977
6-Oct 0.9676 0.9676 0.9676
6-Nov 0.9348 0.9348 0.9348
6-Dec 0.9907 0.9907 0.9907
7-Jan 0.9811 0.9811 0.9811
7-Feb 0.9497 0.9497 0.9497
7-Mar 0.991 0.991 0.991
7-Apr 0.9823 0.9823 0.9823
7-May 0.977 0.977 0.977
7-Jun 0.9796 0.9796 0.9796
7-Jul 0.9764 0.9764 0.9764
7-Aug 0.9726 0.9726 0.9726
7-Sep 1 1 1

and the second thing is can we set the color fore and back color to the grid cell by using some conditions/ formulas?
Telerik team
answered on 24 Jul 2008, 01:59 PM
Hello Rahul Khinvasara,

RadGrid does not support cross tab reports (i.e. summarizing the data from the dataset); still you can review the example that demonstrates pivot data display here (documentation here) in order to determine if it would be useful to your scenario.

As for changing the cell appearance -- you can handle the ItemDataBound event of the grid and add your formulas / conditions there like this:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    if (e.Item is GridDataItem) 
        GridDataItem item = e.Item as GridDataItem; 
        if (double.Parse(item["UnitPrice"].Text, CultureInfo.InvariantCulture) < 10
            item["UnitPrice"].BackColor = Color.Green; 
            item["UnitPrice"].ForeColor = Color.White; 

Sincerely yours,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Chart (Obsolete)
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Telerik team
Rahul Khinvasara
Top achievements
Rank 1
Share this question