In revision 2207 a new feature was added to some plots: a shadow generator. Unfortunately with shadows turned on, tooltips are not rendered for the correct position (tested with XYPlot). The problem is, that in the draw() method a copy of g2 and dataArea is created, which is needed later on. However, most modifications to g2/dataArea are only executed on the copies and not on the originals, which leads to different images and thus, wrong positions for the tooltips.
The following patch fixes the behaviour for a simple XYPlot without annotations, markers, etc.
Code: Select all
Index: XYPlot.java
===================================================================
--- XYPlot.java (revision 4790)
+++ XYPlot.java (working copy)
@@ -3359,6 +3359,7 @@
for (int i = 0; i < getDatasetCount(); i++) {
foundData = render(g2, dataArea, i, info, crosshairState)
|| foundData;
+ render(savedG2, savedDataArea, i, info, crosshairState);
}
// draw foreground annotations
@@ -3393,6 +3394,7 @@
for (int i = getDatasetCount() - 1; i >= 0; i--) {
foundData = render(g2, dataArea, i, info, crosshairState)
|| foundData;
+ render(savedG2, savedDataArea, i, info, crosshairState);
}
// draw foreground annotations

David, you did commit this changes. Could you have a look or suggest some kind of solution for it?
hth,
- martin