Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Needle animation switches to pivot animation
posted

Hello, 

I'm working with Radial Gauge control. I would like to have an animation of needle, so I random numbers and pass them to a control, below there is a simplified part of code:

window.setInterval(function() { showWindow() }, 4000);

function showWindow()
{
   var needle = Math.random() * 5;
   needle = Math.min(Math.max(needle, 0), 100);
   $("#radialGauge").igRadialGauge("option", "value", needle);
   $("#needleValue").val(needle);
}

Here is an instantation of control:

$("#radialGauge").igRadialGauge({
    height: "400px",
   transitionDuration: "1000",
   width: "100%",
   maximumValue: 5
});

$("#radialGauge").igRadialGauge("option", "value", 0);
$("#needleValue").val(0);

 

At the beginning everything works fine, needle moves in animated way, but after some time if I switch in browser to another tab and back to tab with radio gauge, everything changes. Needle moves immediately without an animation, and pivot in being increased and decreased in animated way.     

Regards

Przemek

  • 16310
    Offline posted

    Hi Przemyslaw,

    Thank you for the sample code shared. I used it on my own sample and was able to reproduce the described behavior. I am currently investigating it and will keep you posted with my findings.