0657554fc3f686a02c60ac9740599d09594b242b.svn-base 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. x: 'center',
  38. text: 'ECharts例子个数统计',
  39. subtext: 'Rainbow bar example',
  40. link: 'http://echarts.baidu.com/doc/example.html'
  41. },
  42. tooltip: {
  43. trigger: 'item'
  44. },
  45. toolbox: {
  46. show: true,
  47. feature: {
  48. dataView: {show: true, readOnly: false},
  49. restore: {show: true},
  50. saveAsImage: {show: true}
  51. }
  52. },
  53. calculable: true,
  54. grid: {
  55. borderWidth: 0,
  56. y: 80,
  57. y2: 60
  58. },
  59. xAxis: [
  60. {
  61. type: 'category',
  62. show: false,
  63. data: ['Line', 'Bar', 'Scatter', 'K', 'Pie', 'Radar', 'Chord', 'Force', 'Map', 'Gauge', 'Funnel']
  64. }
  65. ],
  66. yAxis: [
  67. {
  68. type: 'value',
  69. show: false
  70. }
  71. ],
  72. series: [
  73. {
  74. name: 'ECharts例子个数统计',
  75. type: 'bar',
  76. itemStyle: {
  77. normal: {
  78. color: function(params) {
  79. // build a color map as your need.
  80. var colorList = [
  81. '#C1232B','#B5C334','#FCCE10','#E87C25','#27727B',
  82. '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
  83. '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
  84. ];
  85. return colorList[params.dataIndex]
  86. },
  87. label: {
  88. show: true,
  89. position: 'top',
  90. formatter: '{b}\n{c}'
  91. }
  92. }
  93. },
  94. data: [12,21,10,4,12,5,6,5,25,23,7],
  95. markPoint: {
  96. tooltip: {
  97. trigger: 'item',
  98. backgroundColor: 'rgba(0,0,0,0)',
  99. formatter: function(params){
  100. return '<img src="'
  101. + params.data.symbol.replace('image://', '')
  102. + '"/>';
  103. }
  104. },
  105. data: [
  106. {xAxis:0, y: 350, name:'Line', symbolSize:20, symbol: 'image://../asset/ico/折线图.png'},
  107. {xAxis:1, y: 350, name:'Bar', symbolSize:20, symbol: 'image://../asset/ico/柱状图.png'},
  108. {xAxis:2, y: 350, name:'Scatter', symbolSize:20, symbol: 'image://../asset/ico/散点图.png'},
  109. {xAxis:3, y: 350, name:'K', symbolSize:20, symbol: 'image://../asset/ico/K线图.png'},
  110. {xAxis:4, y: 350, name:'Pie', symbolSize:20, symbol: 'image://../asset/ico/饼状图.png'},
  111. {xAxis:5, y: 350, name:'Radar', symbolSize:20, symbol: 'image://../asset/ico/雷达图.png'},
  112. {xAxis:6, y: 350, name:'Chord', symbolSize:20, symbol: 'image://../asset/ico/和弦图.png'},
  113. {xAxis:7, y: 350, name:'Force', symbolSize:20, symbol: 'image://../asset/ico/力导向图.png'},
  114. {xAxis:8, y: 350, name:'Map', symbolSize:20, symbol: 'image://../asset/ico/地图.png'},
  115. {xAxis:9, y: 350, name:'Gauge', symbolSize:20, symbol: 'image://../asset/ico/仪表盘.png'},
  116. {xAxis:10, y: 350, name:'Funnel', symbolSize:20, symbol: 'image://../asset/ico/漏斗图.png'},
  117. ]
  118. }
  119. }
  120. ]
  121. };
  122. </textarea>
  123. </div><!--/.well -->
  124. </div><!--/span-->
  125. <div id="graphic" class="col-md-8">
  126. <div id="main" class="main"></div>
  127. <div>
  128. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  129. <span class="text-primary">切换主题</span>
  130. <select id="theme-select"></select>
  131. <span id='wrong-message' style="color:red"></span>
  132. </div>
  133. </div><!--/span-->
  134. </div><!--/row-->
  135. </div><!--/.fluid-container-->
  136. <footer id="footer"></footer>
  137. <!-- Le javascript
  138. ================================================== -->
  139. <!-- Placed at the end of the document so the pages load faster -->
  140. <script src="../asset/js/jquery.min.js"></script>
  141. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  142. <script src="../asset/js/bootstrap.min.js"></script>
  143. <script src="../asset/js/echartsExample.js"></script>
  144. </body>
  145. </html>