1

I want to have a md-tooltip on SVG elements. I have tried to following structures:

<svg>
  ...
  <g>
    <path></path>
    <md-tooltip></md-tooltip>
  </g>
  ...
</svg>

and

<svg>
  ...
  <g>
    <path>
      <md-tooltip></md-tooltip>
    </path>
  </g>
  ...
</svg>

However, both dont seem to work. For the first one, I can see that the md-tooltip is appended to the body of the page, which seems to be the way the directive works, so that is fine, however, it is nowhere to be seen.

solution in Adding md-tooltip to a SVG chart? does not seem to work..

You see the tooltip is being added to body

Community
  • 1
  • 1
Wouter Coebergh
  • 804
  • 1
  • 6
  • 20
  • I don't think you can add it this way. You can not add other DOM elements there, why do you expect the tooltip to work? SVG content is XML but not HTML. – kuhnroyal May 09 '16 at 15:02
  • I expected it to work since the tooltip from bootstrap has always worked for us :) – Wouter Coebergh May 13 '16 at 15:02
  • Maybe read up here: http://stackoverflow.com/questions/17595813/is-it-possible-to-append-a-div-inside-svg-element – kuhnroyal May 14 '16 at 07:14

0 Answers0