gujjula / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

Legend entry customization #331

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the only thing that can be overridden for legend is its title string
It is rectangle with color taken from sliceFillForIndex
Any other customizations are not supported now. What would be nice is method 
that can customize more. I guess it should be something like this 

(CPTLegendEntry*)legendEntryForPieChart:(CPTPieChart *)pieChart 
recordIndex:(NSUInteger)index

Original issue reported on code.google.com by zapli...@gmail.com on 12 Sep 2011 at 7:58

GoogleCodeExporter commented 9 years ago
it seems 
legend:shouldDrawSwatchAtIndex:forPlot:inRect:inContext:(CGContextRef)context 
already does this

Original comment by zapli...@gmail.com on 12 Sep 2011 at 12:28

GoogleCodeExporter commented 9 years ago
The legend provides properties to customize the size, corner radius, and border 
line style for the legend swatches. Each plot type determines the default look 
of the rest of the swatch.

The -legend:shouldDrawSwatchAtIndex:forPlot:inRect:inContext: delegate method 
allows you to override the swatch drawing to create a custom look.  Return NO 
to suppress the default drawing.

Original comment by eskr...@mac.com on 13 Sep 2011 at 12:32