divyavamsee / core-plot

Automatically exported from code.google.com/p/core-plot
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Legend with nil border and line style has green border #372

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the SimpleScatterPlot.m code in the Plot Gallery project.
2. In the renderInLayer method, where the legend is created, set 
graph.legend.fill = nil and graph.legend.borderLineStyle = nil.
3. Run the program and look at the SimpleScatterPlot example.

What is the expected output?
A legend with no border.

What do you see instead?
A legend with a green border.

What version of the product are you using? On what operating system?
Core Plot 0.9, Xcode 4.2.

Please provide any additional information below.

To get an empty border with no fill, you can set the fill to [CPTFill 
fillWithColor:[CPTColor clearColor]];

However, the expected behavior for a nil fill and nil border line style is no 
border, and there appears to be no workaround to seeing a green border instead.

One possible fix is to modify CPTScatterPlot's drawSwatchForLegend so that 
CGContextClearRect(context, rect) is called before doing any drawing. But I'm 
not sure if this is the proper fix.

Original issue reported on code.google.com by tre...@vocaro.com on 26 Nov 2011 at 10:02

GoogleCodeExporter commented 9 years ago
This issue was closed by revision e4cc14655013.

Original comment by eskr...@mac.com on 27 Nov 2011 at 3:56