dataZoom-dataShadow1.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <script src="esl.js"></script>
  5. <script src="config.js"></script>
  6. </head>
  7. <body>
  8. <style>
  9. html, body, #main {
  10. width: 100%;
  11. height: 100%;
  12. }
  13. body {
  14. margin: 0;
  15. }
  16. </style>
  17. <div id="main"></div>
  18. <script>
  19. require([
  20. 'echarts',
  21. 'echarts/chart/line',
  22. 'echarts/component/legend',
  23. 'echarts/component/grid',
  24. 'echarts/component/axis',
  25. 'echarts/component/dataZoom',
  26. 'echarts/component/tooltip',
  27. 'echarts/component/markPoint',
  28. 'echarts/component/markLine'
  29. ], function (echarts) {
  30. var chart = echarts.init(document.getElementById('main'), null, {
  31. renderer: 'canvas'
  32. });
  33. var data1dim = [];
  34. for (var i = 0; i < 2000; i++) {
  35. data1dim.push([i * Math.cos(i / 100), i * Math.sin(i / 100)]);
  36. }
  37. chart.setOption({
  38. animation: false,
  39. legend: {
  40. data: ['line', 'line2', 'line3']
  41. },
  42. tooltip: {
  43. },
  44. xAxis: {
  45. // position: 'top',
  46. type: 'value',
  47. // data: xAxisData,
  48. // boundaryGap: false
  49. },
  50. yAxis: {
  51. type: 'value',
  52. // inverse: true
  53. // data: xAxisData
  54. },
  55. series: [
  56. {
  57. name: 'line2',
  58. type: 'line',
  59. stack: 'all',
  60. symbol: 'none',
  61. data: data1dim
  62. // itemStyle: {
  63. // normal: {
  64. // areaStyle: {}
  65. // }
  66. // }
  67. }
  68. ],
  69. dataZoom: [
  70. {
  71. show: true,
  72. start: 60,
  73. filterMode: 'empty'
  74. },
  75. {
  76. show: true,
  77. orient: 'vertical',
  78. filterMode: 'empty'
  79. }
  80. ]
  81. });
  82. })
  83. </script>
  84. </body>
  85. </html>