Reputation: 6532
The Following Code For Pie Chart CorePlot in ios:
CPTGraphHostingView *hostingView = [[CPTGraphHostingView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:hostingView];
graph = [[CPTXYGraph alloc] initWithFrame:self.view.bounds];
hostingView.hostedGraph = graph;
CPTPieChart *pieChart = [[CPTPieChart alloc] init];
pieChart.dataSource = self;
pieChart.pieRadius = 100.0;
pieChart.identifier = @"PieChart1";
pieChart.startAngle = M_PI_4;
pieChart.sliceDirection = CPTPieDirectionCounterClockwise;
self.pieData= [NSMutableArray arrayWithObjects:[NSNumber numberWithDouble:90.0],
[NSNumber numberWithDouble:20.0],
[NSNumber numberWithDouble:30.0],
[NSNumber numberWithDouble:40.0],
[NSNumber numberWithDouble:50.0], [NSNumber numberWithDouble:60.0], nil];
[graph addPlot:pieChart];
[pieChart release];
That's Output not hide x and y axis in the pie Chart....! I need to hide X and y axis...! Help Me ....!
Upvotes: 3
Views: 1398
Reputation: 27381
The best way to do this is to remove the axes entirely.
graph.axisSet = nil;
Upvotes: 8