修改样式

master
夜笙歌 2 years ago
parent 0d8a616494
commit 8d6e221fcd

@ -1174,24 +1174,22 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
const xValue = res.map(val => val.materialName) const xValue = res.map(val => val.materialName)
const lineStoreAmount = res.map(val => val.lineStoreAmount) const lineStoreAmount = res.map(val => val.lineStoreAmount)
const hullStoreAmount = res.map(val => val.hullStoreAmount) const hullStoreAmount = res.map(val => val.hullStoreAmount)
hullStoreAmount.forEach((val, index) => {
if (val == 0) {
console.log(val)
hullStoreAmount[index] = 1
}
})
lineStoreAmount.forEach((val, index) => {
if (val == 0) {
console.log(val)
lineStoreAmount[index] = 1
}
})
let lineColor = "#406A92"; let lineColor = "#406A92";
let labelColor = "#fff"; let labelColor = "#fff";
let fontSize = "12"; let fontSize = "12";
let lineWidth = 1; let lineWidth = 1;
let isDataZoom = xValue.length > 3 let isDataZoom = xValue.length > 3
let stepSize = 20 let stepSize = 20
// hullStoreAmount.forEach((val, index) => {
// if (val == 0) {
// hullStoreAmount[index] = 0
// }
// })
// lineStoreAmount.forEach((val, index) => {
// if (val == 0) {
// lineStoreAmount[index] = 0
// }
// })
let option = { let option = {
grid: { grid: {
left: "0%", left: "0%",
@ -1318,46 +1316,59 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
color: "#26B2E8", color: "#26B2E8",
data: hullStoreAmount, data: hullStoreAmount,
}, },
{ // {
// 左侧下内圈 // // 左侧下内圈
name: "", // name: "",
type: "pictorialBar", // type: "pictorialBar",
tooltip: { // tooltip: {
show: false, // show: false,
}, // },
symbolSize: [37, 20], // symbolSize: function (val) {
symbolOffset: [-39, 20], // if (val == 0) {
z: 10, // return [0, 0]
itemStyle: { // }else{
normal: { // return [37, 20]
color: "transparent", // }
borderColor: "#2EA9E5", // },
borderType: "solid", // symbolOffset: [-39, 20],
borderWidth: 20, // z: 10,
}, // itemStyle: {
}, // normal: {
data: hullStoreAmount, // color: "transparent",
}, // borderColor: "#2EA9E5",
{ // borderType: "solid",
// 左侧下外圈 // borderWidth: 20,
name: "", // },
type: "pictorialBar", // },
tooltip: { //
show: false, // data: hullStoreAmount,
}, // },
symbolSize: [50, 25], // {
symbolOffset: [-39, 25], // // 左侧下外圈
z: 10, // name: "",
itemStyle: { // type: "pictorialBar",
normal: { // tooltip: {
color: "transparent", // show: false,
borderColor: "#26B2E8", // },
borderType: "solid", // symbolSize: function (val) {
borderWidth: 20, // if (val == 0) {
}, // return [0, 0]
}, // }else{
data: hullStoreAmount, // return [50, 25]
}, // }
// },
// symbolOffset: [-39, 25],
// z: 10,
// itemStyle: {
// normal: {
// color: "transparent",
// borderColor: "#26B2E8",
// borderType: "solid",
// borderWidth: 20,
// },
// },
// data: hullStoreAmount,
// },
{ {
// 左侧下圆片 // 左侧下圆片
name: "", name: "",
@ -1418,46 +1429,54 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
color: "#20D3AB", color: "#20D3AB",
data: lineStoreAmount, data: lineStoreAmount,
}, },
{ // {
// 右柱下内圈 // // 右柱下内圈
name: "", // name: "",
type: "pictorialBar", // type: "pictorialBar",
tooltip: { // tooltip: {
show: false, // show: false,
}, // },
symbolSize: [37, 20], // symbolPosition:'start',
symbolOffset: [39, 20], // symbolSize: function (val,data) {
z: 10, // console.log(val)
itemStyle: { // if (!lineStoreAmount[data.dataIndex] > 0) return [0, 0]
normal: { // return [37, 20]
color: "transparent", // },
borderColor: "#20D3AB", // symbolOffset: [39, 20],
borderType: "solid", // z: 10,
borderWidth: 20, // itemStyle: {
}, // normal: {
}, // color: "transparent",
data: hullStoreAmount, // borderColor: "#20D3AB",
}, // borderType: "solid",
{ // borderWidth: 20,
// 右柱下外圈 // },
name: "", // },
type: "pictorialBar", // data: hullStoreAmount,
tooltip: { // },
show: false, // {
}, // // 右柱下外圈
symbolSize: [50, 25], // name: "",
symbolOffset: [39, 25], // type: "pictorialBar",
z: 10, // tooltip: {
itemStyle: { // show: false,
normal: { // },
color: "transparent", // symbolSize: function (val,data) {
borderColor: "#20D3AB", // if (!lineStoreAmount[data.dataIndex] > 0) return [0, 0]
borderType: "solid", // return [50, 25]
borderWidth: 20, // },
}, // symbolOffset: [39, 25],
}, // z: 10,
data: hullStoreAmount, // itemStyle: {
}, // normal: {
// color: "transparent",
// borderColor: "#20D3AB",
// borderType: "solid",
// borderWidth: 20,
// },
// },
// data: hullStoreAmount,
// },
{ {
// 右柱下圆片 // 右柱下圆片
name: "", name: "",
@ -1507,9 +1526,7 @@ const multipleThreeDimensionalCylindrical = (res, ids) => {
option.grid.bottom = '20%' option.grid.bottom = '20%'
} }
const aaa = () => { const aaa = () => {
console.log('aaa')
setInterval(() => { setInterval(() => {
console.log(option.dataZoom)
option.dataZoom[0].start += stepSize option.dataZoom[0].start += stepSize
option.dataZoom[0].start = option.dataZoom[0].start % 100 option.dataZoom[0].start = option.dataZoom[0].start % 100
option.dataZoom[0].end = option.dataZoom[0].start + stepSize option.dataZoom[0].end = option.dataZoom[0].start + stepSize
@ -2396,7 +2413,7 @@ const energyConsumption = (res, ids) => {
itemStyle: { itemStyle: {
normal: { normal: {
color: function (params) { color: function (params) {
return 'rgb(217,217,217)'; return 'rgba(40,140,210)';
}, },
}, },
}, },
@ -2404,7 +2421,7 @@ const energyConsumption = (res, ids) => {
show: true, show: true,
position: "top", position: "top",
textStyle: { textStyle: {
color: "#02C3F1", color: "#c502f1",
}, },
}, },
symbolPosition: "end", symbolPosition: "end",

@ -72,7 +72,7 @@ $(() => {
type: 'value', type: 'value',
name: '温度', name: '温度',
min: 0, min: 0,
max: 50, // max: 50,
interval: 10, interval: 10,
axisLabel: { axisLabel: {
formatter: '{value} °C ' formatter: '{value} °C '

Loading…
Cancel
Save