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

Chart Series Color Gradient

1 Answer 190 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Jurgen
Top achievements
Rank 1
Jurgen asked on 31 Mar 2009, 07:50 AM
Hello,

I've stumbled upon a "hidden feature" in the radchart i guess :)

I've got some code coloring my chart as follows

 try 
            {  
                Palette ColorPalette = CreatePalette();  
                Chart.SeriesPalette = "";  
 
                int SerieIndex = 0;  
                foreach (int ColorIndex in ColorIndexes)  
                {  
                    Chart.Series[SerieIndex].Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;  
                    Chart.Series[SerieIndex].Appearance.FillStyle.MainColor = ColorPalette.Items[ColorIndex].MainColor;  
                    Chart.Series[SerieIndex].Appearance.FillStyle.SecondColor = ColorPalette.Items[ColorIndex].SecondColor;  
                      
                    SerieIndex++;  
                }  
            } 
Where Colorindexes is a list of integers representing the colors to be used.

When I use the filltype Solid, everything is working fine.
When I use filltype Gradient, it seems that it doesn't show the colors i defined, but the colors of the seriespalette (which in my case is default).
When i use filltype ComplexGradient, i get an alert on the client with an errormessage like "An unexpected error has occured. Please review the innerexception for more details."

This happens only with barcharts. I've never had a problem with line charts. The remaining filltypes are working fine as well.
I'm using the solid filltype now, but a gradient would be nice :)

Greetings

1 Answer, 1 is accepted

Sort by
0
Velin
Telerik team
answered on 02 Apr 2009, 04:14 PM
Hello Jurgen,

Thanks for sharing your experience with RadChart.
 
Indeed, RadChart has a problem when series are used with "ComplexGradient" fill type. We suggest you to consider using one of the other fill types available until a fix is provided.

As for the "Gradient" fill type, our tests did not confirm any broken functionality and the custom colors were applied as expected. You can find attached a simple example page where a customized series is used.

We are sorry for the inconvenience. Your Telerik points have been updated.

Sincerely,
Velin
the Telerik team

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