|
|
|
|
@ -1157,7 +1157,8 @@ const lineChartTwo = function (data, id, unit = '') {
|
|
|
|
|
},
|
|
|
|
|
textStyle: {
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
color: () => {},
|
|
|
|
|
color: () => {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
@ -1674,6 +1675,36 @@ const verticalBarChart = function (data, id, unit = '次') {
|
|
|
|
|
// 多个垂直柱状图
|
|
|
|
|
const multipleVerticalBarChart1 = function (data, id) {
|
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
|
let num1 = data.yDataOne.slice(0,4)
|
|
|
|
|
let num2 = data.yDataTwo.slice(0,4)
|
|
|
|
|
let num3 = data.yDataThree.slice(0,4)
|
|
|
|
|
num1 = num1.map(e => {
|
|
|
|
|
if (e > 14) {
|
|
|
|
|
return 14
|
|
|
|
|
} else if (e < 10) {
|
|
|
|
|
return 10
|
|
|
|
|
} else {
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
num2 = num2.map(e => {
|
|
|
|
|
if (e > 14) {
|
|
|
|
|
return 14
|
|
|
|
|
} else if (e < 10) {
|
|
|
|
|
return 10
|
|
|
|
|
} else {
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
num3 = num3.map(e => {
|
|
|
|
|
if (e > 14) {
|
|
|
|
|
return 14
|
|
|
|
|
} else if (e < 10) {
|
|
|
|
|
return 10
|
|
|
|
|
} else {
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (!data) {
|
|
|
|
|
data = {
|
|
|
|
|
xName: [
|
|
|
|
|
@ -1703,20 +1734,6 @@ const multipleVerticalBarChart1 = function (data, id) {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// trigger: "axis",
|
|
|
|
|
// formatter: `{b}<br />{a0}: {c0}<br />{a1}: {c1}`,
|
|
|
|
|
// axisPointer: {
|
|
|
|
|
// type: "shadow",
|
|
|
|
|
// label: {
|
|
|
|
|
// backgroundColor: "#6a7985",
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// textStyle: {
|
|
|
|
|
// color: "#fff",
|
|
|
|
|
// fontStyle: "normal",
|
|
|
|
|
// fontFamily: "微软雅黑",
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
// },
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
|
|
|
|
left: "1%",
|
|
|
|
|
@ -1745,7 +1762,7 @@ const multipleVerticalBarChart1 = function (data, id) {
|
|
|
|
|
{
|
|
|
|
|
type: "category",
|
|
|
|
|
boundaryGap: true, //坐标轴两边留白
|
|
|
|
|
data: data.xName,
|
|
|
|
|
data: ['A1', 'A2', 'A3', 'A4'],
|
|
|
|
|
axisLabel: {
|
|
|
|
|
show: true,
|
|
|
|
|
color: '#fff'
|
|
|
|
|
|