diff --git a/js/parts-more/RadialAxis.js b/js/parts-more/RadialAxis.js index a12e15fc265..a7d7b8b2b5e 100644 --- a/js/parts-more/RadialAxis.js +++ b/js/parts-more/RadialAxis.js @@ -616,8 +616,15 @@ addEvent(Tick, 'afterGetLabelPosition', function (e) { ) % 360; if (axis.isRadial) { // Both X and Y axes in a polar chart - ret = axis.getPosition(this.pos, (axis.center[2] / 2) + - pick(labelOptions.distance, -25)); + ret = axis.getPosition( + this.pos, + (axis.center[2] / 2) + + H.relativeLength( + pick(labelOptions.distance, -25), + axis.center[2] / 2, + -axis.center[2] / 2 + ) + ); // Automatically rotated if (labelOptions.rotation === 'auto') { diff --git a/js/parts/Axis.js b/js/parts/Axis.js index 766ec54b493..04f36d39b11 100644 --- a/js/parts/Axis.js +++ b/js/parts/Axis.js @@ -2504,10 +2504,17 @@ H.extend(Axis.prototype, /** @lends Highcharts.Axis.prototype */{ */ /** - * Angular gauges and solid gauges only. The label's pixel distance - * from the perimeter of the plot area. + * Angular gauges and solid gauges only. + * The label's pixel distance from the perimeter of the plot area. * - * @type {number} + * Since v7.1.2: If it's a percentage string, it is interpreted the + * same as [series.radius](#plotOptions.gauge.radius), so label can be + * aligned under the gauge's shape. + * + * @sample {highcharts} highcharts/yaxis/labels-distance/ + * Labels centered under the arc + * + * @type {number|string} * @default -25 * @product highcharts * @apioption yAxis.labels.distance