mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
add candlestick chart for account balance trends
This commit is contained in:
@@ -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> = {};
|
||||
|
||||
Reference in New Issue
Block a user