【问题标题】:CorePlot Pie Chart: How to hide X and Y axes?CorePlot 饼图:如何隐藏 X 轴和 Y 轴?
【发布时间】:2012-03-24 10:02:12
【问题描述】:

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 轴...! 帮帮我....!

【问题讨论】:

    标签: ios core-plot pie-chart


    【解决方案1】:

    最好的方法是完全移除坐标轴。

    graph.axisSet = nil;
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多