4

I would like to add tooltips (or hovering behavior) on SVG diagrams generated by diagrams.

Is there a way to add custom properties to a diagram , or worst comes to the worst be able to set and id to things, so they can be referred to in Javascript.

Will Ness
  • 70,110
  • 9
  • 98
  • 181
mb14
  • 22,276
  • 7
  • 60
  • 102

2 Answers2

1

The question is slightly misleading because the title property that gives tooltips on SVGs in browsers is not an attribute, but an element of its own. You add tooltips, that is SVG titles, with the method svgTitle in Diagrams.Backend.SVG.

The same module also contains methods svgID and svgClass to add these attributes to allow external javascript to find specific SVG elements.

0

I kept googling, and havn't tried it yet, but I found this. It seems to exist to exactly satisfy your need.

It is SVG backend only.

Chris Wohlert
  • 610
  • 3
  • 12
  • It looks like it has been removed in version 1.4 which is probably why I never saw it. However it seems to have been reintroduced in v 1.4.3 (Dec 2019). – mb14 Mar 08 '20 at 09:47