This commit is contained in:
duanxiaohai 2024-04-16 09:33:40 +08:00
parent f7ed5595c0
commit c2d047afd9
4 changed files with 100 additions and 30 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div ref="chart" style="width: 100%; height: calc(100% - 36px);"></div> <div ref="chart" style="width: 100%; height: calc(100% - 68px)"></div>
</template> </template>
<script setup> <script setup>
@ -9,8 +9,8 @@ import * as echarts from "echarts";
const chart = ref(); // DOM const chart = ref(); // DOM
const data = [120, 200, 150, 80, 70, 110, 130]; const data = [120, 200, 50, 80, 70, ];
const lineData = [150, 230, 224, 218, 135, 147, 260]; const lineData = [150, 230, 24, 218, 135,];
const max = data const max = data
.concat(lineData) .concat(lineData)
.reduce((pre, cur) => (pre > cur ? pre : cur), 0); // .reduce((pre, cur) => (pre > cur ? pre : cur), 0); //
@ -54,12 +54,12 @@ const option = {
top: "8%", top: "8%",
textStyle: { textStyle: {
fontSize: 12, fontSize: 12,
color: "#ccc", color: "#ffffff", //
}, },
}, },
grid: { grid: {
left: "3%", left: "6%",
right: "6%", right: "9%",
bottom: "0%", bottom: "0%",
containLabel: true, containLabel: true,
color: "#ffffff", color: "#ffffff",
@ -74,7 +74,7 @@ const option = {
axisLabel: { axisLabel: {
// //
textStyle: { textStyle: {
color: "#ccc", color: "#ffffff",
}, },
}, },
@ -93,6 +93,7 @@ const option = {
name: "计划生育人数", name: "计划生育人数",
max: max, max: max,
splitLine: { splitLine: {
//线
show: false, show: false,
lineStyle: { lineStyle: {
color: "#ffffff", color: "#ffffff",
@ -100,18 +101,27 @@ const option = {
}, },
}, },
axisLabel: { axisLabel: {
// //y
textStyle: { textStyle: {
color: "#ccc", color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
}, },
}, },
}, },
{ {
type: "value", type: "value",
scale: true, scale: true,
name: "计划生育补贴金额/元",
min: 0, min: 0,
max: max, max: max,
name: "计划生育补贴金额/元",
splitLine: { splitLine: {
show: false, show: false,
lineStyle: { lineStyle: {
@ -120,14 +130,20 @@ const option = {
}, },
}, },
axisLabel: { axisLabel: {
// //y
textStyle: { textStyle: {
color: "#ccc", color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
}, },
}, },
// max: 300,
// position: "right",
// boundaryGap: [0.2, 0.2]
}, },
], ],
series: [ series: [
@ -141,6 +157,11 @@ const option = {
name: "计划生育补贴金额", name: "计划生育补贴金额",
data: lineData, data: lineData,
type: "line", //线 type: "line", //线
itemStyle: {
borderColor: "#00FCFF",
borderWidth: 1,
color: "#00FCFF",
},
}, },
{ {
xAxisIndex: 1, xAxisIndex: 1,

View File

@ -54,7 +54,7 @@ const option = {
top: "8%", top: "8%",
textStyle: { textStyle: {
fontSize: 12, fontSize: 12,
color: "#ccc", color: "#ffffff",
}, },
}, },
grid: { grid: {
@ -74,7 +74,7 @@ const option = {
axisLabel: { axisLabel: {
// //
textStyle: { textStyle: {
color: "#ccc", color: "#ffffff",
}, },
}, },
@ -95,14 +95,23 @@ const option = {
splitLine: { splitLine: {
show: false, show: false,
lineStyle: { lineStyle: {
color: "rgba(226, 226, 226, 0.3)", color: "#ffffff",
width: 1, width: 1,
}, },
}, },
axisLabel: { axisLabel: {
// //
textStyle: { textStyle: {
color: "#ccc", color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
}, },
}, },
}, },
@ -112,22 +121,27 @@ const option = {
name: "上门服务次数", name: "上门服务次数",
min: 0, min: 0,
max: max, max: max,
splitLine: { splitLine: {//线
show: false, show: false,
lineStyle: { lineStyle: {
color: "rgba(226, 226, 226, 0.3)", color: "#ffffff",
width: 1, width: 1,
}, },
}, },
axisLabel: { axisLabel: {//y
//
textStyle: { textStyle: {
color: "#ccc", color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
}, },
}, },
// max: 300,
// position: "right",
// boundaryGap: [0.2, 0.2]
}, },
], ],
series: [ series: [

View File

@ -86,10 +86,45 @@ let option = {
// } // }
// } // }
// }, // },
xAxis: {}, xAxis: {
axisLabel: {
//
textStyle: {
color: "#ffffff",
},
},
splitLine: {//线
show: true,
lineStyle: {
color: "rgba(255, 255, 255, 0.2)",
width: 1,
},
},
},
yAxis: { yAxis: {
type: "category", type: "category",
data: data, data: data,
splitLine: {//线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
},
},
axisLabel: {//y
textStyle: {
color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
},
},
}, },
series: [ series: [
{ {

View File

@ -107,9 +107,9 @@
<div class="flex1"> <div class="flex1">
<div class="yd_title familyPlanning"></div> <div class="yd_title familyPlanning"></div>
<!-- 计划生育 --> <!-- 计划生育 -->
<div style="width: 100%; "> <!-- <div style="width: 100%; "> -->
<ylJHSY></ylJHSY> <ylJHSY></ylJHSY>
</div> <!-- </div> -->
</div> </div>
</div> </div>
<div class="displayFlex center_bg"> <div class="displayFlex center_bg">