largeScatterWithEmpty.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!DOCTYPE>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <script src="lib/esl.js"></script>
  6. <script src="lib/config.js"></script>
  7. <script src="lib/jquery.min.js"></script>
  8. <script src="lib/facePrint.js"></script>
  9. <script src="lib/testHelper.js"></script>
  10. <meta name="viewport" content="width=device-width, initial-scale=1" />
  11. <link rel="stylesheet" href="lib/reset.css">
  12. </head>
  13. <body>
  14. <style>
  15. h1 {
  16. line-height: 60px;
  17. height: 60px;
  18. background: #146402;
  19. text-align: center;
  20. font-weight: bold;
  21. color: #eee;
  22. font-size: 14px;
  23. }
  24. body {
  25. position: absolute;
  26. left: 0;
  27. top: 0;
  28. bottom: 0;
  29. right: 0;
  30. }
  31. .chart {
  32. margin: 100px;
  33. background: #333;
  34. height: 300px;
  35. }
  36. </style>
  37. <div style="padding: 100px;">
  38. <h2>'-' exists in data. tooltip shoule be displayed normally.</h2>
  39. <div class="chart" id="main"></div>
  40. </div>
  41. <script>
  42. var echarts;
  43. var chart;
  44. var myChart;
  45. var groupCategories = [];
  46. var groupColors = [];
  47. require([
  48. 'echarts'
  49. // 'echarts/chart/line',
  50. // 'echarts/chart/bar',
  51. // 'echarts/chart/pie',
  52. // 'echarts/chart/scatter',
  53. // 'echarts/chart/map',
  54. // 'echarts/chart/parallel',
  55. // 'echarts/chart/radar',
  56. // 'echarts/component/grid',
  57. // 'echarts/component/polar',
  58. // 'echarts/component/geo',
  59. // 'echarts/component/singleAxis',
  60. // 'echarts/component/legend',
  61. // 'echarts/component/tooltip',
  62. // 'echarts/component/toolbox',
  63. // 'echarts/component/visualMap',
  64. // 'echarts/component/dataZoom'
  65. ], function (ec) {
  66. echarts = ec;
  67. chart = myChart = echarts.init(document.getElementById('main'));
  68. option = {
  69. tooltip : {
  70. trigger: 'item',
  71. showDelay : 0
  72. },
  73. xAxis : [
  74. {
  75. type : 'value',
  76. scale:true,
  77. min: 0,
  78. max: 1000
  79. }
  80. ],
  81. yAxis : [
  82. {
  83. type : 'value',
  84. min: 0,
  85. max: 1000,
  86. scale:true
  87. }
  88. ],
  89. series : [
  90. {
  91. name:'sin',
  92. type:'scatter',
  93. large: true,
  94. largeThreshold: 1,
  95. symbolSize: 10,
  96. data: [[200, 200], ['-', 300], [400, 400]]
  97. }
  98. ]
  99. };
  100. chart.setOption(option);
  101. });
  102. </script>
  103. </body>
  104. </html>