This is a migrated thread and some comments may be shown as answers.
Custom palette
3 Answers 63 Views
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 09 Aug 2012, 09:36 AM
Hello telerik!

How can I use a custom palette with RadChartView (PieChart)? With RadChart it was possible to use a BrushCollection. How can that be achieved with RadChartView?

Thanks a lot!
Tim.

3 Answers, 1 is accepted

Sort by
0
Tim
Top achievements
Rank 1
answered on 09 Aug 2012, 10:27 AM
Ok. I think I got it. Currently I am using this code here:
public ChartPalette Palette2
{
    get
    {
        if (_palette2 == null)
        {
            _palette2 = new ChartPalette();
            PaletteEntryCollection collection = new PaletteEntryCollection();
            foreach (var color in MyColors)
            {
                PaletteEntry pe = new PaletteEntry(color);
                collection.Add(pe);
                _palette2.GlobalEntries.Add(pe);
            }
 
            _palette2.SeriesEntries.Add(collection);
        }
 
        return _palette2;
    }
}

The binding:
<telerik:RadPieChart Palette="{Binding Palette2}">

Thanks,
Tim.


0
Sia
Telerik team
answered on 13 Aug 2012, 09:27 AM
Hello Tim,

I am happy to hear that you managed to solve your problem. However this forum post also could be of interest to you.

Regards,
Sia
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Tim
Top achievements
Rank 1
answered on 13 Aug 2012, 10:07 AM
Hi Sia,

thanks! I'll have a look at it!
Tim.
Asked by
Tim
Top achievements
Rank 1
Answers by
Tim
Top achievements
Rank 1
Sia
Telerik team
Share this question
or