Thanks to visit codestin.com
Credit goes to github.com

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

Mouse hover events for tooltips in graph2d #2126

@2dvisio

Description

@2dvisio

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:

  1. 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?
  2. Giving the possibility to add events listeners directly when creating the datapoint
  3. adding arbitrary attributes to SVG elements via the corresponding datapoint

Let me know in any of this makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions