2012-03-24 2 views
3

IOS에서 원형 차트 CorePlot 다음 코드 :CorePlot 원형 차트 : X 및 Y 축을 숨기는 방법?

파이 차트에서 x와 y 축 출력 숨길 것
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]; 

....! X 축과 Y 축을 숨길 필요가 있습니다 ...! 도와주세요 ....!

답변

8

가장 좋은 방법은 축을 완전히 제거하는 것입니다.

graph.axisSet = nil; 
+0

고맙습니다. – Dinesh

+0

@EricSkroch 안녕하세요, 제 질문을 좀보실 수 있습니까? 정말 고맙습니다. http://stackoverflow.com/questions/25997224/the-axis-is-drawn-under-the-plot-in-core-plot – Pegah

관련 문제