Browse Source

echarts修改

master
yzj 3 years ago
parent
commit
ca0b0a9aa8
  1. 55
      src/views/dashboard/DuidieChart.vue

55
src/views/dashboard/DuidieChart.vue

@ -1,7 +1,5 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}" <div :class="className" :style="{height:height,width:width}"/>
/>
</template> </template>
@ -67,7 +65,6 @@ export default {
initChart() { initChart() {
let max=10; let max=10;
let intervala=2; let intervala=2;
if (this.ddSerData!=undefined&&this.ddSerData.length>0){ if (this.ddSerData!=undefined&&this.ddSerData.length>0){
let arr1=this.ddSerData[0].data; let arr1=this.ddSerData[0].data;
let arr2=this.ddSerData[1].data; let arr2=this.ddSerData[1].data;
@ -104,10 +101,10 @@ export default {
x:'center', x:'center',
y: 'bottom', y: 'bottom',
textStyle: { textStyle: {
fontSize: 24, fontSize: 22,
fontFamily: "Arial", fontFamily: "Arial",
lineHeight: 30, lineHeight: 30,
color: "rgb(43,97,159)", color: "#116bcc",
fontWeight:"bold" fontWeight:"bold"
}, },
}, },
@ -127,22 +124,20 @@ export default {
}, },
xAxis: { xAxis: {
data:this.ddXData, data:this.ddXData,
// data: ['2016','2017','2018','2019','2020','2021'], axisLabel: {//x
// name: 'X Axis', show: true,
// axisLine: {onZero: true},
// splitLine: {show: false},
// splitArea: {show: false}
axisLabel: {
textStyle: { textStyle: {
fontSize:'16', color: "#a4a4a4",
},
} fontSize:'14px'
}, },
axisLine: { axisLine: {//x线
lineStyle: { show: true,
color: "rgb(164, 164, 164)" lineStyle: {
} color: "#eff2f8",
width: 0,
type: "solid"
}
}, },
}, },
yAxis: { yAxis: {
@ -150,26 +145,28 @@ export default {
max: max, max: max,
interval: intervala, interval: intervala,
axisLabel: { axisLabel: {
fontSize:14,
textStyle: { textStyle: {
fontSize:'16', color: "#a4a4a4",
},
} },
},
nameTextStyle: { nameTextStyle: {
color: 'rgb(102,102,102)' color: 'rgb(102,102,102)'
}, },
axisLine: { axisLine: {//y线
show: true,
lineStyle: { lineStyle: {
color: "rgb(164, 164, 164)" color: "#eff2f8",
} width: 0,
type: "solid"
},
}, },
}, },
grid: { grid: {
left: 10, left: 10,
right: 10, right: 10,
bottom: 50, bottom: 50,
top: 90, top: 107,
containLabel: true containLabel: true
}, },

Loading…
Cancel
Save