Skip to content

Commit

Permalink
Component | Donut | Fix: sortFunction type error
Browse files Browse the repository at this point in the history
  • Loading branch information
reb-dev committed Nov 15, 2023
1 parent 41ca256 commit 1c9915c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ts/src/components/donut/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class Donut<Datum> extends ComponentCore<Datum[], DonutConfigInterface<Da
.endAngle(config.angleRange?.[1] ?? 2 * Math.PI)
.padAngle(config.padAngle)
.value(d => getNumber(d.datum, config.value, d.index) || 0)
.sort((a, b) => config.sortFunction(a.datum, b.datum))
.sort((a, b) => config.sortFunction?.(a.datum, b.datum))

this.arcGroup.attr('transform', `translate(${this._width / 2},${this._height / 2})`)

Expand Down

0 comments on commit 1c9915c

Please sign in to comment.