Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class RadialDataLookupStrategy {

public constructor(private readonly allSeries: RadarSeries[], radialAxisData: RadarAxisData[]) {
this.radialBisector = bisector(axisData => axisData.axisRadian);
this.radialAxisData = clone(radialAxisData);
this.radialAxisData = clone(radialAxisData.sort(axisData => axisData.axisRadian));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please sort the cloned array instead of the argument

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, if this data is not sorted why is this not an issue in other browsers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is sorted in other browsers like chrome and safari.
Without the fix, in chrome radialAxisData, is sorted by axisRadian
Screenshot 2021-07-15 at 10 51 29 AM

The same code in firefox returns radialAxisData is not sorted
Screenshot 2021-07-15 at 10 52 19 AM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh strange - thanks for explaining!

this.addCyclicRedundancy();
}

Expand Down