1

I have one Bar Plot. This bar graph has ten bars but I just want to present the caption of only first 3 bars.

I even tried adding in an NSArray assistant the first three plot but without success.

Some help? idea? criticizes?

Thanks

Gian
  • 1,193
  • 2
  • 8
  • 20

1 Answers1

1

Implement one of the following methods in your datasource:

-(NSString *)legendTitleForBarPlot:(CPTBarPlot *)barPlot
                       recordIndex:(NSUInteger)idx;
-(NSAttributedString *)attributedLegendTitleForBarPlot:(CPTBarPlot *)barPlot
                                           recordIndex:(NSUInteger)idx;

Return a title for the bar index if you want it to appear in the legend or nil to exclude that bar from the legend.

Eric Skroch
  • 27,381
  • 3
  • 29
  • 36