This repository was archived by the owner on Jul 29, 2019. It is now read-only.

Description
I've got into the problem of adding tooltip to a complex Graph2d element (many many groups, because some items got to be connected by lines while others don't).
Solved it in two different ways. The less ugly one at the moment is using the click listener to get the closest point so as to display an HTML div with the tooltip text inside.
However, a much less ugly way of doing it (IMHO) could be one of these:
- Adding an ID element to each SVG element (so that we could embed a click listener on those items and retrieve the tooltip content via the ID), the Dataset already attaches an UUID to each datapoint, why is that not linked inside the SVG elements?
- Giving the possibility to add events listeners directly when creating the datapoint
- adding arbitrary attributes to SVG elements via the corresponding datapoint
Let me know in any of this makes sense.