...
|
...
|
@@ -33,6 +33,19 @@ export default { |
|
|
window.removeEventListener('resize', this.screenAdapter)
|
|
|
clearInterval(this.timerId)
|
|
|
},
|
|
|
computed: {
|
|
|
comtitleTextStyle () {
|
|
|
return {
|
|
|
fontSize: this.titleFontSize / 2 + 'px'
|
|
|
}
|
|
|
},
|
|
|
comtitleImgStyle () {
|
|
|
return {
|
|
|
height: this.titleFontSize * 1.2 + 'px',
|
|
|
width: this.titleFontSize * 8 + 'px'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
initChart () {
|
|
|
this.chartInstance = echarts.init(document.getElementById('availability_ref'))
|
...
|
...
|
@@ -97,10 +110,10 @@ export default { |
|
|
const title = this.allData.polyline.title
|
|
|
const unit = this.allData.polyline.unit
|
|
|
const dataOption = {
|
|
|
title: {
|
|
|
text: '{Sunny| 业务可用性 }',
|
|
|
show: true
|
|
|
},
|
|
|
// title: {
|
|
|
// text: '{Sunny| 业务可用性 }',
|
|
|
// show: true
|
|
|
// },
|
|
|
xAxis: {
|
|
|
data: timeArr
|
|
|
},
|
...
|
...
|
@@ -138,23 +151,23 @@ export default { |
|
|
screenAdapter () {
|
|
|
this.titleFontSize = document.getElementById('availability_ref').offsetWidth / 100 * 3.6
|
|
|
const adapterOption = {
|
|
|
title: {
|
|
|
left: this.titleFontSize * 2,
|
|
|
textStyle: {
|
|
|
fontSize: this.titleFontSize,
|
|
|
color: '#F0F3F8'
|
|
|
// rich: {
|
|
|
// Sunny: {
|
|
|
// // 这样设定 backgroundColor 就可以是图片了。
|
|
|
// backgroundColor: {
|
|
|
// image: require('../assets/img/bg_box_3.png')
|
|
|
// },
|
|
|
// // 可以只指定图片的高度,从而图片的宽度根据图片的长宽比自动得到。
|
|
|
// height: this.titleFontSize * 1.5
|
|
|
// }
|
|
|
// }
|
|
|
}
|
|
|
},
|
|
|
// title: {
|
|
|
// left: this.titleFontSize * 2,
|
|
|
// textStyle: {
|
|
|
// fontSize: this.titleFontSize,
|
|
|
// color: '#F0F3F8'
|
|
|
// // rich: {
|
|
|
// // Sunny: {
|
|
|
// // // 这样设定 backgroundColor 就可以是图片了。
|
|
|
// // backgroundColor: {
|
|
|
// // image: require('../assets/img/bg_box_3.png')
|
|
|
// // },
|
|
|
// // // 可以只指定图片的高度,从而图片的宽度根据图片的长宽比自动得到。
|
|
|
// // height: this.titleFontSize * 1.5
|
|
|
// // }
|
|
|
// // }
|
|
|
// }
|
|
|
// },
|
|
|
legend: {
|
|
|
itemWidth: this.titleFontSize,
|
|
|
itemHeight: this.titleFontSize,
|
...
|
...
|
|