0
votes

I'm using the following code so that if a person clicks on one of the candlesticks in the chart, the tooltip actually stays on the page:

events: {
    click: function(event) {
        if (cloneToolTip)
        {
            chart.container.firstChild.removeChild(cloneToolTip);
        }
        cloneToolTip = event.currentTarget.chart.tooltip.label.element.cloneNode(true);
       chart.container.firstChild.appendChild(cloneToolTip);

I'd like to move this from the series to the chart so that they can click anywhere on the page and have the tooltip stay. However, event.currentTarget.chart doesn't exist if they don't click on a candlestick. I looking through the result and can't find the corresponding tooltip. Can someone shed some light on this for me? Much appreciated!!

1

1 Answers

1
votes

You can use this instead of event.currentTarget.chart as the context is the chart itself. Hence this.tooltip should give you the tooltip that you are looking for.