|
|
|
@ -146,9 +146,10 @@ const horizontalRoundedBarChartWithBackgroundTwo = function (data, id) {
|
|
|
|
yNameOne: ["设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001"],
|
|
|
|
yNameOne: ["设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001", "设备000000001"],
|
|
|
|
yData: [41, 99, 32, 41, 24, 4, 16, 64, 18],
|
|
|
|
yData: [41, 99, 32, 41, 24, 4, 16, 64, 18],
|
|
|
|
xDataName: "达成率",
|
|
|
|
xDataName: "达成率",
|
|
|
|
|
|
|
|
status:[1,1,1,1,1,1,1,1,1]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let myColor = ["#1089E7", "#F57474", "#56D0E3", "#F8B448", "#8B78F6"];
|
|
|
|
let myColor = ["green", "red", "yellow", "blue", "#8B78F6"];
|
|
|
|
let bgBar = []
|
|
|
|
let bgBar = []
|
|
|
|
data.yData.forEach(() => {
|
|
|
|
data.yData.forEach(() => {
|
|
|
|
bgBar.push(100)
|
|
|
|
bgBar.push(100)
|
|
|
|
@ -201,8 +202,8 @@ const horizontalRoundedBarChartWithBackgroundTwo = function (data, id) {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
barBorderRadius: 30,
|
|
|
|
barBorderRadius: 30,
|
|
|
|
color: function (params) {
|
|
|
|
color: function (params) {
|
|
|
|
var num = myColor.length;
|
|
|
|
console.log(data.status[params.dataIndex])
|
|
|
|
return myColor[params.dataIndex % num];
|
|
|
|
return myColor[data.status[params.dataIndex]];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -1706,6 +1707,18 @@ const singleVerticalBarChartTwo = function (data, id) {
|
|
|
|
type: 'bar',
|
|
|
|
type: 'bar',
|
|
|
|
barMaxWidth: 'auto',
|
|
|
|
barMaxWidth: 'auto',
|
|
|
|
barWidth: 1.5 * vw,
|
|
|
|
barWidth: 1.5 * vw,
|
|
|
|
|
|
|
|
label:{
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
position: "top",
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
color: "#a8aab0",
|
|
|
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
data: data.yData,
|
|
|
|
data: data.yData,
|
|
|
|
@ -1741,7 +1754,7 @@ const singleVerticalBarChartTwo = function (data, id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
value: val,
|
|
|
|
value: val,
|
|
|
|
symbolPosition: 'end',
|
|
|
|
symbolPosition: 'end',
|
|
|
|
symbolOffset: [0, '-120%']
|
|
|
|
symbolOffset: [0, '-190%']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -2147,6 +2160,7 @@ const hollowPieChart = function (data, id) {
|
|
|
|
// 多个环形图
|
|
|
|
// 多个环形图
|
|
|
|
const percentageRingDiagram = function (data, id) {
|
|
|
|
const percentageRingDiagram = function (data, id) {
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
|
|
|
|
console.log(data)
|
|
|
|
data ??= [
|
|
|
|
data ??= [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: "内胆检漏",
|
|
|
|
name: "内胆检漏",
|
|
|
|
|