Commit 950baf62 authored by 张俊's avatar 张俊

环图样式

parent 3ee34dd7
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
methods: { methods: {
init_health(num, color, text) { init_health(num, color, text) {
var options = { var options = {
color:[color,'#c9cedd'],
title: { title: {
text: num + "%", text: num + "%",
textStyle: { textStyle: {
...@@ -96,47 +97,78 @@ export default { ...@@ -96,47 +97,78 @@ export default {
}, },
series: [ series: [
{ {
type: "bar", type: 'pie',
silent: true, z:5,
data: [ center:['50%','50%'],
{ radius:['68%','72%'],
name: "作文得分", silent:true,
value: num, label: {
itemStyle: {
normal: { normal: {
color: color, show: false
shadowColor: "rgba(0, 0, 0, 0.2)", },
shadowBlur: 20 emphasis: {
} show: false
} }
},
labelLine: {
normal: {
show: false
},
emphasis: {
show: false
} }
], },
coordinateSystem: "polar", tooltip: {
roundCap: true, show: false
barWidth: 8, },
barGap: "-100%", // 两环重叠 data:[{
name:'',
z: 2 value:num
},{
name:'',
value:100 - num
}]
}, },
{ {
// 灰色环 type:'pie',
type: "bar", z:4,
silent: true, center:['50%','50%'],
data: [ radius:['60%','80%'],
{ hoverAnimation:false,
value: 100, avoidLabelOverlap: false,
label: {
normal: {
show: false
},
emphasis: {
show: false
}
},
labelLine: {
normal: {
show: false
},
emphasis: {
show: false
}
},
tooltip: {
show: false
},
itemStyle: { itemStyle: {
color: "#c9cedd", normal: {
shadowColor: "rgba(0, 0, 0, 0.2)", color:'#f6f7fc'
shadowBlur: 20
} }
},
emphasis:{
show:false,
itemStyle:{
color:'#f6f7fc'
} }
], },
coordinateSystem: "polar", data: [{
roundCap: true, value: 1,
barWidth: 8, }],
barGap: "-100%", // 两环重叠
z: 1
} }
] ]
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment