|
| 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=" [email protected]" > |
| 9 | + <title>ECharts · Example</title> |
| 10 | + |
| 11 | + <link rel="shortcut icon" href="../asset/ico/favicon.png"> |
| 12 | + |
| 13 | + <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> |
| 14 | + <link href="../asset/css/bootstrap.css" rel="stylesheet"> |
| 15 | + <link href="../asset/css/carousel.css" rel="stylesheet"> |
| 16 | + <link href="../asset/css/echartsHome.css" rel="stylesheet"> |
| 17 | + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> |
| 18 | + <!--[if lt IE 9]> |
| 19 | + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> |
| 20 | + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
| 21 | + <![endif]--> |
| 22 | + |
| 23 | + <script src="../asset/js/esl/esl.js"></script> |
| 24 | + <script src="../asset/js/codemirror.js"></script> |
| 25 | + <script src="../asset/js/javascript.js"></script> |
| 26 | + |
| 27 | + <link href="../asset/css/codemirror.css" rel="stylesheet"> |
| 28 | + <link href="../asset/css/monokai.css" rel="stylesheet"> |
| 29 | + <style type="text/css"> |
| 30 | + .CodeMirror { |
| 31 | + height: 620px; |
| 32 | + } |
| 33 | + </style> |
| 34 | +</head> |
| 35 | + |
| 36 | +<body> |
| 37 | + <!-- Fixed navbar --> |
| 38 | + <div class="navbar navbar-default navbar-fixed-top" role="navigation" id="head"></div> |
| 39 | + |
| 40 | + |
| 41 | + <div class="container-fluid"> |
| 42 | + <div class="row-fluid example"> |
| 43 | + <div id="sidebar-code" class="col-md-1"> |
| 44 | + <div class="well sidebar-nav"> |
| 45 | + <div class="nav-header"><a href="#" onclick="autoResize()" class="glyphicon glyphicon-resize-full" id ="icon-resize" ></a>option</div> |
| 46 | + <textarea id="code" name="code"> |
| 47 | +option = { |
| 48 | + title : { |
| 49 | + text: 'webkit内核依赖', |
| 50 | + subtext: '数据来自网络', |
| 51 | + x:'right', |
| 52 | + y:'bottom' |
| 53 | + }, |
| 54 | + tooltip : { |
| 55 | + trigger: 'item', |
| 56 | + formatter : "{b}" |
| 57 | + }, |
| 58 | + toolbox: { |
| 59 | + show : true, |
| 60 | + feature : { |
| 61 | + restore : {show: true}, |
| 62 | + saveAsImage : {show: true} |
| 63 | + } |
| 64 | + }, |
| 65 | + legend : { |
| 66 | + data : ['HTMLElement', 'WebGL', 'SVG', 'CSS', 'Other'], |
| 67 | + orient : 'vertical', |
| 68 | + x : 'left' |
| 69 | + }, |
| 70 | + series : (function (){ |
| 71 | + // If data have been loaded |
| 72 | + if (webkitDepData) { |
| 73 | + //webkitDepData has been required and defined in webkit-dep.js |
| 74 | + webkitDepData.type = 'chord'; |
| 75 | + webkitDepData.ribbonType = false; |
| 76 | + for (var i = 0; i < webkitDepData.nodes.length; i++) { |
| 77 | + webkitDepData.nodes[i].value = null; |
| 78 | + } |
| 79 | + for (var i = 0; i < webkitDepData.links.length; i++) { |
| 80 | + webkitDepData.links[i].weight = 1; |
| 81 | + } |
| 82 | + webkitDepData.minRadius = 2; |
| 83 | + webkitDepData.maxRadius = 10; |
| 84 | + webkitDepData.itemStyle = { |
| 85 | + normal: { |
| 86 | + label: { |
| 87 | + show: true, |
| 88 | + rotate: true |
| 89 | + }, |
| 90 | + chordStyle: { |
| 91 | + opacity: 0.2 |
| 92 | + } |
| 93 | + } |
| 94 | + }; |
| 95 | + return [webkitDepData]; |
| 96 | + } else { |
| 97 | + return []; |
| 98 | + } |
| 99 | + })() |
| 100 | +}; |
| 101 | + </textarea> |
| 102 | + </div><!--/.well --> |
| 103 | + </div><!--/span--> |
| 104 | + <div id="graphic" class="col-md-11"> |
| 105 | + <div id="main" class="main" style="height:600px;"></div> |
| 106 | + <div> |
| 107 | + <button type="button" class="btn btn-sm btn-success" onclick="refresh(true)">刷 新</button> |
| 108 | + <span class="text-primary">切换主题</span> |
| 109 | + <select id="theme-select"></select> |
| 110 | + |
| 111 | + <span id='wrong-message' style="color:red"></span> |
| 112 | + </div> |
| 113 | + </div><!--/span--> |
| 114 | + </div><!--/row--> |
| 115 | + |
| 116 | + </div><!--/.fluid-container--> |
| 117 | + |
| 118 | + <footer id="footer"></footer> |
| 119 | + <!-- Le javascript |
| 120 | + ================================================== --> |
| 121 | + <!-- Placed at the end of the document so the pages load faster --> |
| 122 | + <script src="../asset/js/jquery.min.js"></script> |
| 123 | + <script type="text/javascript" src="../asset/js/echartsHome.js"></script> |
| 124 | + <script src="../asset/js/bootstrap.min.js"></script> |
| 125 | + <script type="text/javascript"> |
| 126 | + var webkitDepData; |
| 127 | + require(['webkit-dep'], function (wd) { |
| 128 | + webkitDepData = wd; |
| 129 | + //webkitDepData has been required and defined in webkit-dep.js |
| 130 | + webkitDepData.minRadius = 5; |
| 131 | + webkitDepData.maxRadius = 8; |
| 132 | + webkitDepData.density = 1.1; |
| 133 | + webkitDepData.attractiveness = 1.1; |
| 134 | + webkitDepData.itemStyle = { |
| 135 | + normal : { |
| 136 | + linkStyle : { |
| 137 | + opacity : 0.5 |
| 138 | + } |
| 139 | + } |
| 140 | + } |
| 141 | + // Echarts have been loaded |
| 142 | + if (typeof(echarts) !== 'undefined') { |
| 143 | + refresh(); |
| 144 | + } |
| 145 | + }) |
| 146 | + </script> |
| 147 | + <script src="../asset/js/echartsExample.js"></script> |
| 148 | +</body> |
| 149 | +</html> |
0 commit comments