diff --git a/web/client/src/sections/quanju/containers/footer/conserve/chart/pie-chart.js b/web/client/src/sections/quanju/containers/footer/conserve/chart/pie-chart.js index 75ec1b77..6c9e7766 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/chart/pie-chart.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/chart/pie-chart.js @@ -4,7 +4,7 @@ import * as echarts from 'echarts'; const PieChart = (props) => { - const { width, height, data, colorList, underColorList, total, text } = props + const { width, height, data, colorList, underColorList, total, text, textLeft,numLeft } = props const chartRef = useRef(null); let name = [], emptyName = [] // const name = data?.map(d) @@ -43,13 +43,13 @@ const PieChart = (props) => { a: { color: '#E9F7FF', fontSize: 14, - padding:[0,2] + padding: [0, 2] }, b: { fontSize: 16, fontFamily: 'YouSheBiaoTiHei', color: '#fff', - padding:[0,0,0,10] + padding: [0, 0, 0, 10] }, } } @@ -57,40 +57,17 @@ const PieChart = (props) => { grid: { left: '10%' }, - // title: [ - // { - // text: text, - // top: "58%", - // left: '16%', - // textStyle: { - // color: "#E9F7FF", - // fontSize: 14, - // }, - // }, - // { - // text: total, - // top: "40%", - // left: '10%', - // textStyle: { - // fontSize: "30", - // color: "#FFFFFF", - // fontFamily: "YouSheBiaoTiHei", - // }, - // }, - // ], graphic: { elements: [ { type: 'image', style: { image: 'assets/images/quanju/chart-circle.png', - width: 120, - height: 120, + width: 110, + height: 110, align: 'center', - // x:90, - // y:100 }, - left: '14%', + left: '12.8%', top: 'center', bounding: 'raw' @@ -104,8 +81,8 @@ const PieChart = (props) => { fill: '#fff', font: '12px "YouSheBiaoTiHei", sans-serif', }, - left: '17%', - top: '55%', + left: textLeft, + top: '58%', }, { type: 'text', @@ -115,7 +92,7 @@ const PieChart = (props) => { fill: '#fff', font: '20px "YouSheBiaoTiHei", sans-serif', }, - left: '18.5%', + left: numLeft, top: 'center', }, ], @@ -142,7 +119,7 @@ const PieChart = (props) => { data: emptyName, }, { - name: "已绿化里程统计", + name: text, type: "pie", radius: ["65%", "75%"], center: ['25%', '50%'], diff --git a/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js b/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js index 37394a3a..73b69818 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js @@ -36,6 +36,8 @@ const LeftBottom = (props) => { text='已绿化里程' total={totalData?.toFixed(3) || 0} colorList={colorList} + textLeft={'20%'} + numLeft={'16%'} underColorList={underColorList} /> diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js index 919bcdc0..739517cc 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js @@ -56,6 +56,8 @@ const RightBottom = (props) => { width='100%' height='100%' text='养护总数' + textLeft={'21%'} + numLeft={'23%'} total={totalData || 0} colorList={colorList} underColorList={underColorList}