support changing chart data source type

This commit is contained in:
MaysWind
2021-01-26 01:30:43 +08:00
parent 102e2de733
commit fb155aae47
5 changed files with 80 additions and 19 deletions
+10 -7
View File
@@ -5,17 +5,20 @@ const allChartTypes = {
const defaultChartType = allChartTypes.Pie;
const allChartLegendTypes = {
Account: 0,
PrimaryCategory: 1,
SecondaryCategory: 1
const allChartDataTypes = {
ExpenseByAccount: 0,
ExpenseByPrimaryCategory: 1,
ExpenseBySecondaryCategory: 2,
IncomeByAccount: 3,
IncomeByPrimaryCategory: 4,
IncomeBySecondaryCategory: 5
};
const defaultChartLegendType = allChartLegendTypes.SecondaryCategory;
const defaultChartDataType = allChartDataTypes.ExpenseBySecondaryCategory;
export default {
allChartTypes: allChartTypes,
defaultChartType: defaultChartType,
allChartLegendTypes: allChartLegendTypes,
defaultChartLegendType: defaultChartLegendType,
allChartDataTypes: allChartDataTypes,
defaultChartDataType: defaultChartDataType,
};