CorePlot pie chart: how to hide the X and Y axes?

The following code for a CorePlot pie chart 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];

      

This output does not hide the x and y axes in the pie chart ....! I need to hide the x and y axes ...! Help me....!

+3


source to share


1 answer


The best way to do this is to remove the axles completely.



graph.axisSet = nil;

      

+8


source







All Articles