39f757f69c3c2a72cccf257b19f3d8a8f6255001.svn-base 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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="javascript:;" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div>
  34. <textarea id="code" name="code">
  35. option = {
  36. title : {
  37. text: 'ECharts2 vs ECharts1',
  38. subtext: 'Chrome下测试数据'
  39. },
  40. tooltip : {
  41. trigger: 'axis'
  42. },
  43. legend: {
  44. data:[
  45. 'ECharts1 - 2k数据','ECharts1 - 2w数据','ECharts1 - 20w数据','',
  46. 'ECharts2 - 2k数据','ECharts2 - 2w数据','ECharts2 - 20w数据'
  47. ]
  48. },
  49. toolbox: {
  50. show : true,
  51. feature : {
  52. mark : {show: true},
  53. dataView : {show: true, readOnly: false},
  54. magicType : {show: true, type: ['line', 'bar']},
  55. restore : {show: true},
  56. saveAsImage : {show: true}
  57. }
  58. },
  59. calculable : true,
  60. grid: {y: 70, y2:30, x2:20},
  61. xAxis : [
  62. {
  63. type : 'category',
  64. data : ['Line','Bar','Scatter','K','Map']
  65. },
  66. {
  67. type : 'category',
  68. axisLine: {show:false},
  69. axisTick: {show:false},
  70. axisLabel: {show:false},
  71. splitArea: {show:false},
  72. splitLine: {show:false},
  73. data : ['Line','Bar','Scatter','K','Map']
  74. }
  75. ],
  76. yAxis : [
  77. {
  78. type : 'value',
  79. axisLabel:{formatter:'{value} ms'}
  80. }
  81. ],
  82. series : [
  83. {
  84. name:'ECharts2 - 2k数据',
  85. type:'bar',
  86. itemStyle: {normal: {color:'rgba(193,35,43,1)', label:{show:true}}},
  87. data:[40,155,95,75, 0]
  88. },
  89. {
  90. name:'ECharts2 - 2w数据',
  91. type:'bar',
  92. itemStyle: {normal: {color:'rgba(181,195,52,1)', label:{show:true,textStyle:{color:'#27727B'}}}},
  93. data:[100,200,105,100,156]
  94. },
  95. {
  96. name:'ECharts2 - 20w数据',
  97. type:'bar',
  98. itemStyle: {normal: {color:'rgba(252,206,16,1)', label:{show:true,textStyle:{color:'#E87C25'}}}},
  99. data:[906,911,908,778,0]
  100. },
  101. {
  102. name:'ECharts1 - 2k数据',
  103. type:'bar',
  104. xAxisIndex:1,
  105. itemStyle: {normal: {color:'rgba(193,35,43,0.5)', label:{show:true,formatter:function(p){return p.value > 0 ? (p.value +'\n'):'';}}}},
  106. data:[96,224,164,124,0]
  107. },
  108. {
  109. name:'ECharts1 - 2w数据',
  110. type:'bar',
  111. xAxisIndex:1,
  112. itemStyle: {normal: {color:'rgba(181,195,52,0.5)', label:{show:true}}},
  113. data:[491,2035,389,955,347]
  114. },
  115. {
  116. name:'ECharts1 - 20w数据',
  117. type:'bar',
  118. xAxisIndex:1,
  119. itemStyle: {normal: {color:'rgba(252,206,16,0.5)', label:{show:true,formatter:function(p){return p.value > 0 ? (p.value +'+'):'';}}}},
  120. data:[3000,3000,2817,3000,0]
  121. }
  122. ]
  123. };
  124. </textarea>
  125. </div><!--/.well -->
  126. </div><!--/span-->
  127. <div id="graphic" class="col-md-8">
  128. <div id="main" class="main"></div>
  129. <div>
  130. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  131. <span class="text-primary">切换主题</span>
  132. <select id="theme-select"></select>
  133. <span id='wrong-message' style="color:red"></span>
  134. </div>
  135. </div><!--/span-->
  136. </div><!--/row-->
  137. </div><!--/.fluid-container-->
  138. <footer id="footer"></footer>
  139. <!-- Le javascript
  140. ================================================== -->
  141. <!-- Placed at the end of the document so the pages load faster -->
  142. <script src="../asset/js/jquery.min.js"></script>
  143. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  144. <script src="../asset/js/bootstrap.min.js"></script>
  145. <script src="../asset/js/echartsExample.js"></script>
  146. </body>
  147. </html>