Chart Series Color Gradient

Thread is closed for posting
2 posts, 0 answers
  1. Jurgen
    Jurgen avatar
    7 posts
    Member since:
    Jan 2009

    Posted 31 Mar 2009 Link to this post

    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
  2. Velin
    Admin
    Velin avatar
    391 posts

    Posted 02 Apr 2009 Link to this post

    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.
Back to Top