kevinzhow

Fix readme

Showing 1 changed file with 19 additions and 0 deletions
@@ -95,6 +95,25 @@ circleChart.backgroundColor = [UIColor clearColor]; @@ -95,6 +95,25 @@ circleChart.backgroundColor = [UIColor clearColor];
95 95
96 ``` 96 ```
97 97
  98 +
  99 +[![]([https://dl.dropboxusercontent.com/u/1599662/pie.png])]([https://dl.dropboxusercontent.com/u/1599662/pie.png])
  100 +
  101 +```objective-c
  102 +# import "PNChart.h"
  103 +//For PieChart
  104 +NSArray *items = @[[PNPieChartDataItem dataItemWithValue:10 color:PNRed],
  105 + [PNPieChartDataItem dataItemWithValue:20 color:PNBlue description:@"WWDC"],
  106 + [PNPieChartDataItem dataItemWithValue:40 color:PNGreen description:@"GOOL I/O"],
  107 + ];
  108 +
  109 +
  110 +
  111 +PNPieChart *pieChart = [[PNPieChart alloc] initWithFrame:CGRectMake(40.0, 155.0, 240.0, 240.0) items:items];
  112 +pieChart.descriptionTextColor = [UIColor whiteColor];
  113 +pieChart.descriptionTextFont = [UIFont fontWithName:@"Avenir-Medium" size:14.0];
  114 +[pieChart strokeChart];
  115 +```
  116 +
98 #### Callback 117 #### Callback
99 118
100 Currently callback only works on Linechart 119 Currently callback only works on Linechart