| | |
| | | ...item, |
| | | lastSceneCount: last?.sceneCount || 0, |
| | | lastProblemCount: last?.problemCount || 0, |
| | | lastRatio: Math.round(item.ratio * 10) / 10 || 0 |
| | | lastRatio: Math.round((last?.ratio || 0) * 10) / 10 || 0 |
| | | }; |
| | | }); |
| | | }); |
| | |
| | | const month2 = dayjs(opt2.startTime).month() + 1; |
| | | const time = `${year}年${month1}月、${month2}月`; |
| | | const option = barChartOption(); |
| | | option.title.text = `${time}各街道(镇)${opt1.sceneTypeName}扬尘污染问题数均值对比`; |
| | | option.title.text = `${time}${opt1.districtName}各街道(镇)${opt1.sceneTypeName}扬尘污染问题数均值对比`; |
| | | |
| | | option.xAxis.name = '街道(镇)'; |
| | | option.xAxis.data = tableData.value.map((item) => item.townName); |
| | |
| | | { |
| | | name: `${month1}月`, |
| | | type: 'bar', // 图表类型改为柱状图 |
| | | data: tableData1.value.map((item) => item.ratio), |
| | | data: tableData.value.map((item) => item.ratio), |
| | | label: { |
| | | show: true, |
| | | position: 'top', // 标签显示在柱子顶部 |
| | |
| | | { |
| | | name: `${month2}月`, |
| | | type: 'bar', // 图表类型改为柱状图 |
| | | data: tableData1.value.map((item) => item.ratio), |
| | | data: tableData.value.map((item) => item.lastRatio), |
| | | label: { |
| | | show: true, |
| | | position: 'top', // 标签显示在柱子顶部 |