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

CPTPieChart startingAngle normalization #387

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up a pie chart with a starting angle of > 2*pi and some slices.
2. Add a delegate to handle sliceWasSelectedAtRecordIndex.

What is the expected output? What do you see instead?
When you click on a slice now the returned index is wrong.

What version of the product are you using? On what operating system?
CorePlot trunk, OSX 10.7.2, XCode 3.2.6

Please provide any additional information below.
The current code doesn't work well with angles outside the 0..2*pi range. So in 
order to counter that and also as a matter of defensive programming CPTPieChart 
should normalize the given starting angle to the expected range. The attached 
patch does exactly this.

Original issue reported on code.google.com by mike.lischke on 27 Dec 2011 at 3:54

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Well, I think the problem can only be repeated with angles < 0 or better < 
-2*pi. I had angles like -111 due to user interaction.

Original comment by mike.lischke on 27 Dec 2011 at 3:58

GoogleCodeExporter commented 9 years ago

Original comment by eskr...@mac.com on 11 Jan 2012 at 3:28

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

Original comment by eskr...@mac.com on 11 Jan 2012 at 3:30