Charts skin repeating colors

Thread is closed for posting
2 posts, 0 answers
  1. Archana
    Archana avatar
    17 posts
    Member since:
    Jun 2011

    Posted 11 Feb 2013 Link to this post

    Hi,

    I'm using Web20 skin for my Barcharts and Line charts but it seems it has only 5 colors in color pallet and it repeats those colors for legends # more than 5. So 1st and 6th Legends have same color. Do you have any skin that has more colors? Sometimes I have 30 Legends to display and its really confusing when all legends have same color in the chart. please help asap.

    Thanks,
    Archana
  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 13 Feb 2013 Link to this post

    Hi Archana,

    Most of the other RadChart skins provide at least 12 colors (Inox, Metal, Mac, Colorful...), however none of the skins provide as much as 30 colors. That is why I would recommend creating a your custom palette(s). You can create your own it like this:
    var palette = new Palette("MyPalette");
    palette.Items.Add(
        new PaletteItem() { MainColor = Color.FromArgb(255, 85, 78, 98)});
    palette.Items.Add(
        new PaletteItem() { MainColor = Color.FromArgb(255, 13, 98, 22)});
    palette.Items.Add(
        new PaletteItem() { MainColor = Color.FromArgb(255, 155, 78, 10)});
    palette.Items.Add(
        new PaletteItem() { MainColor = Color.FromArgb(255, 155, 78, 200)});
    palette.Items.Add(
        new PaletteItem() { MainColor = Color.FromArgb(255, 10, 150, 200)});
    //Add more colors...
    this.RadChart1.CustomPalettes.Add(palette);
    this.RadChart1.SeriesPalette = "MyPalette";

    Regards,
    Petar Kirov
    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
Back to Top