Page 1 of 1

Forcing Bottom Chart to Redraw

Posted: Tue Oct 26, 2021 5:49 pm
by travis_russi
In the bottom chart, the graph becomes smaller in the X axis over time to the point of being an almost straight horizontal line.  Minimizing the bottom chart, then reshowing performs a recalculation of the X axis and the graph looks better.  Picking a different time slice also redraws the bottom chart properly.

Is there a way within the JS API to issue a redraw command for the bottom chart?

I saw the 'reload' command, but that seems a bit heavy-handed.
Documentation for Reload

Also, I tried wrapping the 'api.reload()' command in a 'setTimeout', but the parser complained about 'setTimeout'.  Is there a simple implementation that can call the 'reload' or a 'redraw' function every 30 seconds?

This is what I tried unsuccessfully:

Code: Select all

 
setTimeout(function() {
    api.reload();
}, 30000);

Re: Forcing Bottom Chart to Redraw

Posted: Thu Nov 04, 2021 10:28 am
by Andry API support
Hi, sorry for a delayed response.
graph becomes smaller in the X axis over time to the point of being an almost straight horizontal line.
this looks like a bug, we will investigate it.