JavaScript Tooltip flickering when hovered on chart

I have created custom tooltip for my chart in chartjs. But the issue comes when I hover on the chart, the tooltip starts flickering. Anyone knows how can I prevent this? Thanks!

if (!tooltip) {
               var tooltip = document.createElement('div');
               tooltip.id = 'tooltip';
               document.body.appendChild(tooltip);
            }

            if (!model.opacity) {
               tooltip.style.display = 'none';
               return;
            }

            tooltip.innerHTML = `<div class="tooltip-body">
                                            <label>` + model.body[0].lines[0] + `</label>
                                        </div>
                                        <div class="tooltip-caret"></div>`;

            tooltip.style.display = 'inline-block';
            tooltip.style.position = 'absolute';
            tooltip.style.top = getTooltipPosition().y + 'px';
            tooltip.style.left = getTooltipPosition().x + 'px';
Answer:1

TRY setting style - pointer-events to none , for the tool-tip element, like so :

...
tooltip.style.pointerEvents = 'none';
...
Answer:2

Trying to authenticate users on my ionic application through an external service and I need to use cordovas In app browser! The code works perfectly on android however on iOS the "loadstop" event ...

Trying to authenticate users on my ionic application through an external service and I need to use cordovas In app browser! The code works perfectly on android however on iOS the "loadstop" event ...

  1. cordova browser event

There are two conditions: The div (and the divs inside) must have a variable height. The divs inside must add a border on hover over them. There is a problem: The border of the hover adds height to ...

There are two conditions: The div (and the divs inside) must have a variable height. The divs inside must add a border on hover over them. There is a problem: The border of the hover adds height to ...

I'm trying to dynamically populate a ion-select dropdown with a json object. My html component looks like this: <ion-item [hidden]="editOptions.isEditing"> <ion-note stacked color="...

I'm trying to dynamically populate a ion-select dropdown with a json object. My html component looks like this: <ion-item [hidden]="editOptions.isEditing"> <ion-note stacked color="...

  1. ionic populate select
  2. ionic 3 populate select
  3. ionic 2 populate select

There is an imaginary square which I want to draw as two halves, i.e. two triangles. Whilst they should perfectly fit together and make a square, a tiny line caused by anti-aliasing appears. These ...

There is an imaginary square which I want to draw as two halves, i.e. two triangles. Whilst they should perfectly fit together and make a square, a tiny line caused by anti-aliasing appears. These ...

  1. html5 video anti aliasing
  2. canvas html5 anti aliasing
  3. html5 canvas no anti aliasing
  4. anti aliasing html5