Vega-lite: [Revision] Default Tooltip Behavior

Created on 26 Apr 2019  路  6Comments  路  Source: vega/vega-lite

Currently, we always show tooltips for all the fields encoded, just like Tableau.

However, it seems like our wrapper APIs won't have this on by default, which is confusing.

We should understand the rationale behind why tooltip shouldn't be included and be consistent across languages.

The motivation to include it is simply facilitating EDA (just like Tableau). But the con is that this can be quite annoying for layered and multi-view plots.

Please comment if you have any opinion.

cc: @jakevdp @jheer @arvind @domoritz -- It'd be great to resolve this topic soon so we can be consistent across languages.

Most helpful comment

As I mentioned in Slack when this decision was first being discussed, I think having tooltips be opt-in rather than opt-out makes sense. Tooltips are an encoding, and every other encoding in Vega-Lite is opt-in.

As I was preparing the Altair 3 release, I found myself disabling tooltips in many, many places within our documentation and examples. When Jeff mentioned that he chose to disable tooltips by default in his javascript API, I took stock of things and realized that would be the cleanest solution for Altair as well. It's also consistent with the behavior of Altair 2, so it will make the transition less jarring to users.

All 6 comments

If people have strong feelings about this, I can see that one solution is to turn this off by default in the language and turn it on in an EDA tool like Voyager.

I agree that tooltips are useful for details-on-demand. However, the major problem from my point of view is that they interfere with many important use cases, including layered and interactive plots. In other cases, I may want to create a single layer plot and prefer to not have tooltips pop up by default (for example, because they might obscure data points I otherwise want to look at relative to the cursor).

I think having an _opt-in_ way to easily enable tooltips that include entries for all visualized fields is great. On the other hand, I found it frustrating (and from a pedagogical perspective, unnecessarily confusing) to opt-out of tooltips for a large quantity of charts, which led to my decision to suppress default tooltips in the VL JS API.

I also think that other tools, such as Voyager, could change this default it if makes sense in those more specific contexts!

I think we're on the same page.

The question is then whether this is a major version change or just minor.
(Probably major? If so, do we want to do it now?)

Btw, I think if we turn this off by default, we should add (config.)mark.tooltip = true as a shortcut for {content: 'encoding'} (current default) as {content: 'encoding'} is a bit too complicated to specify for opting in to the old default. :)

As I mentioned in Slack when this decision was first being discussed, I think having tooltips be opt-in rather than opt-out makes sense. Tooltips are an encoding, and every other encoding in Vega-Lite is opt-in.

As I was preparing the Altair 3 release, I found myself disabling tooltips in many, many places within our documentation and examples. When Jeff mentioned that he chose to disable tooltips by default in his javascript API, I took stock of things and realized that would be the cleanest solution for Altair as well. It's also consistent with the behavior of Altair 2, so it will make the transition less jarring to users.

Will be addressed in #4919

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mcadams92 picture mcadams92  路  3Comments

swanderz picture swanderz  路  4Comments

kanitw picture kanitw  路  4Comments

kanitw picture kanitw  路  4Comments

domoritz picture domoritz  路  3Comments