如何使用coreplot绘制多个饼图。是否可以并排绘制这些饼图?
此致
克里希纳
答案 0 :(得分:0)
是的,克里希纳。您可以将多个饼图添加到同一图表中,如下所示:
CPTGraphHostingView *hostingView = (CPTGraphHostingView *) self;
CPTXYGraph *graph;
// set up the graph parameters
...
...
hostingView.hostedGraph = graph;
// Pie chart 1
CPTPieChart *pieChart1 = [[CPTPieChart alloc] init];
// Pie Chart 2
CPTPieChart *pieChart2 = [[CPTPieChart alloc] init];
// Add them to the graph
[graph addPlot:pieChart1];
[graph addPlot:pieChart2];