recalc and redraw the x-axis when refreshing