vega/vega-tooltip

Lift restriction on tooltip size for images

joelostblom opened this issue · 1 comments

Currently, it is not possible to display images larger than 200 pixels ydue to restrictions in their css for the max width and height:

img {
max-width: 200px;
max-height: 200px;
}

Changing this is not straightforward as one has to manually edit the css to increase the size of the image. One of the original motivations for adding the image tooltip key was that it would be useful for data science and machine learning applications as mentioned this comment #210 (comment). I agree with this but the current limit of 200 pixels means that it's really only icons and similar simple images that show up nicely in the tooltip. As it is easy to downsize an image if needed, I suggest that the max width/height restricted is lifted to allow the user the flexibility of choosing the size of their images themselves.

Here's an example showing a the panel of that microscope amateurs and it's really hard to see what is shown in the individual images because it's so small (while the images smaller than 200 pixels are showing up fine):

image
Open the Chart in the Vega Editor

An even better solution would be a parameter that controls the max-width of the image, but I don't think the specification and implementation of that should delay the removal of the current limit which I see us as is a good first step and would be useful for many applications. Let me know if I am missing something here and there is a good use case for the limit.

I'm okay with removing the limit. Can you send a pull request?