Fixed an error in computing the margin of the time tick in custom UI.