From ad414a9e6fb82feaf6cd68bfcd12d81ca537e6e0 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Tue, 4 Jun 2024 13:47:30 +0800 Subject: [PATCH] gx --- src/view/echarts_yl/ylSMFW.vue | 38 ++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/src/view/echarts_yl/ylSMFW.vue b/src/view/echarts_yl/ylSMFW.vue index cb945e9..8d18e44 100644 --- a/src/view/echarts_yl/ylSMFW.vue +++ b/src/view/echarts_yl/ylSMFW.vue @@ -43,12 +43,7 @@ const option = { tooltip: { trigger: "axis", formatter: "{b0}
{a0}:{c0}
{a1}:{c1}", - axisPointer: { - type: "cross", - label: { - backgroundColor: "#3F82F7", //提示文字标题颜色 - }, - }, + axisPointer: {}, }, legend: { data: ["上门服务时长", "上门服务次数"], @@ -95,7 +90,6 @@ const option = { type: "value", scale: true, name: "时长/小时", - max: max, splitLine: { show: false, lineStyle: { @@ -127,7 +121,6 @@ const option = { scale: true, name: "次数/次", min: 0, - max: max, splitLine: { //分割线配置 show: false, @@ -155,10 +148,35 @@ const option = { }, }, }, + { + type: "value", + max: 100, + splitLine: { + show: false, + lineStyle: { + type: "solid", + color: "rgba(255, 255, 255, 0.3)", + }, + }, + axisLine: { + show: false, + lineStyle: { + type: "dotted", + }, + }, + axisLabel: { + show: false, + fontSize: 16, + color: "#ffffff", + lineHeight: 19, + fontFamily: "MicrosoftYaHei", + }, + }, ], series: [ { z: 1, + yAxisIndex: 0, name: "上门服务时长", data: data, barWidth: 20, @@ -187,6 +205,7 @@ const option = { }, }, { + yAxisIndex: 1, name: "上门服务次数", data: lineData, type: "line", //线状图 @@ -206,10 +225,11 @@ const option = { }, { xAxisIndex: 1, + yAxisIndex: 2, itemStyle: { color: "rgba(180, 180, 180, 0.2)", //外阴影背景 }, - data: data.map(() => max), + data: data.map(() => 100), barWidth: 40, //外阴影背景宽 emphasis: { itemStyle: {