From b09b430334644b63cfddfea67e8a1e96a9c4cc85 Mon Sep 17 00:00:00 2001 From: Timi Date: Wed, 9 Sep 2026 13:14:10 +0800 Subject: [PATCH] double y-axis in StoreCustomerGrowthChart.vue --- .../component/StoreCustomerGrowthChart.vue | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/pages/store/component/StoreCustomerGrowthChart.vue b/src/pages/store/component/StoreCustomerGrowthChart.vue index 50750ac..4a4612b 100644 --- a/src/pages/store/component/StoreCustomerGrowthChart.vue +++ b/src/pages/store/component/StoreCustomerGrowthChart.vue @@ -43,16 +43,43 @@ const { } = useStoreChartWindow(dateTextList); const chartOption = computed(() => ({ ...buildStoreBaseChartOption(visibleDateTextList.value), + yAxis: [ + { + type: "value", + name: "客户总量", + axisLabel: { + color: "#52607a" + }, + splitLine: { + lineStyle: { + color: "rgba(148, 163, 184, .2)" + } + } + }, + { + type: "value", + name: "新客户量", + position: "right", + axisLabel: { + color: "#52607a" + }, + splitLine: { + show: false + } + } + ], series: [ { name: "客户总量", type: "line", + yAxisIndex: 0, smooth: true, data: visibleDateTextList.value.map(dateText => getDailyStat(dateText)?.totalCustomerCount || 0) }, { name: "新客户量", type: "bar", + yAxisIndex: 1, data: visibleDateTextList.value.map(dateText => getDailyStat(dateText)?.newCustomerCount || 0) } ]