-
Notifications
You must be signed in to change notification settings - Fork 45
Changes in Vega Tooltip 0.9
Vega Tooltip 0.9 and above use some new capabilities in Vega 3.3 and Vega-Lite 2.4. Learn the new API at https://github.com/vega/vega-tooltip#usage-and-apis. Read about the background behind these changes at https://github.com/vega/vega/issues/1198. The awesome thing about these changes in that you can define the format of tooltips in one place (the spec), if you don't use Vega Tooltip, your users still get the same tooltips with native HTML tooltips, and you could use another extension that implements the Vega tooltips handler API.
If you use Vega-Embed 3.7 and above, you will already have Vega-Tooltip installed so just remove any existing Vega Tooltip. You can customize Vega Tooltip in Vega Embed. We recommend upgrading.
Vega Tooltip now uses Tooltips defined in Vega. https://github.com/vega/vega/issues/1198 explains why we do this. This means that you have to define the tooltip
mark property in Vega or use the tooltip channel in Vega-Lite.
You now customize tooltips in Vega and Vega-Lite itself. In Vega, use expressions to format tooltips. In Vega-Lite, use the format
field definition property.
No. That's the awesome thing about the changes. You can use the implementation you like (including just native HTML tooltips with the title
attribute). However, we think that you will like our implementation.