View Full Version : [FIXED] (Beta 1) Under IE 8 Horizontal Axis Labels Are Left Justified When \n Used

19 Dec 2011, 5:05 PM

When a new line character is escaped in the axis labels, the labels along the horizontal axis all wind up left justified in IE8 (please see attached IELabelPadding.jpg). Here is an example code snippet.

timeAxis.setLabelProvider(new LabelProvider<Date>() {
public String getLabel(Date item) {
// Works with setTextLabelPadding method
//return DATE_FORMAT.format(item) + " " + TIME_FORMAT.format(item);
// Does not work with setTextLabelPadding method
return DATE_FORMAT.format(item) + "\n" + TIME_FORMAT.format(item);

When there is no new line character is escaped in the axis labels, then the axis labels are center justified. When there is, the axis labels are left justified under IE 8.

To reproduce, please run the attached ColumnChart_LabelPadding.txt commenting and un-commenting the return statements as shown in the above using IE 8.

John Lewis

21 Dec 2011, 3:24 PM
Thanks for the test case. I plan to improve axis label alignment in upcoming beta releases.

19 Jan 2012, 11:52 AM
In the next release VML text bounding box calculations will account for new line characters.

2 Mar 2012, 1:11 PM
This fix should already be bundled in an earlier beta. If you plan to test again, please use the recently released beta 4 (http://www.sencha.com/forum/showthread.php?184556-Ext-GWT-3.0-Beta-4-Now-Available). Thanks again for including the analysis and test case.

If you continue to notice this problem with this release, please post a reply and I'll continue following up with our charts engineer.