Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip doesn't appear in layered chart when one layer has scale-bound selection #5732

Open
jakevdp opened this issue Jan 9, 2020 · 2 comments

Comments

@jakevdp
Copy link
Contributor

jakevdp commented Jan 9, 2020

Reproduction (vega editor):

{
  "config" : {"circle": {"tooltip": true, "size": 300}},
  "encoding": {
    "x": {"type": "quantitative", "field": "x"},
    "y": {"type": "quantitative", "field": "y"}
  },
  "layer": [
    {
      "data": {"values": [{"x": 0, "y": 1.5}]},
      "mark": {"type": "circle", "color": "red"}
    },
    {
      "data": {"values": [{"x": 0, "y": 0.1}]},
      "mark": {"type": "circle", "color": "black"},
      "selection": {"sel": {"type": "interval", "bind": "scales"}}
    }
  ]
}

visualization (95)

The tooltip is visible when hovering over the black point, and not visible over the red point. The tooltip appears correctly if both layers have a selection or if neither layer has a selection.

@ihightower
Copy link

a temporary work around in python is it to add "interactive" to charts separately.

this bug was reported by jakevdp (based on below stackoverflow post) and the temporary workaround is to follow the comment and the answer shown by ihightower).

https://stackoverflow.com/questions/59671294/altair-unable-to-get-tooltips-for-one-layer-in-a-line-chart/

@fxwiegand
Copy link

fxwiegand commented Aug 6, 2020

It should be mentioned that other plots added with concat are also affected by the problem as explained in #6773. This can be seen in this example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants