This commit is contained in:
姚宇浩 2024-06-04 13:47:30 +08:00
parent 06454a5510
commit ad414a9e6f
1 changed files with 29 additions and 9 deletions

View File

@ -43,12 +43,7 @@ const option = {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
formatter: "{b0}<br/> {a0}:{c0}<br/>{a1}:{c1}", formatter: "{b0}<br/> {a0}:{c0}<br/>{a1}:{c1}",
axisPointer: { axisPointer: {},
type: "cross",
label: {
backgroundColor: "#3F82F7", //
},
},
}, },
legend: { legend: {
data: ["上门服务时长", "上门服务次数"], data: ["上门服务时长", "上门服务次数"],
@ -95,7 +90,6 @@ const option = {
type: "value", type: "value",
scale: true, scale: true,
name: "时长/小时", name: "时长/小时",
max: max,
splitLine: { splitLine: {
show: false, show: false,
lineStyle: { lineStyle: {
@ -127,7 +121,6 @@ const option = {
scale: true, scale: true,
name: "次数/次", name: "次数/次",
min: 0, min: 0,
max: max,
splitLine: { splitLine: {
//线 //线
show: false, 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: [ series: [
{ {
z: 1, z: 1,
yAxisIndex: 0,
name: "上门服务时长", name: "上门服务时长",
data: data, data: data,
barWidth: 20, barWidth: 20,
@ -187,6 +205,7 @@ const option = {
}, },
}, },
{ {
yAxisIndex: 1,
name: "上门服务次数", name: "上门服务次数",
data: lineData, data: lineData,
type: "line", //线 type: "line", //线
@ -206,10 +225,11 @@ const option = {
}, },
{ {
xAxisIndex: 1, xAxisIndex: 1,
yAxisIndex: 2,
itemStyle: { itemStyle: {
color: "rgba(180, 180, 180, 0.2)", // color: "rgba(180, 180, 180, 0.2)", //
}, },
data: data.map(() => max), data: data.map(() => 100),
barWidth: 40, // barWidth: 40, //
emphasis: { emphasis: {
itemStyle: { itemStyle: {