I have a graph in a dashboard that is connected to 'from' and 'to' dates.
I have a listener that watches for the 'from' date to change, and changes the 'to' date to be 24 hours after the new 'from'date.
My problem: When I change the 'from' date, the graph redraws twice: once with the original 'to' date and again with the new 'to' date. This looks very unprofessional.
- original 'from' date is 9/26/2016 midnight, original 'to' date is 9/27/2016 midnight.
- date picker attached to 'from' date changes 'from' date to 9/22/2016 midnight.
- 'from' date listener in js code changes 'to' date to 9/23/2016 midnight.
- graph redraws from 9/22/2016 midnight (new 'from' date) to 9/27/2016 midnight (old 'to' date).
- graph then redraws again from 9/22/2016 midnight to 9/23/2016 midnight (new 'to' date).
If I could just tell the graph to not redraw "right away", I would be good. How do I do that?