看版
Showing
1 changed file
with
36 additions
and
9 deletions
| ... | @@ -1198,13 +1198,14 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { | ... | @@ -1198,13 +1198,14 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { |
| 1198 | <span style="margin-right: 20px;">DSO</span> | 1198 | <span style="margin-right: 20px;">DSO</span> |
| 1199 | ${row[0]?.data?.value} | 1199 | ${row[0]?.data?.value} |
| 1200 | </div> | 1200 | </div> |
| 1201 | <div style="color: #fff;font-size: 12px;"> | 1201 | |
| 1202 | <span style="background:${row[0].data.itemStyle.borderColor};display: inline-block;width: 10px;height: 10px;border-radius: 50%;"></span> | ||
| 1203 | <span style="margin-right: 20px;">天数</span> | ||
| 1204 | ${row[0]?.data?.day} | ||
| 1205 | </div> | ||
| 1206 | ` | 1202 | ` |
| 1207 | } | 1203 | } |
| 1204 | // <div style="color: #fff;font-size: 12px;"> | ||
| 1205 | // <span style="background:${row[0].data.itemStyle.borderColor};display: inline-block;width: 10px;height: 10px;border-radius: 50%;"></span> | ||
| 1206 | // <span style="margin-right: 20px;">天数</span> | ||
| 1207 | // ${row[0]?.data?.day} | ||
| 1208 | // </div> | ||
| 1208 | }, | 1209 | }, |
| 1209 | legend: { | 1210 | legend: { |
| 1210 | textStyle: { | 1211 | textStyle: { |
| ... | @@ -1308,7 +1309,7 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { | ... | @@ -1308,7 +1309,7 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { |
| 1308 | lineStyle: { | 1309 | lineStyle: { |
| 1309 | width: 1 | 1310 | width: 1 |
| 1310 | }, | 1311 | }, |
| 1311 | showSymbol: false, | 1312 | showSymbol: true, |
| 1312 | areaStyle: { | 1313 | areaStyle: { |
| 1313 | opacity: 0.2, | 1314 | opacity: 0.2, |
| 1314 | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ | 1315 | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| ... | @@ -1325,7 +1326,20 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { | ... | @@ -1325,7 +1326,20 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { |
| 1325 | emphasis: { | 1326 | emphasis: { |
| 1326 | focus: 'series' | 1327 | focus: 'series' |
| 1327 | }, | 1328 | }, |
| 1328 | data: arr1 | 1329 | data: arr1, |
| 1330 | label: { | ||
| 1331 | show: true, | ||
| 1332 | position: 'left', // 起始点标签放在左侧 | ||
| 1333 | formatter: function (params) { | ||
| 1334 | // 仅当为第一个数据点时显示数值 | ||
| 1335 | if (params.dataIndex === 0) { | ||
| 1336 | return params.value; // 显示数值 | ||
| 1337 | } | ||
| 1338 | return ''; // 其他点不显示 | ||
| 1339 | }, | ||
| 1340 | fontSize: 12, | ||
| 1341 | color: 'rgb(1, 191, 236)', | ||
| 1342 | } | ||
| 1329 | }, | 1343 | }, |
| 1330 | { | 1344 | { |
| 1331 | type: 'line', | 1345 | type: 'line', |
| ... | @@ -1334,7 +1348,7 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { | ... | @@ -1334,7 +1348,7 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { |
| 1334 | lineStyle: { | 1348 | lineStyle: { |
| 1335 | width: 1 | 1349 | width: 1 |
| 1336 | }, | 1350 | }, |
| 1337 | showSymbol: false, | 1351 | showSymbol: true, |
| 1338 | areaStyle: { | 1352 | areaStyle: { |
| 1339 | opacity: 0.2, | 1353 | opacity: 0.2, |
| 1340 | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ | 1354 | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| ... | @@ -1351,7 +1365,20 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { | ... | @@ -1351,7 +1365,20 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => { |
| 1351 | emphasis: { | 1365 | emphasis: { |
| 1352 | focus: 'series' | 1366 | focus: 'series' |
| 1353 | }, | 1367 | }, |
| 1354 | data: arr2 | 1368 | data: arr2, |
| 1369 | label: { | ||
| 1370 | show: true, | ||
| 1371 | position: 'right', // 起始点标签放在左侧 | ||
| 1372 | formatter: function (params) { | ||
| 1373 | // 仅当为第一个数据点时显示数值 | ||
| 1374 | if (params.dataIndex === arr2.length - 2) { | ||
| 1375 | return params.value; // 显示数值 | ||
| 1376 | } | ||
| 1377 | return ''; // 其他点不显示 | ||
| 1378 | }, | ||
| 1379 | fontSize: 12, | ||
| 1380 | color: 'rgba(21, 219, 203, 1)', | ||
| 1381 | } | ||
| 1355 | }, | 1382 | }, |
| 1356 | ] | 1383 | ] |
| 1357 | } | 1384 | } | ... | ... |
-
Please register or sign in to post a comment