jani
Posts: 1
Joined: Thu Sep 20, 2012 11:14 am

Tooltip cloning and tooltip into SVG

I clone tooltip and stop chart updating when user clicks some node in chart.

My problems are:
1) Tooltip clones perfectly when useHTML: false (tooltip property) but if useHTML: true -> chart shows only empty tooltip rectangle.
2) Is it possible to add cloned tooltip data into chart so I could have info box in svg when I use chart.getSVG()


Tooltip cloning:

Code: Select all

if (cloneToolTip)
  chart.container.firstChild.removeChild(cloneToolTip);

  cloneToolTip = this.series.chart.tooltip.label.element.cloneNode(true);
  chart.container.firstChild.appendChild(cloneToolTip);
seba
Posts: 4415
Joined: Tue Jul 31, 2012 2:26 pm

Re: Tooltip cloning and tooltip into SVG

Have you any live example? What is the purpose of cloning tooltip ?
Sebastian Bochan
Highcharts Developer
ManojKande
Posts: 1
Joined: Fri Sep 24, 2021 12:59 pm

Re: Tooltip cloning and tooltip into SVG

I'm facing a similar issue. Here's a live example.

http://jsfiddle.net/j8uoswpc/

The purpose of it is to show a sticky tooltip on click.
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Tooltip cloning and tooltip into SVG

Hi,

Welcome to our forum and thanks for contacting us with your question!
It's nice that you wrote on this topic instead of creating a new one.

This is because when useHTML is set to true the content is generated after SVG as a DIV element which should also be cloned.

Demo: http://jsfiddle.net/BlackLabel/mLdh89vz/

Feel free to ask any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Usage”