1. Chris Leonello
  2. jqplot

Pull requests

#31 Merged
Repository
jyoungdev
Branch
default
Repository
cleonello
Branch
default

fixed issue #560: checkIntersection is now (nearly) pixel-precise for pie charts with a sliceMargin

Author
  1. Jason Young
Reviewers
Description

As mentioned in my comment on #560, this fix:

"involves moving the pieChart-specific logic in the checkIntersection method into the pieRenderer. The rationale behind this is to make checkIntersection use the same calculations as those used in drawing the pie chart to begin with. Without this architectural change, jqplot essentially needs to have intimate knowledge of the internals of every jqplot plugin ever written, making checkIntersection prone to breaking every time the renderer changes.

I recommend a similar kind of change for all other chart types as well, making checkIntersection a required part of the renderer interface, and making jqplot's checkIntersection method mererly forward to the renderer's checkIntersection method."

Feel free to message me if you want to discuss this change.

Comments (5)

  1. Jason Young author

    Btw, I can make some refactorings later if you like (e.g. use [0] and [1] for x and y coordinates on points instead of .x and .y), comment the code more, etc.

  2. Paul Pritchard

    This appears to work properly in all cases except one: the second chart on the Pie Charts and Options 2 examples (pieTest4.html). On that chart, the "Consument" and "Bewerkende industrie" slices no longer change color on mouse hover. Can you fix that?

  3. Jason Young author

    Sorry for not responding in so long. I was able to make a large change for work, but due to shifting priorities, I'm on something else now and can only look at this in my spare time. But I'll see if I can find time. :)

  4. Jason Young author

    I have a fix for this. However, it looks like the changes I committed were lost in recent merging. Should I re-apply with another pull request?