map2.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. <style type="text/css">
  26. .CodeMirror {
  27. height: 550px;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <!-- Fixed navbar -->
  33. <div class="navbar navbar-default navbar-fixed-top" role="navigation" id="head"></div>
  34. <div class="container-fluid">
  35. <div class="row-fluid example">
  36. <div id="sidebar-code" class="col-md-4">
  37. <div class="well sidebar-nav">
  38. <div class="nav-header"><a href="#" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div>
  39. <textarea id="code" name="code">
  40. option = {
  41. tooltip : {
  42. trigger: 'item',
  43. formatter: '{b}'
  44. },
  45. series : [
  46. {
  47. name: '中国',
  48. type: 'map',
  49. mapType: 'china',
  50. selectedMode : 'multiple',
  51. itemStyle:{
  52. normal:{label:{show:true}},
  53. emphasis:{label:{show:true}}
  54. },
  55. data:[
  56. {name:'广东',selected:true}
  57. ]
  58. }
  59. ]
  60. };
  61. var ecConfig = require('echarts/config');
  62. myChart.on(ecConfig.EVENT.MAP_SELECTED, function (param){
  63. var selected = param.selected;
  64. var str = '当前选择: ';
  65. for (var p in selected) {
  66. if (selected[p]) {
  67. str += p + ' ';
  68. }
  69. }
  70. document.getElementById('wrong-message').innerHTML = str;
  71. })
  72. </textarea>
  73. </div><!--/.well -->
  74. </div><!--/span-->
  75. <div id="graphic" class="col-md-8">
  76. <div id="main" class="main" style="height: 530px;"></div>
  77. <div>
  78. <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button>
  79. <span class="text-primary">切换主题</span>
  80. <select id="theme-select"></select>
  81. <span id='wrong-message' style="color:red"></span>
  82. </div>
  83. </div><!--/span-->
  84. </div><!--/row-->
  85. </div><!--/.fluid-container-->
  86. <footer id="footer"></footer>
  87. <!-- Le javascript
  88. ================================================== -->
  89. <!-- Placed at the end of the document so the pages load faster -->
  90. <script src="../asset/js/jquery.min.js"></script>
  91. <script type="text/javascript" src="../asset/js/echartsHome.js"></script>
  92. <script src="../asset/js/bootstrap.min.js"></script>
  93. <script src="../asset/js/echartsExample.js"></script>
  94. </body>
  95. </html>