fix width calculation for history chart bars