Authored by 王涛

Merge branch 'master-v32-lushangqing' into 'master'

电子税务局 业务量环形图样式更改,



See merge request !70
... ... @@ -13,13 +13,13 @@
}
.busniess-circle-left {
position: absolute;
left: 19%;
top: 59%;
left: 18%;
top: 38%;
}
.busniess-circle-right {
position: absolute;
left: 63%;
top: 59%;
left: 62%;
top: 38%;
}
.busniess-circle-text {
text-align: center;
... ...
... ... @@ -57,13 +57,13 @@ export default {
// this.chartInstance = this.$echarts.init(this.$refs.volume_ref, 'macarons')
this.chartInstance = echarts.init(document.getElementById('volume_ref'))
const initOption = {
legend: {
/*legend: {
top: '20%',
left: 'center',
textStyle: {
color: '#ffffff'
}
}
}*/
}
this.chartInstance.setOption(initOption)
},
... ... @@ -128,8 +128,8 @@ export default {
},
updateChart () {
const centerArr = [
['22%', '65%'],
['66%', '65%']
['22%', '43%'],
['66%', '43%']
]
... ... @@ -162,7 +162,7 @@ export default {
return {
type: 'pie',
radius: ['20%', '50%'],
radius: ['28%', '42%'],
center: centerArr[index],
color:colorData,
// minAngle: 15,//最小角度
... ... @@ -171,20 +171,80 @@ export default {
borderRadius: 2,
borderWidth: 2
},
top:0,
left:0,
right:0,
label: {
// position: 'outer',
// alignTo: 'labelLine',
show:false,
formatter: '{c}个',
// padding:[10,-20,5,10],
position: 'inside',
position: 'center',
color:'#ffffff'
},
labelLine: {
show: false
},
data: dataArr
}
})
const dataOption = {
legend:[
{
left: '8%',
bottom:'5%',
itemHeight:12,
itemWidth:12,
itemGap:20,
icon:'circle',
orient: "vertical",
textStyle: {
color: '#ffffff',
fontSize:12,
},
formatter:function(name){
let data=dataOption.series[0].data;
let tarValue=0;
data.map((item,index)=>{
if(item.name==name){
tarValue=item.value
}
})
let valStr=tarValue.toString()
let reg = valStr.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g;
let valData=valStr.replace(reg,"$1,");
return name+' '+' '+valData+' 个';
}
},
{
left: '53%',
bottom:'5%',
itemHeight:12,
itemWidth:12,
itemGap:20,
icon:'circle',
orient: "vertical",
textStyle: {
color: '#ffffff',
fontSize:12,
},
formatter:function(name){
let data=dataOption.series[0].data;
let tarValue=0;
data.map((item,index)=>{
if(item.name==name){
tarValue=item.value
}
})
let valStr=tarValue.toString()
let reg = valStr.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g;
let valData=valStr.replace(reg,"$1,");
return name+' '+' '+valData+' 个';
}
}
],
tooltip: {
trigger: 'item',
backgroundColor:'rgba(50,50,50,0.7)',
... ... @@ -240,14 +300,14 @@ export default {
// }
// }
// },
legend: {
/*legend: {
itemWidth: this.titleFontSize * 1.5,
itemHeight: this.titleFontSize / 4,
itemGap: this.titleFontSize * 2.5,
textStyle: {
fontSize: this.titleFontSize / 1.3
}
}
}*/
}
this.chartInstance.setOption(adapterOption)
this.chartInstance.resize()
... ...