Format tooltip data according to ticks