Pie chart

Thread is closed for posting
2 posts, 0 answers
  1. License
    License avatar
    43 posts
    Member since:
    Oct 2016

    Posted 25 Oct 2016 Link to this post

    Why pie chart the 9th's color is the same as the first one ?I want each of them is different from each other
  2. Adrian
    Adrian avatar
    174 posts

    Posted 27 Oct 2016 Link to this post


    The 9th color is the same like the first one because the chart's theme has 8 different colors and when you have more than 8 slices in the pie the colors start repeating again from the first one. You can provide a different color by implementing chart:paletteItemForSeries:atIndex method of TKChartDelegate. Using the index you can return a palette item with a different color for the corresponding slice. Consider the code below:
    - (TKChartPaletteItem *)chart:(TKChart *)chart paletteItemForSeries:(TKChartSeries *)series atIndex:(NSInteger)index {
        if (index == 1) {
            return [TKChartPaletteItem paletteItemWithFill:[TKSolidFill solidFillWithColor:[UIColor redColor]]];
        return nil;

    Telerik by Progress
    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 Feedback Portal and vote to affect the priority of the items
Back to Top