|
@@ -57,6 +57,12 @@ export default {
|
|
},
|
|
},
|
|
setOptions({ date,gjzs, bfb} = {}) {
|
|
setOptions({ date,gjzs, bfb} = {}) {
|
|
this.chart.setOption({
|
|
this.chart.setOption({
|
|
|
|
+ tooltip: {
|
|
|
|
+ trigger: 'axis',
|
|
|
|
+ axisPointer: {
|
|
|
|
+ type: 'shadow'
|
|
|
|
+ },
|
|
|
|
+ },
|
|
grid: { x: 50, y: 25, x2: 30, y2: 35 },
|
|
grid: { x: 50, y: 25, x2: 30, y2: 35 },
|
|
xAxis: {
|
|
xAxis: {
|
|
data: date,
|
|
data: date,
|
|
@@ -86,24 +92,19 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
axisLabel: {
|
|
axisLabel: {
|
|
- color: '#999'
|
|
|
|
|
|
+ color: '#fff'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // dataZoom: [
|
|
|
|
- // {
|
|
|
|
- // type: 'inside'
|
|
|
|
- // }
|
|
|
|
- // ],
|
|
|
|
title: {
|
|
title: {
|
|
- text: '件',
|
|
|
|
- left: "20",
|
|
|
|
- top: '-5',
|
|
|
|
- textStyle: {
|
|
|
|
- color: "#FFFFFF",
|
|
|
|
- fontWeight: '400',
|
|
|
|
- fontSize: 12,
|
|
|
|
- lineHeight: 24, // 行高
|
|
|
|
- }
|
|
|
|
|
|
+ text: '件',
|
|
|
|
+ left: "20",
|
|
|
|
+ top: '-5',
|
|
|
|
+ textStyle: {
|
|
|
|
+ color: "#FFFFFF",
|
|
|
|
+ fontWeight: '400',
|
|
|
|
+ fontSize: 12,
|
|
|
|
+ lineHeight: 24, // 行高
|
|
|
|
+ }
|
|
},
|
|
},
|
|
legend: {
|
|
legend: {
|
|
itemHeight: 10,
|
|
itemHeight: 10,
|
|
@@ -118,8 +119,9 @@ export default {
|
|
{
|
|
{
|
|
name:'本月告警数',
|
|
name:'本月告警数',
|
|
type: 'bar',
|
|
type: 'bar',
|
|
- showBackground: true,
|
|
|
|
- barWidth:6,
|
|
|
|
|
|
+ showBackground: false,
|
|
|
|
+ barWidth:8,
|
|
|
|
+ barGap: 0.5, // 设置类目间距为20%的类目宽度
|
|
itemStyle: {
|
|
itemStyle: {
|
|
barBorderRadius:[3, 3, 0, 0],
|
|
barBorderRadius:[3, 3, 0, 0],
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
@@ -128,9 +130,9 @@ export default {
|
|
{ offset: 1, color: 'rgba(115,219,232,0.2)' }
|
|
{ offset: 1, color: 'rgba(115,219,232,0.2)' }
|
|
]),
|
|
]),
|
|
borderColor: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
borderColor: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
- { offset: 0.2, color: '#3A6DFF' },
|
|
|
|
- { offset: 0.5, color: 'rgba(0,240,255,0.45)' },
|
|
|
|
- { offset: 1, color: 'rgba(115,219,232,0.2)' }
|
|
|
|
|
|
+ { offset: 0.2, color: '#56687C' },
|
|
|
|
+ { offset: 0.5, color: '#56687C' },
|
|
|
|
+ { offset: 1, color: '#56687C' }
|
|
])
|
|
])
|
|
},
|
|
},
|
|
// emphasis: {
|
|
// emphasis: {
|
|
@@ -147,26 +149,31 @@ export default {
|
|
{
|
|
{
|
|
name:'上月告警数',
|
|
name:'上月告警数',
|
|
type: 'bar',
|
|
type: 'bar',
|
|
- showBackground: true,
|
|
|
|
- barWidth:6,
|
|
|
|
-
|
|
|
|
|
|
+ showBackground: false,
|
|
|
|
+ barWidth:8,
|
|
|
|
+ barGap: 0.5, // 设置类目间距为20%的类目宽度
|
|
itemStyle: {
|
|
itemStyle: {
|
|
barBorderRadius:[3,3, 0, 0],
|
|
barBorderRadius:[3,3, 0, 0],
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
{ offset: 0.2, color: '#FFFC00' },
|
|
{ offset: 0.2, color: '#FFFC00' },
|
|
{ offset: 0.5, color: 'rgba(255,126,0,0.45)' },
|
|
{ offset: 0.5, color: 'rgba(255,126,0,0.45)' },
|
|
{ offset: 1, color: 'rgba(232,181,115,0.2)' }
|
|
{ offset: 1, color: 'rgba(232,181,115,0.2)' }
|
|
- ])
|
|
|
|
- },
|
|
|
|
- emphasis: {
|
|
|
|
- itemStyle: {barBorderRadius:[3, 3, 0, 0],
|
|
|
|
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
|
- { offset: 0.2, color: '#FFFC00' },
|
|
|
|
- { offset: 0.5, color: 'rgba(255,126,0,0.45)' },
|
|
|
|
- { offset: 1, color: 'rgba(232,181,115,0.2)' }
|
|
|
|
- ])
|
|
|
|
- }
|
|
|
|
|
|
+ ]),
|
|
|
|
+ borderColor: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
|
+ { offset: 0.2, color: '#56687C' },
|
|
|
|
+ { offset: 0.5, color: '#56687C' },
|
|
|
|
+ { offset: 1, color: '#56687C' }
|
|
|
|
+ ])
|
|
},
|
|
},
|
|
|
|
+ // emphasis: {
|
|
|
|
+ // itemStyle: {barBorderRadius:[3, 3, 0, 0],
|
|
|
|
+ // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
|
+ // { offset: 0.2, color: '#56687C' },
|
|
|
|
+ // { offset: 0.5, color: '#56687C' },
|
|
|
|
+ // { offset: 1, color: '#56687C' }
|
|
|
|
+ // ])
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
data: bfb
|
|
data: bfb
|
|
}
|
|
}
|
|
]
|
|
]
|