Merge remote-tracking branch 'gitee/master'

master
wangh 4 years ago
commit 7e2c21bbd2

@ -1,6 +1,8 @@
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
let time1 =() =>{}
let time2 =() =>{}
let time1 = () => {
}
let time2 = () => {
}
// 随机数
const random = (val = 1) => {
return Math.ceil(Math.random() * val)
@ -202,7 +204,6 @@ const horizontalRoundedBarChartWithBackgroundTwo = function (data, id) {
normal: {
barBorderRadius: 30,
color: function (params) {
console.log(data.status[params.dataIndex])
return myColor[data.status[params.dataIndex]];
},
},
@ -1543,7 +1544,7 @@ const singleVerticalBarChart = function (data, id, rotate = 0,bottom='15%') {
},
axisLabel: {
color: "#fff",
fontSize: 14,
fontSize: 0.5 * vw,
interval: 0,
rotate: rotate,
},
@ -1623,6 +1624,7 @@ const singleVerticalBarChartTwo = function (data, id) {
yImg: ['', '', '', '', '', '', '', ''],
}
}
let bottom = data.yData.map(val => 1)
let option = {
backgroundColor: 'rgba(0,0,0,0)',
color: ['#33a2fe', '#33a2fe', '#33a2fe', '#33a2fe', '#33a2fe'],
@ -1707,6 +1709,18 @@ const singleVerticalBarChartTwo = function (data, id) {
type: 'bar',
barMaxWidth: 'auto',
barWidth: 1.5 * vw,
itemStyle: {
color: function (val) {
if (data.yData.length - val.dataIndex === 1) {
return 'red'
} else if (data.yData.length - val.dataIndex === 2) {
return 'yellow'
} else {
return '#35AAFE'
}
}
},
label: {
normal: {
show: true,
@ -1726,18 +1740,42 @@ const singleVerticalBarChartTwo = function (data, id) {
barMaxWidth: vw,
symbolPosition: 'end',
symbol: 'diamond',
color: '#66c8ff',
itemStyle: {
color: function (val) {
console.log(val)
if (data.yData.length - val.dataIndex === 1) {
return 'red'
} else if (data.yData.length - val.dataIndex === 2) {
return 'yellow'
} else {
return '#66c8ff'
}
}
},
symbolOffset: ['25%', '-50%'],
symbolSize: [1.5 * vw, 10],
zlevel: 4,
},
{
data: [1, 1, 1, 1, 1, 1, 1, 1],
data: bottom,
type: 'pictorialBar',
barMaxWidth: vw,
symbolPosition: 'end',
symbol: 'diamond',
color: '#66c8ff',
itemStyle: {
color: function (val) {
console.log(val)
if (data.yData.length - val.dataIndex === 1) {
return 'red'
} else if (data.yData.length - val.dataIndex === 2) {
return 'yellow'
} else {
return '#66c8ff'
}
}
},
symbolOffset: ['25%', '-20%'],
symbolSize: [1.5 * vw, 10],
zlevel: 4,

Loading…
Cancel
Save