如何使用 coreplot 绘制多个饼图。是否可以并排绘制这些饼图?
问候,
克里希纳
是的,克里希纳。您可以将多个饼图添加到同一个图表中,如下所示:
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];