Contrasting Colors - Pie Chart

2 posts, 0 answers
  1. Arvind
    Arvind avatar
    6 posts
    Member since:
    Aug 2010

    Posted 10 Aug 2010 Link to this post

    Hi,
       I have attached the screenshot of the pie chart developed using RadCharts.  By default the chart is showing green, light green, blue and light blue.  It does not differentiate the items at the first look itself.  A keen observation is required to distinguish between the items. 

    Instead of light and dark shades, is it possible to show some contrasting colors in the pie charts?  Do I need to set any property in the radChart? 

    Regards,
    Arvind Robin Kumar.
  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 12 Aug 2010 Link to this post

    Hello Arvind,

    You can create your own series palette like this:

    var myColors = new ColorBlend[] {
                            new ColorBlend(new Color[] { Color.FromArgb(255, 224, 78), Color.FromArgb(247, 204, 22), Color.FromArgb(226, 175, 3)}),
                            new ColorBlend(new Color[] { Color.FromArgb(136, 221, 246), Color.FromArgb(97, 203, 234), Color.FromArgb(59, 161, 197)}),
                            new ColorBlend(new Color[] { Color.FromArgb(177, 222, 84), Color.FromArgb(150, 209, 35), Color.FromArgb(118, 187, 10)}),
                            new ColorBlend(new Color[] { Color.FromArgb(255, 170, 78), Color.FromArgb(245, 139, 27), Color.FromArgb(201, 102, 3)}),
                            new ColorBlend(new Color[] { Color.FromArgb(243, 147, 213), Color.FromArgb(237, 111, 197), Color.FromArgb(221, 72, 174)}),
                            new ColorBlend(new Color[] { Color.FromArgb(194, 143, 236), Color.FromArgb(175, 106, 227), Color.FromArgb(153, 76, 211)})
            };
            Palette my = new Palette("MyPalette", myColors);
            myChart1.CustomPalettes.Add(my);
            myChart1.SeriesPalette = "MyPalette";


    Sincerely,
    Ves
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top