1
CPTXYGraph *graph   = [[CPTXYGraph alloc]initWithFrame:self.hostingView.frame];
graph.borderColor   = [CPTColor whiteColor].cgColor;
graph.paddingTop    = 0.0f;
graph.paddingRight  = 0.0f;
graph.paddingLeft   = 0.0f;
graph.paddingBottom = 0.0f;
self.hostingView.hostedGraph = graph;
graph.axisSet = nil;


//Apply for theme to graph
self.graphTheme = [CPTTheme themeNamed:kCPTPlainWhiteTheme];
[graph applyTheme:self.graphTheme];
[graph release];

CPTPieChart *pieChart = [[CPTPieChart alloc]init];
pieChart.identifier = @"OverView";
pieChart.dataSource = self;
pieChart.sliceDirection = CPTPieDirectionClockwise;
pieChart.pieRadius = ((self.hostingView.frame.size.height  / 2) - 5);
pieChart.startAngle = M_PI;
CPTGraph *tempGraph = self.hostingView.hostedGraph;
    [tempGraph addPlot:pieChart];
[pieChart release];

このコードでは、黒い色の境界線が表示されています。これはグラフaxisSetによるものだと思いましたが、削除する方法はありません。

4

1 に答える 1

8

あなたが話しているのがグラフ全体の周りに表示される境界ボックスである場合、私はステートメントの後にこのコードを使用すると言います[graph applyTheme:self.graphTheme];

graph.plotAreaFrame.borderLineStyle = nil;

これにより、グラフ領域から境界線が完全に削除されます。

于 2013-02-08T15:31:20.313 に答える