Browse Source

echarts折线图修改

dev
xingyongchun 2 years ago
parent
commit
dbed028084
  1. 8
      web/client/src/sections/quanju/containers/footer/conserve/left/lunbozujian.js
  2. 56
      web/client/src/sections/quanju/containers/footer/conserve/left/zhexin.js

8
web/client/src/sections/quanju/containers/footer/conserve/left/lunbozujian.js

@ -50,10 +50,10 @@ const Lefttbottom = (props) => {
}}>
{beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""}
<div style={{ width: "20%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "3%", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{item.responsibleUnitForManagementAndMaintenance}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "23%" }}>{item.countyHighway||'/'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "40%" }}>{item.townshipRoad||'/'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "58%" }}>{item.villageRoad||'/'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "76%" }}>{item.bridge||'/'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "23%" }}>{item.countyHighway||'--'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "40%" }}>{item.townshipRoad||'--'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "58%" }}>{item.villageRoad||'--'}</div>
<div style={{ width: "15%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "76%" }}>{item.bridge||'--'}</div>
{/* {
num == index ? <div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "55%", marginTop: "0", top: "78%" }}>
<img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} />

56
web/client/src/sections/quanju/containers/footer/conserve/left/zhexin.js

@ -74,7 +74,28 @@ const ZheXian = (props) => {
color: "#fff",
},
},
formatter: "{a} <br/>{b}: {c}",
formatter: function (params, ticket, callback) {
var res = params[0].name;
for (var i = 0, l = params.length; i < l; i++) {
if (params[i].seriesType === "line") {
res +=
"<br/>" +
params[i].seriesName +
" : " +
(params[i].value ? params[i].value : "-") +
"元";
} else {
res +=
"<br/>" +
params[i].seriesName +
" : " +
(params[i].value ? params[i].value : "-") +
"km";
}
}
return res;
},
},
grid: {
borderWidth: 0,
@ -85,6 +106,7 @@ const ZheXian = (props) => {
textStyle: {
color: "#fff",
},
containLabel: true,
},
legend: {
x: "60%",
@ -144,11 +166,38 @@ const ZheXian = (props) => {
show: false,
},
},
{
type: "value",
min: 0,
position: "right",
splitLine: {
show: true,
lineStyle: {
color: "rgba(176,215,255,0.2500)",
type: "dashed",
},
},
axisLine: {
lineStyle: {
color: "rgba(216,240,255,0.800)",
},
},
axisTick: {
show: false,
},
axisLabel: {
interval: 0,
},
splitArea: {
show: false,
},
},
],
series: [
{
name: "",
name: "里程",
type: "bar",
barWidth: 20,
itemStyle: {
normal: {
@ -176,10 +225,11 @@ const ZheXian = (props) => {
data: columnar||[],
},
{
name: "",
name: "费用",
type: "line",
symbolSize: 10,
symbol: "circle",
yAxisIndex: 1,
itemStyle: {
normal: {
color: "#1978E5",

Loading…
Cancel
Save