changed x-grid on traffic image according to period