Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Core-Plot PieChart Slice color

I am using core plot in one of my iPhone projects. Is it possible to change the color for a selected slice in a pie chart (using CPPieChartDataSource, CPPieChartDelegate)?

like image 840
random Avatar asked Sep 02 '10 16:09

random


People also ask

What does each slice in a pie chart represent?

A pie chart is a circle that is divided into areas, or slices. Each slice represents the count or percentage of the observations of a level for the variable. Pie charts are often used in business.

How do you make a pie chart colorful?

Use the Chart Styles button to quickly change the color or style of the chart. Click the chart you want to change. In the upper-right corner, next to the chart, click Chart Styles. Click Color and pick the color scheme you want, or click Style and pick the option you want.

What do you call the slices of a pie chart?

A pie chart shows how a total amount is divided between levels of a categorical variable as a circle divided into radial slices.

Which graph is divided into slices?

A pie chart is a circular statistical graphic, which is divided into slices to illustrate numerical proportion.


1 Answers

Implement the following method in your pie chart datasource:

-(CPTFill *)sliceFillForPieChart:(CPTPieChart *)pieChart recordIndex:(NSUInteger)index; 

CPFill can be a color, image, or gradient.

like image 183
Eric Skroch Avatar answered Oct 13 '22 01:10

Eric Skroch