bar5.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  39. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  40. }
  41. },
  42. legend: {
  43. data:['利润', '支出', '收入']
  44. },
  45. toolbox: {
  46. show : true,
  47. feature : {
  48. mark : {show: true},
  49. dataView : {show: true, readOnly: false},
  50. magicType : {show: true, type: ['line', 'bar']},
  51. restore : {show: true},
  52. saveAsImage : {show: true}
  53. }
  54. },
  55. calculable : true,
  56. xAxis : [
  57. {
  58. type : 'value'
  59. }
  60. ],
  61. yAxis : [
  62. {
  63. type : 'category',
  64. axisTick : {show: false},
  65. data : ['周一','周二','周三','周四','周五','周六','周日']
  66. }
  67. ],
  68. series : [
  69. {
  70. name:'利润',
  71. type:'bar',
  72. itemStyle : { normal: {label : {show: true, position: 'inside'}}},
  73. data:[200, 170, 240, 244, 200, 220, 210]
  74. },
  75. {
  76. name:'收入',
  77. type:'bar',
  78. stack: '总量',
  79. barWidth : 5,
  80. itemStyle: {normal: {
  81. label : {show: true}
  82. }},
  83. data:[320, 302, 341, 374, 390, 450, 420]
  84. },
  85. {
  86. name:'支出',
  87. type:'bar',
  88. stack: '总量',
  89. itemStyle: {normal: {
  90. label : {show: true, position: 'left'}
  91. }},
  92. data:[-120, -132, -101, -134, -190, -230, -210]
  93. }
  94. ]
  95. };
  96. </textarea>
  97. </div><!--/.well -->
  98. </div><!--/span-->
  99. <div id="graphic" class="col-md-8">
  100. <div id="main" class="main"></div>
  101. <div>
  102. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  103. <span class="text-primary">切换主题</span>
  104. <select id="theme-select"></select>
  105. <span id='wrong-message' style="color:red"></span>
  106. </div>
  107. </div><!--/span-->
  108. </div><!--/row-->
  109. </div><!--/.fluid-container-->
  110. <footer id="footer"></footer>
  111. <!-- Le javascript
  112. ================================================== -->
  113. <!-- Placed at the end of the document so the pages load faster -->
  114. <script src="../asset/js/jquery.min.js"></script>
  115. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  116. <script src="../asset/js/bootstrap.min.js"></script>
  117. <script src="../asset/js/echartsExample.js"></script>
  118. </body>
  119. </html>