杭州-通知查询-echars 分类组统计样式调整
Showing
1 changed file
with
15 additions
and
2 deletions
@@ -375,7 +375,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | @@ -375,7 +375,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | ||
375 | grid: [{ | 375 | grid: [{ |
376 | top: 20, | 376 | top: 20, |
377 | bottom: 45, | 377 | bottom: 45, |
378 | - left: 30, | 378 | + left: 40, |
379 | right: 5 | 379 | right: 5 |
380 | }], | 380 | }], |
381 | xAxis: [{ | 381 | xAxis: [{ |
@@ -422,9 +422,22 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | @@ -422,9 +422,22 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | ||
422 | } | 422 | } |
423 | }], | 423 | }], |
424 | series: series, | 424 | series: series, |
425 | + dataZoom: [ | ||
426 | + { | ||
427 | + type: 'inside' | ||
428 | + } | ||
429 | + ], | ||
425 | } | 430 | } |
426 | echartObject.setOption(option) | 431 | echartObject.setOption(option) |
427 | - | 432 | + const zoomSize = 6; |
433 | + echartObject.on('click', function (params) { | ||
434 | + echartObject.dispatchAction({ | ||
435 | + type: 'dataZoom', | ||
436 | + startValue: xData[Math.max(params.dataIndex - zoomSize / 2, 0)], | ||
437 | + endValue: | ||
438 | + xData[Math.min(params.dataIndex + zoomSize / 2, yData.length - 1)] | ||
439 | + }); | ||
440 | + }); | ||
428 | } | 441 | } |
429 | /********************单独加载更多****************************/ | 442 | /********************单独加载更多****************************/ |
430 | function loadNoticeMoreChart(echartObject,xData,yData) { | 443 | function loadNoticeMoreChart(echartObject,xData,yData) { |
-
Please register or login to post a comment