mix6.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. title :{
  37. text : '销售数据',
  38. subtext : '纯属虚构'
  39. },
  40. tooltip : {
  41. trigger: 'axis',
  42. formatter: function (params){
  43. return params[0].name + ' : '
  44. + (params[2].value - params[1].value > 0 ? '+' : '-')
  45. + params[0].value + '<br/>'
  46. + params[2].seriesName + ' : ' + params[2].value + '<br/>'
  47. + params[3].seriesName + ' : ' + params[3].value + '<br/>'
  48. }
  49. },
  50. toolbox: {
  51. show : true,
  52. feature : {
  53. mark : {show: true},
  54. dataView : {show: true, readOnly: false},
  55. magicType : {show: true, type: ['line', 'bar']},
  56. restore : {show: true},
  57. saveAsImage : {show: true}
  58. }
  59. },
  60. legend: {
  61. data:['本周', '上周'],
  62. selectedMode:false
  63. },
  64. xAxis : [
  65. {
  66. type : 'category',
  67. data : ['周一','周二','周三','周四','周五','周六','周日']
  68. }
  69. ],
  70. yAxis : [
  71. {
  72. type : 'value',
  73. min : 200,
  74. max : 450
  75. }
  76. ],
  77. series : [
  78. {
  79. name:'本周',
  80. type:'line',
  81. data:[400, 374, 251, 300, 420, 400, 440]
  82. },
  83. {
  84. name:'上周',
  85. type:'line',
  86. symbol:'none',
  87. itemStyle:{
  88. normal:{
  89. lineStyle: {
  90. width:1,
  91. type:'dashed'
  92. }
  93. }
  94. },
  95. data:[320, 332, 301, 334, 360, 330, 350]
  96. },
  97. {
  98. name:'上周2',
  99. type:'bar',
  100. stack: '1',
  101. barWidth: 6,
  102. itemStyle:{
  103. normal:{
  104. color:'rgba(0,0,0,0)'
  105. },
  106. emphasis:{
  107. color:'rgba(0,0,0,0)'
  108. }
  109. },
  110. data:[320, 332, 251, 300, 360, 330, 350]
  111. },
  112. {
  113. name:'变化',
  114. type:'bar',
  115. stack: '1',
  116. data:[
  117. 80, 42,
  118. {value : 50, itemStyle:{ normal:{color:'red'}}},
  119. {value : 34, itemStyle:{ normal:{color:'red'}}},
  120. 60, 70, 90
  121. ]
  122. }
  123. ]
  124. };
  125. </textarea>
  126. </div><!--/.well -->
  127. </div><!--/span-->
  128. <div id="graphic" class="col-md-8">
  129. <div id="main" class="main"></div>
  130. <div>
  131. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  132. <span class="text-primary">切换主题</span>
  133. <select id="theme-select"></select>
  134. <span id='wrong-message' style="color:red"></span>
  135. </div>
  136. </div><!--/span-->
  137. </div><!--/row-->
  138. </div><!--/.fluid-container-->
  139. <footer id="footer"></footer>
  140. <!-- Le javascript
  141. ================================================== -->
  142. <!-- Placed at the end of the document so the pages load faster -->
  143. <script src="../asset/js/jquery.min.js"></script>
  144. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  145. <script src="../asset/js/bootstrap.min.js"></script>
  146. <script src="../asset/js/echartsExample.js"></script>
  147. </body>
  148. </html>