Default Color Palette?

4 posts, 1 answers
  1. Jacky Sze
    Jacky Sze avatar
    4 posts
    Member since:
    Sep 2009

    Posted 21 Jun 2012 Link to this post

    I'm trying to create a PieSeries and bind to my data sources in code behind and I have to specify the color for each SeriesItem one by one. Otherwise, the chart is rendered without color. Is there any option for applying  a default color from the palette for each SeriesItem automatically?

    EDIT: Color can be automatically assigned now after specifying the skin name property. There was no color at the beginning because we have used a custom skin.

    Another question is how can we put SeriesItem names into the PieSeries labels? i.e. I want to display "Name - Value" instead of just "Value" in the chart.
  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 22 Jun 2012 Link to this post

    Hi Jacky,

    On the subject of colours - the RadHtmlChart uses a different skinning mechanism than the rest of the RadControls, so for the time being you would need to use its built-in skins and colours or create the items programmatically so you can choose their colours, as you have discovered.

    On  the subject of tooltips and labels - currently this functionality is not available. We are considering extending this functionality and once it is finalized and released information about it will be available in the release notes.

    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jacky Sze
    Jacky Sze avatar
    4 posts
    Member since:
    Sep 2009

    Posted 24 Jun 2012 Link to this post

    It will be good if the next release can provide more color combinations for a skin. Default skin only provides 4 to 5 colors for data in different series. We have more than 10 series and have to create the items programatically. 
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 27 Jun 2012 Link to this post

    Hi Jacky,

    We are considering this improvement and we will perhaps add up to 10 different colors.  The main problem with this logic is that even 20 colors may not be enough for some particular case, so adding more and more each time is not an option that can solve all situations.

    For the time being you can set the BackgroundColor property under Appearance -> FillStyle for each series when you create it. You can prepare an array with the values you wish to use and use the series index to match it to the index in this array.


    Regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top