add candlestick chart for account balance trends

This commit is contained in:
MaysWind
2025-08-05 23:29:49 +08:00
parent 0d55912f6c
commit 7283b724b1
24 changed files with 292 additions and 64 deletions
+24
View File
@@ -52,6 +52,30 @@ export class TrendChartType implements TypeAndName {
}
}
export class AccountBalanceTrendChartType implements TypeAndName {
private static readonly allInstances: AccountBalanceTrendChartType[] = [];
public static readonly Area = new AccountBalanceTrendChartType(0, 'Area Chart');
public static readonly Column = new AccountBalanceTrendChartType(1, 'Column Chart');
public static readonly Candlestick = new AccountBalanceTrendChartType(2, 'Candlestick Chart');
public static readonly Default = TrendChartType.Column;
public readonly type: number;
public readonly name: string;
private constructor(type: number, name: string) {
this.type = type;
this.name = name;
AccountBalanceTrendChartType.allInstances.push(this);
}
public static values(): TrendChartType[] {
return AccountBalanceTrendChartType.allInstances;
}
}
export class ChartDataType implements TypeAndName {
private static readonly allInstances: ChartDataType[] = [];
private static readonly allInstancesByType: Record<number, ChartDataType> = {};