change the outflows/inflows by account trend charts to non-stacked charts and hide the total amount for these charts

This commit is contained in:
MaysWind
2025-10-28 00:44:42 +08:00
parent 765e64d96f
commit 52bab6f726
7 changed files with 53 additions and 7 deletions
@@ -218,7 +218,9 @@ export function useStatisticsTransactionPageBase() {
});
const showTotalAmountInTrendsChart = computed<boolean>(() => {
return query.value.chartDataType !== ChartDataType.TotalOutflows.type &&
return query.value.chartDataType !== ChartDataType.OutflowsByAccount.type &&
query.value.chartDataType !== ChartDataType.InflowsByAccount.type &&
query.value.chartDataType !== ChartDataType.TotalOutflows.type &&
query.value.chartDataType !== ChartDataType.TotalExpense.type &&
query.value.chartDataType !== ChartDataType.TotalInflows.type &&
query.value.chartDataType !== ChartDataType.TotalIncome.type &&
@@ -226,6 +228,11 @@ export function useStatisticsTransactionPageBase() {
query.value.chartDataType !== ChartDataType.NetIncome.type;
});
const showStackedInTrendsChart = computed<boolean>(() => {
return query.value.chartDataType !== ChartDataType.OutflowsByAccount.type &&
query.value.chartDataType !== ChartDataType.InflowsByAccount.type;
});
const translateNameInTrendsChart = computed<boolean>(() => {
return query.value.chartDataType === ChartDataType.TotalOutflows.type ||
query.value.chartDataType === ChartDataType.TotalExpense.type ||
@@ -307,6 +314,7 @@ export function useStatisticsTransactionPageBase() {
totalAmountName,
showPercentInCategoricalChart,
showTotalAmountInTrendsChart,
showStackedInTrendsChart,
translateNameInTrendsChart,
categoricalAnalysisData,
categoricalAllAnalysisData,
@@ -349,6 +349,7 @@
:show-value="showAmountInChart"
:enable-click-item="true"
:default-currency="defaultCurrency"
:stacked="showStackedInTrendsChart"
:show-total-amount-in-tooltip="showTotalAmountInTrendsChart"
ref="monthlyTrendsChart"
id-field="id"
@@ -522,6 +523,7 @@ const {
totalAmountName,
showPercentInCategoricalChart,
showTotalAmountInTrendsChart,
showStackedInTrendsChart,
translateNameInTrendsChart,
categoricalAnalysisData,
categoricalAllAnalysisData,
@@ -211,6 +211,7 @@
:date-aggregation-type="trendDateAggregationType"
:fiscal-year-start="fiscalYearStart"
:items="trendsAnalysisData && trendsAnalysisData.items && trendsAnalysisData.items.length ? trendsAnalysisData.items : []"
:stacked="showStackedInTrendsChart"
:translate-name="translateNameInTrendsChart"
:default-currency="defaultCurrency"
id-field="id"
@@ -405,6 +406,7 @@ const {
showAmountInChart,
totalAmountName,
showPercentInCategoricalChart,
showStackedInTrendsChart,
translateNameInTrendsChart,
categoricalAnalysisData,
trendsAnalysisData,