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 presenting interactive plot #308

Open
denisshepelin opened this issue Jun 7, 2019 · 1 comment
Open

Tooltip presenting interactive plot #308

denisshepelin opened this issue Jun 7, 2019 · 1 comment

Comments

@denisshepelin
Copy link

Hi,
I'm trying to implement the following feature:
User has some additional data that is tricky to show on the regular map (such as comparison between various strains). If user is able to construct a Vega scheme for the graph, then it would be possible to show it Vega graph in the tooltip.

The status so far is that I've forked this repository and created a class representing some basic tooltip that will load predefined json from the dev server. Also tooltip filters the data for the plot using filter construct from the vega-lite.

The code lives in the branch vega-tooltip here

It looks like that with the simplest graph possible that shows what are the flux values for some reaction.
image

I'm looking forward to hear if this feature makes some sense in the core escher.
There are some technical challenges so far as welI - I wonder how can I:

  1. Pass a json file to the tooltip using the Builder class
  2. Ensure the proper rendering. I'm not sure what is the best event to connect this tooltip. Right now I've wanted to be 100% certain that the right dom element is there and only after ensuring that attach Vega graph. Because of that the graph appears only after second mouseover.
  3. Implement filtering and other context dependent events to be also specified in the initialization of the component.
@zakandrewking
Copy link
Owner

zakandrewking commented Jun 11, 2019

Hi Denis,

This is a great application of the tooltips. Something like this would be great in Escher core. The biggest bottleneck right now is that support for more than two datasets is not implemented yet. We've had an unfinished implementation of that here for a while: #242

Once that is done (and we can use help from anyone interested!), then Escher will have built-in access to the data that would feed your tooltip.

Also, for Escher core we want to include only one default tooltip, to keep things simple. But I can imagine that when 2+ datasets are loaded, the vega-lite graph you present could be embedded alongside the current tooltip info.

Finally, we are careful about not including too many dependencies that will balloon the size of the Escher javascript bundle. If you can implement the plot in raw d3 instead of vega-lite, that would help too.

best,
zak

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

2 participants