Tried making the d3 chart to load after changing the time range picker. Ended up cleaning the code but it's still not fixed.