| | |
| | | }, |
| | | data: data5.value.map(i => dayjs(i.timeData).format('M')) |
| | | }, |
| | | // tooltip: { |
| | | // trigger: 'axis', |
| | | // axisPointer: { |
| | | // type: 'line' |
| | | // }, |
| | | // }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'line' |
| | | }, |
| | | formatter: function (params) { |
| | | // 遍历悬浮时的所有点,定制化显示内容 |
| | | let result = `<div> |
| | | <div style="width: 120px">${params[0].name}月</div> |
| | | <div style="display: flex;align-items: center;;margin-top: 2px;"> |
| | | <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #f6d047;margin-right: 6px;"></div></div> |
| | | <div><strong>${params[0].value} L</strong></div> |
| | | </div> |
| | | </div>` |
| | | return result |
| | | } |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { |
| | | type: 'line' |
| | | }, |
| | | formatter: function (params) { |
| | | // 遍历悬浮时的所有点,定制化显示内容 |
| | | let result = `<div> |
| | | <div style="width: 120px">${params[0].name}月</div> |
| | | <div style="display: flex;align-items: center;;margin-top: 2px;"> |
| | | <div style="display: flex;align-items: center;"><div style="width: 10px;height: 10px; border-radius: 50%;background-color: #61a1c4;margin-right: 6px;"></div></div> |
| | | <div><strong>${params[0].value} </strong></div> |
| | | </div> |
| | | </div>` |
| | | return result |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | |
| | | flex: 2; |
| | | display: flex; |
| | | justify-content: center; |
| | | margin: 0 6px; |
| | | /* margin: 0 6px; */ |
| | | align-items: center; |
| | | white-space: nowrap; |
| | | overflow: hidden; |