double y-axis in StoreCustomerGrowthChart.vue

This commit is contained in:
Timi
2026-09-09 13:14:10 +08:00
parent fe94d4866e
commit b09b430334
@@ -43,16 +43,43 @@ const {
} = useStoreChartWindow(dateTextList);
const chartOption = computed<EChartsOption>(() => ({
...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)
}
]