diff --git a/src/views/hotWater/profitAnalysis/index.vue b/src/views/hotWater/profitAnalysis/index.vue index 0e11306..abf6d88 100644 --- a/src/views/hotWater/profitAnalysis/index.vue +++ b/src/views/hotWater/profitAnalysis/index.vue @@ -702,7 +702,7 @@ export default { // 初始化收益趋势折线图 initTrendChart() { this.trendChart = echarts.init(this.$refs.trendChart_ref); - + const titleFontSize = this.$refs.trendChart_ref.offsetWidth / 50; const dates = this.chartData.map(item => item.curDate).reverse(); const incomeData = this.chartData.map(item => item.totalIncome).reverse(); @@ -717,8 +717,9 @@ export default { show: false, }, grid: { + // top: "15%", left: "3%", - right: "5%", + right: "10%", bottom: "3%", containLabel: true }, @@ -797,6 +798,45 @@ export default { { offset: 1, color: "rgba(16, 185, 129, 0.1)" } ] } + }, + markPoint: { + data: [ + { + type: 'max', + name: '最大值', + symbol: 'arrow', + symbolRotate: 180, + label: { + formatter: function (params) { + return params.value + '元'; + } + } + }, + { + type: 'min', + name: '最小值', + symbol: 'arrow', + symbolRotate: 180, + label: { + formatter: function (params) { + return params.value + '元'; + } + } + } + ], + label: { + fontSize: 14, + color: "#10b981", + fontWeight: 'bold', + padding: [4, 8], + borderRadius: 4, + backgroundColor: 'rgba(0, 0, 0, 0.7)', + offset: [0, -30] + }, + itemStyle: { + color: "#10b981", + }, + symbolSize: 14 } } ]