Friday, August 12, 2011

Pie Chart with tint property.

Currently, only 3 tint properties exist in the library (green-blue = 1, red-yellow =2, beige-gray = 3)
More  will be added later on.  I have added the screenshots in the post below.

green-blue ( tintValue:1)
red-yellow ( tintValue:2) 


beige-gray( tintValue:3)































You will have to add following lines to create the chart. Isn't that simple !

   NSString *csvPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"myTable.csv"];
    MIMPieChart *pieChartView=[[MIMPieChart alloc]initWithFrame:CGRectMake(40, 40, 600, 500)];
    pieChartView.radius=200;
    pieChartView.tintValue=1;
    [pieChartView readFromCSV:csvPath  AtColumn:4];
    [pieChartView drawPieChart];
    [self.view addSubview:pieChartView];



Our .csv file looks like following and it exists in the resource folder of our project:













You can find the code at the end of THIS POST.

No comments:

Post a Comment