-
Notifications
You must be signed in to change notification settings - Fork 45
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
Title/image special handling shouldn't be on by default (or at least should be documented and have a way to disable) #694
Comments
I agree we should document the default handling of special fields and add an option to disable it. When we added it, it made sense as a quick way to have nicer tooltips. |
I agree it's a nice feature to have, but I think it's not a good default since it's too magical that these two fields are treated inconsistently. |
I don't feel strongly about it but I do like it as a default since it is hard for people to know how to configure the tooltips from a spec alone (many don't have direct access to Vega Tooltip in their applications). |
That's fair. I think I'm ok with if the key is more esoteric like There are data tables with a field |
I think what we can do is to introduce For existing applications that already rely on "title" and "image" as a trick can set titleKey to "title" if they prefer. |
Agreed. For imageKey, it should be a set imageKeys since there can be more than one image. |
The following blocks in https://github.com/vega/vega-tooltip/blob/next/src/formatValue.ts#L19-25 seems pretty problematic for me
doesn't seem to be documented and may cause unintended effect.
For example, if there is a field in the data source called
title
, it will automatically becomes "title" in the output even though users may not intend to do so.spec -->
(Note: I need to add calculate to simulate that there is a field "title" in the example.)
I don't think we should do this by default since it will surprise people more.
cc: @domoritz @nyurik (You might have an idea why we had this block.)
The text was updated successfully, but these errors were encountered: