Browse Source

修改居民概览中间显示总数

feature
战立标 2 years ago
parent
commit
3430498bfb
  1. 33
      src/views/dataBoard/renfang/cpts/jmPieOption.js
  2. 5
      src/views/dataBoard/renfang/cpts/jmgl.vue

33
src/views/dataBoard/renfang/cpts/jmPieOption.js

@ -4,24 +4,21 @@ export function pieOption() {
const center = ["50%", "170px"];
return {
color: ["#1A95FF", "#FFAA00", "#04C790"],
/* title: {
text: "0",
top: 45,
left: "center",
title: {
text: "",
subtext: '总数',
left: '45%',
top: '35%',
textAlign :'center',
textStyle: {
width: "100%",
fontSize: 24,
color: "#FFFFFF",
fontWeight: 400,
color: '#7FCEFF',
fontSize: 18,
},
itemGap: 5,
// subtext: "总数",
// subtextStyle: {
// fontSize: 20,
// color: "#fff",
// fontWeight: 400,
// },
},*/
subtextStyle: {
fontSize: 12,
color: '#A3B9DA'
},
},
tooltip: {
show: false,
},
@ -47,7 +44,7 @@ export function pieOption() {
show: false
},
data: [],
label: {
/* label: {
show: false,
position: 'center',
formatter: data => {
@ -75,7 +72,7 @@ export function pieOption() {
fontSize: '14',
fontWeight: 'normal'
}
},
},*/
/* label: {
show: false,
position: 'center'

5
src/views/dataBoard/renfang/cpts/jmgl.vue

@ -180,6 +180,7 @@ export default {
this.pieOption = pieOption();
const {pandectData} = this;
console.log(pandectData)
this.pieOption.title.text = pandectData.totalResidents;
this.pieData = [
{value: pandectData.permanentResiCount, name: "常住人口"},
{value: pandectData.floatingResiCount, name: "流动人口"},
@ -187,7 +188,7 @@ export default {
this.pieOption.series[0].data = this.pieData;
this.$refs.pieChart.setOption(this.pieOption);
this.$refs.pieChart.myChart.setOption(this.pieOption);
this.$refs.pieChart.myChart.on('mouseover', (params) => {
/*this.$refs.pieChart.myChart.on('mouseover', (params) => {
var oldIndex = currentIndex;
var currentIndex = params.dataIndex;
this.highlightPie(currentIndex, oldIndex);
@ -195,7 +196,7 @@ export default {
setTimeout(() => {
this.highlightPie(0, 1);
}, 50)
}, 50)*/
},
highlightPie(currentIndex, oldIndex) {
this.$refs.pieChart.myChart.dispatchAction({

Loading…
Cancel
Save