There is a minor bug with Ext.chart.axis.sprite.Axis where a label may not be redrawn if it is one pixel wider than the axis was previously, when redrawing the chart.

Description:



Code:



if (Math.abs(me.thickness - (thickness)) > 1) {

That line in the renderLabels function prevents the axis from updating its thickness if the maxLabelThickness is 1 pixel more or less than the axis thickness. Because there is a thickness check eariler to determine if the label should be rendered, the label will not be drawn and the axis will not resize.

Steps to reproduce the problem:

Create a chart that has y axis labels that change at some point.

When the labels update (perhaps from a chart.redraw()), a label needs to be one pixel wider than the axis was previously.


The result that was expected:

The axis resizes to accomidate the label.

The label is displayed.


The result that occurs instead:

The axis stays the same size.

The label is not displayed.


Suggested fix:

The if check could compare against 0 instead of 1, or even (me.thickness !== thickness) seems to work fine.


The url to fiddle testcase:

http://ift.tt/1CXgJYe


Touch 2.3.2

Tested in latest Mac Chrome