Skip to content

Commit 902736a

Browse files
correct ordering for ordinal (string) keys
fixes #1690
1 parent d4ac23a commit 902736a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/base/base-mixin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ export class BaseMixin {
364364

365365
_computeOrderedGroups (data) {
366366
// clone the array before sorting, otherwise Array.sort sorts in-place
367-
return Array.from(data).sort((a, b) => this._ordering(a) - this._ordering(b));
367+
return Array.from(data).sort((a, b) => d3.ascending(this._ordering(a), this._ordering(b)));
368368
}
369369

370370
/**

0 commit comments

Comments
 (0)