scatter3.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="description" content="ECharts">
  8. <meta name="author" content="kener.linfeng@gmail.com">
  9. <title>ECharts · Example</title>
  10. <link rel="shortcut icon" href="../asset/ico/favicon.png">
  11. <link href="../asset/css/font-awesome.min.css" rel="stylesheet">
  12. <link href="../asset/css/bootstrap.css" rel="stylesheet">
  13. <link href="../asset/css/carousel.css" rel="stylesheet">
  14. <link href="../asset/css/echartsHome.css" rel="stylesheet">
  15. <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  16. <!--[if lt IE 9]>
  17. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  18. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  19. <![endif]-->
  20. <script src="./www/js/echarts.js"></script>
  21. <script src="../asset/js/codemirror.js"></script>
  22. <script src="../asset/js/javascript.js"></script>
  23. <link href="../asset/css/codemirror.css" rel="stylesheet">
  24. <link href="../asset/css/monokai.css" rel="stylesheet">
  25. </head>
  26. <body>
  27. <!-- Fixed navbar -->
  28. <div class="navbar navbar-default navbar-fixed-top" role="navigation" id="head"></div>
  29. <div class="container-fluid">
  30. <div class="row-fluid example">
  31. <div id="sidebar-code" class="col-md-4">
  32. <div class="well sidebar-nav">
  33. <div class="nav-header"><a href="#" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div>
  34. <textarea id="code" name="code">
  35. option = {
  36. tooltip : {
  37. trigger: 'axis',
  38. showDelay : 0,
  39. axisPointer:{
  40. show: true,
  41. type : 'cross',
  42. lineStyle: {
  43. type : 'dashed',
  44. width : 1
  45. }
  46. }
  47. },
  48. legend: {
  49. data:['sin','cos']
  50. },
  51. toolbox: {
  52. show : true,
  53. feature : {
  54. mark : {show: true},
  55. dataZoom : {show: true},
  56. dataView : {show: true, readOnly: false},
  57. restore : {show: true},
  58. saveAsImage : {show: true}
  59. }
  60. },
  61. xAxis : [
  62. {
  63. type : 'value',
  64. scale:true
  65. }
  66. ],
  67. yAxis : [
  68. {
  69. type : 'value',
  70. scale:true
  71. }
  72. ],
  73. series : [
  74. {
  75. name:'sin',
  76. type:'scatter',
  77. large: true,
  78. data: (function () {
  79. var d = [];
  80. var len = 10000;
  81. var x = 0;
  82. while (len--) {
  83. x = (Math.random() * 10).toFixed(3) - 0;
  84. d.push([
  85. x,
  86. //Math.random() * 10
  87. (Math.sin(x) - x * (len % 2 ? 0.1 : -0.1) * Math.random()).toFixed(3) - 0
  88. ]);
  89. }
  90. //console.log(d)
  91. return d;
  92. })()
  93. },
  94. {
  95. name:'cos',
  96. type:'scatter',
  97. large: true,
  98. data: (function () {
  99. var d = [];
  100. var len = 10000;
  101. var x = 0;
  102. while (len--) {
  103. x = (Math.random() * 10).toFixed(3) - 0;
  104. d.push([
  105. x,
  106. //Math.random() * 10
  107. (Math.cos(x) - x * (len % 2 ? 0.1 : -0.1) * Math.random()).toFixed(3) - 0
  108. ]);
  109. }
  110. //console.log(d)
  111. return d;
  112. })()
  113. }
  114. ]
  115. };
  116. </textarea>
  117. </div><!--/.well -->
  118. </div><!--/span-->
  119. <div id="graphic" class="col-md-8">
  120. <div id="main" class="main"></div>
  121. <div>
  122. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  123. <span class="text-primary">切换主题</span>
  124. <select id="theme-select"></select>
  125. <span id='wrong-message' style="color:red"></span>
  126. </div>
  127. </div><!--/span-->
  128. </div><!--/row-->
  129. </div><!--/.fluid-container-->
  130. <footer id="footer"></footer>
  131. <!-- Le javascript
  132. ================================================== -->
  133. <!-- Placed at the end of the document so the pages load faster -->
  134. <script src="../asset/js/jquery.min.js"></script>
  135. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  136. <script src="../asset/js/bootstrap.min.js"></script>
  137. <script src="../asset/js/echartsExample.js"></script>
  138. </body>
  139. </html>