gpt4 book ai didi

ios - CorePlot 饼图 : How to hide X and Y axes?

转载 作者:可可西里 更新时间:2023-11-01 06:27:20 27 4
gpt4 key购买 nike

在 ios 中饼图 CorePlot 的以下代码:

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 轴....!我需要隐藏 X 轴和 y 轴...!帮帮我....!

最佳答案

执行此操作的最佳方法是完全移除轴。

graph.axisSet = nil;

关于ios - CorePlot 饼图 : How to hide X and Y axes?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9850805/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com