Actual behaviour
A polar chart with type "bar" and data labels causes JavaScript error.
Live demo with steps to reproduce
https://jsfiddle.net/highcharts/30fg6y8d/
Product version
v10.3.3
Affected browser(s)
All
Workaround
Set type: 'column' and inverted: true.
Suggested fix
The following statement goes wrong because it assumes that Series is two steps up in the inheritance chain:
|
Object |
|
.getPrototypeOf(Object.getPrototypeOf(this)) |
|
.alignDataLabel.call( |
|
this, |
|
point, |
|
dataLabel, |
|
options, |
|
alignTo, |
|
isNew |
|
); |
However, with bar, and theoretically other custom series types, this assumption is not correct, and we get into an eternal loop. The fix is to apply it on the Series prototype directly:
Series.prototype.alignDataLabel.call(
this, point, dataLabel, options, alignTo, isNew
);
In addition to that statement, Series must be imported and the typing of alignTo must be resolved.
Actual behaviour
A polar chart with type "bar" and data labels causes JavaScript error.
Live demo with steps to reproduce
https://jsfiddle.net/highcharts/30fg6y8d/
Product version
v10.3.3
Affected browser(s)
All
Workaround
Set
type: 'column'andinverted: true.Suggested fix
The following statement goes wrong because it assumes that
Seriesis two steps up in the inheritance chain:highcharts/ts/Series/PolarComposition.ts
Lines 896 to 905 in d8c12a4
However, with
bar, and theoretically other custom series types, this assumption is not correct, and we get into an eternal loop. The fix is to apply it on theSeriesprototype directly:In addition to that statement, Series must be imported and the typing of
alignTomust be resolved.