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

[Solved] rad grid and aggregate rad chart

3 Answers 164 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Jyoti
Top achievements
Rank 1
Jyoti asked on 24 Apr 2008, 02:47 PM
Hi,

I am implementing rad grid and aggregate rad chart as given in following link-:
http://www.telerik.com/demos/aspnet/Controls/Examples/Integration/GridAndChart/GridAndAggregateChart/DefaultCS.aspx?product=chart

In this example the data from grid is same as the one getting displayed with Pie chart.

Is it possible to represent rad grid rows with the colors using which the respective data getting displayed in pie chart.

For instance, in the given example the record for 'Aniseed Syrup' is getting displyed in blue in Pie chart. I want that, row which is representing 'Aniseed Syrup' data in grid should be displayed in blue background.

Please suggest.

Thanks & Regards,
Jyoti Naik

3 Answers, 1 is accepted

Sort by
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 29 Apr 2008, 02:28 PM
Hello Jyoti,

I think you will find helpful this documentation article here http://www.telerik.com/help/aspnet/grid/?grdCustomizingRowAppearance.html -- it explains how to customize the row appearance of a RadGrid control.


Greetings,
Bart.
0
Jyoti
Top achievements
Rank 1
answered on 02 May 2008, 10:45 AM
Hi Bart,

Thanks for your reply.

I want that the grid row should get displayed using color  in which respective chunk is getting displayed in pie chart.

And pie chart assigns color to its chunks dynamically.

Is is possible to get pie chart chunk colors at run time and assigned same colors to respective grid rows.

Please suggest.

Thanks & Regards,
Jyoti
0
Giuseppe
Telerik team
answered on 02 May 2008, 01:06 PM
Hello Jyoti,

Unfortunately the pie colors that come from the chart skin are not exposed to the user, and it will not be possible to assign them to the RadGrid rows. You still can achieve the desired effect but you will need to manually assign colors to the different pies like this:

    protected void Page_Load(object sender, EventArgs e) 
    { 
        RadChart1.Series[0].Items[0].Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid; 
        RadChart1.Series[0].Items[0].Appearance.FillStyle.MainColor = Color.Red; 
 
        RadChart1.Series[0].Items[1].Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid; 
        RadChart1.Series[0].Items[1].Appearance.FillStyle.MainColor = Color.Yellow; 
 
        //for every series item in the series, etc... 
    } 


And then you can use the expressions to assign the same colors to the grid rows.


Regards,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
Jyoti
Top achievements
Rank 1
Answers by
Bartholomeo Rocca
Top achievements
Rank 1
Jyoti
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or