#1005 Regression: ChartMouseEvent wrongly fired wrt. x, y coord.

General (896)

Best to just run the attached demo. Coordinates are computed from the upper left corner of the whole JFreeChart panel/frame, instead of the particular chart. So when you, in the attached demo, hover on the left side of the first bin, events are actually fired for the first bin when they should not. Best to run the demo and just mouse-hovering over bins. It's very visible.
It's a regression, in 1.0.13 it works. In /branches/jfreechart-1.0.x-branch it doesn't.


  • Martin Krauskopf

    Demo showing the bug (just tweak the package line)

  • Martin Krauskopf

    • priority: 5 --> 8
  • Martin Krauskopf

    It might be workarounded by setting XYPlot's shadowGenerator to null after the Histogram is created. Since the culprit code is in the XYPlot#draw method, particularly in the body of second conditions "if (this.shadowGenerator != null) {". It sets dataArea origin to (0,0) which is wrong, so other code using data area coordinates is then confused.

  • Martin Krauskopf

    It might be workarounded by calling XYPlot#setShadowGenerator(null)

  • David Gilbert

    David Gilbert - 2011-10-18

    This is fixed in SVN for the upcoming 1.0.14 release.

  • David Gilbert

    David Gilbert - 2011-10-18
    • assigned_to: nobody --> mungady
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks