Reputation: 2965
I want to increase radius of particular slice, so that one of slice look bigger and other with the same circle, How to implement this, please help me? Follow the following image.
Upvotes: 0
Views: 535
Reputation: 27381
Since you cannot control the slice radius independently for each slice in Core Plot, use a second plot and give it the larger radius. Both plots can use the same data. Implement the -sliceFillForPieChart:recordIndex:
datasource method for both plots. Return [NSNull null]
to draw an empty slice at the given index. In your example, return a fill at one index on the larger plot and NSNull
everywhere else. Do the opposite on the smaller plot.
Upvotes: 2
Reputation: 53357
Since there are only 2 radii (inner and outer radius) it is not possible to increase the size of a single piece. However, what you can do is to offset a single piece so it stands out:
For this you can set the radial offset of one or more slices. One way to do this is to bind them to an array controller with the offset values like this:
[earningsPlot bind: CPTPieChartBindingPieSliceRadialOffsets
toObject: earningsPlotRadialOffsets
withKeyPath: @"arrangedObjects"
options: nil];
Upvotes: 0