support custom chart sorting order

This commit is contained in:
MaysWind
2026-01-03 21:23:49 +08:00
parent 526d7e50ec
commit 91a00cb5b3
3 changed files with 140 additions and 54 deletions
+4
View File
@@ -291,6 +291,10 @@ export class WeekDay implements TypeAndName {
WeekDay.allInstancesByName[name] = this;
}
public getDisplayOrder(firstDayOfWeek: WeekDayValue): number {
return (this.type - firstDayOfWeek + 7) % 7;
}
public static values(): WeekDay[] {
return WeekDay.allInstances;
}