crubier / react-graph-vis

A react component to render nice graphs using vis.js

Home Page:http://crubier.github.io/react-graph-vis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tooltip example

sfbrunner opened this issue · comments

Hi crubier,
Thanks for the really great module.
Can I just ask for a quick example how to display a tooltip, for example onclick or onhover? How do you use the "events" object to do that?

Thanks a ton!
Simon

Would love to see this as well.. I'm putting a "title" field into my nodes, but I can't get it to display the title when the mouse is hovering over the nodes.

@rlyle Hi, have you found any solutions?

@chepelevdi no we did not, I was able to hook the showPopup event and display a Snackbar from the bottom instead which was good enough.

@rlyle I've resolved it. Solution: you have to connect vis-network.min.css directly to your project(to index.html or directly from modules/vis/.. to your component)

@rlyle Can you please provide an example on how can one add a custom display such as Snackbar, on showPopup event. I am not able to get it done. I'm trying to display a modal box.

I already added the vis-network.min.css to the component but still, the tooltip is not showing. @chepelevdi Did you did anything else to get it to work?

Managed to get it working. Thanks @chepelevdi !

@chepelevdi or @thechosenjuan if you have a working example, we could add it to the doc, that would be nice !

Thanks ! Updated the readme

import 'vis-network/styles/vis-network.css';

import 'vis-network/styles/vis-network.css';

awesome, only with this change in the import my problem was solved. I searched in several sites and this is the solution. Thanks for write it.