TransWikia.com

Tooltip/EventHandler misaligned with scaled graphics primitives they wrap

Mathematica Asked on July 27, 2021

Bug introduced in 8.0 or earlier and persists through 12.2

It affects all event based wrappers for affected primitives. E.g. EventHandler. Which makes it a big limiting factor.

For more crowded plots it can be really devastating.

If you find that problem a serious one, please report it too!


Problem reproduced on Win10 with V10.4.1, V11.0.0

A support case with the identification [CASE:3698391] was created

[…] There appears to be an issue with Tooltip in your second graph. It has been reported on your behalf, to our developers. […]


Areas covered by Tooltip are incorrect when we Scale primitives those Tooltips are wrapping:

data1 = RandomReal[250, 250];
data2 = RandomReal[250, 250];

hist = Histogram[<|"d1" -> data1, "d2" -> data2|>, Frame -> True, 
  ImageSize -> 600];


Row[{hist, 
  Graphics[Scale[hist[[1]], {1, 1/250}, {1, 0}], 
   AspectRatio -> 1/GoldenRatio, Frame -> True, ImageSize -> 600]}, 
Spacer[20]]

Old gif but reduced code gives the same issue.
enter image description here

As you can see, in the right, scaled plot, Tooltips are triggered outside rectangles. For more complicated visualizations it makes them useless.

It affects EventHandlers, CurrentValue["MouseOver"] etc. too. ScalingTransform behaves the same.

Any insights? Workarounds?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP