I am trying to start debugging my application from within typescript.
My knowledge of debugging javascript/typescript is limited,
so it may well be I should ignore/disable some error messages in Chrome.
I may be working from a somewhat older version of the highchart sources (~ 2 months old).
Somewhere a call is done to Axis.setScale() in my application.
In debug mode chrome barfs on
OrdinalAxis.ts:1402 : "Uncaught TypeError": Assignment to constant variable.
With my limited experience with typescript, I do seem to understand that the code (which I pasted from github):
Code: Select all
public getOverscrollPositions(): Array<number> {
const ordinal = this,
axis = ordinal.axis,
extraRange = axis.options.overscroll,
distance = ordinal.overscrollPointsRange,
positions = [],
max = axis.dataMax;
if (defined(distance)) {
// Max + pointRange because we need to scroll to the last
while (
(max as any) <= (axis.dataMax as any) + (extraRange as any)
) {
(max as any) += (distance as any);
positions.push(max);
}
}
return positions as any;
}
Code: Select all
const max
I could try to find out whether distance in practice should always be undefined here, but could you have a look whether this is a bug?
I somehow suspect, that I should disable exceptions that are thrown in debug mode (chrome) by highcharts code.
If debug mode is off, my chart loads.
I also notice other exceptions being thrown in debug mode under slightly different conditions
(i.e. Uncaught TypeError: Cannot read properties of null Point.js:249)
Thanks,
Lourens