Skip to content

Commit

Permalink
Fixed issue #4133, error bar dataLabels positions failing on redraw.
Browse files Browse the repository at this point in the history
  • Loading branch information
oysteinmoseng authored and TorsteinHonsi committed Sep 9, 2016
1 parent 3b9c3af commit ff1e4d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion js/highcharts-more.src.js
Expand Up @@ -1622,7 +1622,14 @@ var arrayMin = Highcharts.arrayMin,
},
pointValKey: 'high', // defines the top of the tracker
doQuartiles: false,
drawDataLabels: seriesTypes.arearange ? seriesTypes.arearange.prototype.drawDataLabels : noop,
drawDataLabels: seriesTypes.arearange ? function () {
var valKey = this.pointValKey;
seriesTypes.arearange.prototype.drawDataLabels.call(this);
// Arearange drawDataLabels does not reset point.y to high, but to low after drawing. #4133
each(this.data, function (point) {
point.y = point[valKey];
});
} : noop,

/**
* Get the width and X offset, either on top of the linked series column
Expand Down
9 changes: 8 additions & 1 deletion js/parts-more/ErrorBarSeries.js
Expand Up @@ -22,7 +22,14 @@ seriesTypes.errorbar = extendClass(seriesTypes.boxplot, {
},
pointValKey: 'high', // defines the top of the tracker
doQuartiles: false,
drawDataLabels: seriesTypes.arearange ? seriesTypes.arearange.prototype.drawDataLabels : noop,
drawDataLabels: seriesTypes.arearange ? function () {
var valKey = this.pointValKey;
seriesTypes.arearange.prototype.drawDataLabels.call(this);
// Arearange drawDataLabels does not reset point.y to high, but to low after drawing. #4133
each(this.data, function (point) {
point.y = point[valKey];
});
} : noop,

/**
* Get the width and X offset, either on top of the linked series column
Expand Down

0 comments on commit ff1e4d7

Please sign in to comment.