Truncate labels, which does not fit in box.

Close #1208.
so please place the if block within the callback