Problems with legend in Core-Plot (pieChart)

前端 未结 1 1235
难免孤独
难免孤独 2020-12-21 16:24

I have a problem drawing the legend of a pieChart with Core-Plot, because the name of each element of the chart in the legend is always the identifier of the CPTPieChart. Ca

相关标签:
1条回答
  • 2020-12-21 17:05

    You need to add this method to your datasource:

    -(NSString *)legendTitleForPieChart:(CPTPieChart *)pieChart
                            recordIndex:(NSUInteger)index;
    

    It will be called for each index (corresponding to each pie slice). Simply return the correct title string for each one.

    0 讨论(0)
提交回复
热议问题