View Full Version : Charting TimeAxis LabelProvider Does Not Handle New Line Very Well

14 Nov 2011, 7:31 AM
Hi Brendan.

I am trying to use a LabelProvider on a TimeAxis where I format the month and day with "MM/d" followed by a new line \n followed by the hours and minutes formatted with "HH:mm".

The TimeAxis labels format fine in Firefox except that there is too much space between them and the axis. In IE the labels are closer to the axis, but are shifted off center to the left.

The attached file demonstrates the problem. Please see the method getLabel under time.setLabelProvider.

Are we not allowed to use a new line in this context?

If not, then can we provide some SafeHtml instead of just a String?

Please let me know.

John Lewis

14 Nov 2011, 6:07 PM
Looks like a bug related to the text sprite bounding box calculation not properly taking into account new line characters. Thanks for the use case.

15 Nov 2011, 6:37 AM
Hi Brendan,

Thanks for handling this.

John Lewis