# Makie Poly Tooltips issue

**URL:** <https://discourse.julialang.org/t/makie-poly-tooltips-issue/133606>\
**Category:** General Usage\
**Tags:** makie\
**Created:** [November 2, 2025, 1:20pm UTC](https://discourse.julialang.org/t/makie-poly-tooltips-issue/133606 "2025-11-02T13:20:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AUK1939](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@AUK1939](https://discourse.julialang.org/u/AUK1939)\
**Post date:** [November 2, 2025, 1:20pm UTC](https://discourse.julialang.org/t/makie-poly-tooltips-issue/133606/1 "2025-11-02T13:20:20Z")

</div>

I can’t seem to get makie tooltips working for Poly objects. Here is a MWE

```julia-auto
using GLMakie
using GLMakie.Makie.GeometryBasics

f = Figure()
Axis(f[1, 1], aspect = DataAspect())

# shape decomposition with custom tooltip
poly!(Circle(Point2f(0, 0), 15f0), 
    color = :pink,
    inspectable = true,
    inspector_label = (self, idx, pos) -> "Custom tooltip: Circle at origin with radius 15"
)

DataInspector(f)
f

```

As you can see when I hover over the circle - I simply see the default bounding box label and not my custom label specified with `inspector_label`. Any ideas on how to fix this?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/2/a21bceafcd3ef9de0e4d6f2f10a7c074bd8d7e44.png)

What does seem to work is providing an `inspector_hover` method

```julia-auto
using GLMakie
using GLMakie.Makie.GeometryBasics
using GLMakie.Makie: update_tooltip_alignment!, DataInspector

f = Figure()
Axis(f[1, 1], aspect = DataAspect())

# shape decomposition with custom tooltip using inspector_hover
p = poly!(Circle(Point2f(0, 0), 15f0), 
    color = :pink,
    inspectable = true
)

# Set custom inspector_hover callback
p.inspector_hover[] = (inspector, plot, index, primitive) -> begin
    println("Inspector hover called! index=$index")
    
    text = "Custom tooltip: Circle at origin with radius 15"
    proj_pos = Point2f(Makie.mouseposition_px(inspector.root))
    update_tooltip_alignment!(inspector, proj_pos; text=text)
    
    return true
end

DataInspector(f)
f

```

Now I get what I expected (see image below). I’m not sure if this is a bug or if my usage is off

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/0/308c8d8d0e3d4fc724731ff11a57f78866ce33f0.png)

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [November 2, 2025, 1:59pm UTC](https://discourse.julialang.org/t/makie-poly-tooltips-issue/133606/2 "2025-11-02T13:59:01Z")

</div>

This is fixed in: [DataInspector rework by ffreyer · Pull Request #5241 · MakieOrg/Makie.jl · GitHub](https://github.com/MakieOrg/Makie.jl/pull/5241)  
Note that the PR is breaking:

```julia
f = Figure()
ax = Axis(f[1, 1], aspect = DataAspect())

# shape decomposition with custom tooltip
poly!(Circle(Point2f(0, 0), 15f0), 
    color = :pink,
    inspectable = true,
    inspector_label = (plotelem, pos) -> "Custom tooltip: Circle at origin with radius 15"
)

DataInspector(ax) # needs to be ax now
f

```

---

<div class="post-metadata">

**Author:** ![AUK1939](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@AUK1939](https://discourse.julialang.org/u/AUK1939)\
**Post date:** [November 2, 2025, 10:06pm UTC](https://discourse.julialang.org/t/makie-poly-tooltips-issue/133606/3 "2025-11-02T22:06:49Z")

</div>

Cool - thanks
