all.html 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ECharts</title>
  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. <script src="../../doc/example/www/js/echarts.js"></script>
  10. <script src="../../doc/asset/js/codemirror.js"></script>
  11. <script src="../../doc/asset/js/javascript.js"></script>
  12. <link href="../../doc/asset/css/bootstrap.css" rel="stylesheet">
  13. <link href="../../doc/asset/css/bootstrap-responsive.css" rel="stylesheet">
  14. <link href="../../doc/asset/css/codemirror.css" rel="stylesheet">
  15. <link href="../../doc/asset/css/monokai.css" rel="stylesheet">
  16. <link rel="shortcut icon" href="../../doc/asset/ico/favicon.png">
  17. <style type="text/css">
  18. .test-head {padding-left: 20px;margin-top:0;background-color:#eee;}
  19. .CodeMirror pre{color: #f8f8f2;}
  20. .sidebar-nav {
  21. padding: 9px 0;
  22. margin-bottom: 0;
  23. }
  24. .icon-resize-full, .icon-resize-small {
  25. float: right;
  26. opacity: .3;
  27. }
  28. .span4.ani {
  29. transition: width 1s;
  30. -moz-transition: width 1s; /* Firefox 4 */
  31. -webkit-transition: width 1s; /* Safari and Chrome */
  32. -o-transition: width 1s; /* Opera */
  33. }
  34. .span8.ani {
  35. transition: width 1s;
  36. -moz-transition: width 1s; /* Firefox 4 */
  37. -webkit-transition: width 1s; /* Safari and Chrome */
  38. -o-transition: width 1s; /* Opera */
  39. }
  40. .main {
  41. height: 400px;
  42. overflow: hidden;
  43. padding : 10px;
  44. margin-bottom: 10px;
  45. border: 1px solid #e3e3e3;
  46. -webkit-border-radius: 4px;
  47. -moz-border-radius: 4px;
  48. border-radius: 4px;
  49. -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
  50. -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
  51. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
  52. }
  53. </style>
  54. </head>
  55. <body>
  56. <h3 class="test-head"><a href="../../index.html">ECharts</a> - test all <button onclick="refreshAll()">Refresh All</button></h3>
  57. <!--------0:line--------->
  58. <div class="container-fluid" idx='0'>
  59. <div class="row-fluid">
  60. <div md="sidebar-code" class="span4">
  61. <div class="well sidebar-nav">
  62. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  63. <textarea md="code" name="code">
  64. option = {
  65. tooltip : {
  66. trigger: 'axis'
  67. },
  68. legend: {
  69. data:['邮件营销','联盟广告','直接访问','搜索引擎']
  70. },
  71. toolbox: {
  72. show : true,
  73. feature : {
  74. mark : {show: true},
  75. dataView : {show: true, readOnly: false},
  76. magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
  77. restore : {show: true},
  78. saveAsImage : {show: true}
  79. }
  80. },
  81. calculable : true,
  82. xAxis : [
  83. {
  84. type : 'category',
  85. boundaryGap : false,
  86. data : ['周一','周二','周三','周四','周五','周六','周日']
  87. }
  88. ],
  89. yAxis : [
  90. {
  91. type : 'value',
  92. splitArea : {show : true}
  93. }
  94. ],
  95. series : [
  96. {
  97. name:'邮件营销',
  98. type:'line',
  99. stack: '总量',
  100. symbol: 'none',
  101. itemStyle: {
  102. normal: {
  103. areaStyle: {
  104. // 区域图,纵向渐变填充
  105. color : (function (){
  106. var zrColor = require('zrender/tool/color');
  107. return zrColor.getLinearGradient(
  108. 0, 200, 0, 400,
  109. [[0, 'rgba(255,0,0,0.8)'],[0.8, 'rgba(255,255,255,0.1)']]
  110. )
  111. })()
  112. }
  113. }
  114. },
  115. data:[
  116. 120, 132, 301, 134,
  117. {value:90, symbol:'droplet',symbolSize:5},
  118. 230, 210
  119. ]
  120. },
  121. {
  122. name:'联盟广告',
  123. type:'line',
  124. stack: '总量',
  125. smooth: true,
  126. symbol: 'image://../../doc/asset/ico/favicon.png', // 系列级个性化拐点图形
  127. symbolSize: 8,
  128. data:[
  129. 120, 82,
  130. {
  131. value:201,
  132. symbol: 'star', // 数据级个性化拐点图形
  133. symbolSize : 15,
  134. itemStyle : { normal: {label : {
  135. show: true,
  136. textStyle : {
  137. fontSize : '20',
  138. fontFamily : '微软雅黑',
  139. fontWeight : 'bold'
  140. }
  141. }}}
  142. },
  143. {
  144. value:134,
  145. symbol: 'none'
  146. },
  147. 190,
  148. {
  149. value : 230,
  150. symbol: 'emptypin',
  151. symbolSize: 8
  152. },
  153. 110
  154. ]
  155. },
  156. {
  157. name:'直接访问',
  158. type:'line',
  159. stack: '总量',
  160. symbol: 'arrow',
  161. symbolSize: 6,
  162. symbolRotate: -45,
  163. itemStyle: {
  164. normal: {
  165. color: 'red',
  166. lineStyle: { // 系列级个性化折线样式
  167. width: 2,
  168. type: 'dashed'
  169. }
  170. },
  171. emphasis: {
  172. color: 'blue'
  173. }
  174. },
  175. data:[
  176. 320, 332, '-', 334,
  177. {
  178. value: 390,
  179. symbol: 'star6',
  180. symbolSize : 20,
  181. symbolRotate : 10,
  182. itemStyle: { // 数据级个性化折线样式
  183. normal: {
  184. color: 'yellowgreen'
  185. },
  186. emphasis: {
  187. color: 'orange',
  188. label : {
  189. show: true,
  190. position: 'inside',
  191. textStyle : {
  192. fontSize : '20'
  193. }
  194. }
  195. }
  196. }
  197. },
  198. 330, 320
  199. ]
  200. },
  201. {
  202. name:'搜索引擎',
  203. type:'line',
  204. symbol:'emptyCircle',
  205. itemStyle: {
  206. normal: {
  207. lineStyle: { // 系列级个性化折线样式,横向渐变描边
  208. width: 2,
  209. color: (function (){
  210. var zrColor = require('zrender/tool/color');
  211. return zrColor.getLinearGradient(
  212. 0, 0, 1000, 0,
  213. [[0, 'rgba(255,0,0,0.8)'],[0.8, 'rgba(255,255,0,0.8)']]
  214. )
  215. })(),
  216. shadowColor : 'rgba(0,0,0,0.5)',
  217. shadowBlur: 10,
  218. shadowOffsetX: 8,
  219. shadowOffsetY: 8
  220. }
  221. },
  222. emphasis : {
  223. label : {show: true}
  224. }
  225. },
  226. data:[
  227. 620, 732, 791,
  228. {value:734, symbol:'emptyHeart',symbolSize:10},
  229. 890, 930, 820
  230. ],
  231. markPoint : {
  232. data : [
  233. {name : '周最高', value : 930, xAxis: '周六', yAxis: 935}
  234. ]
  235. }
  236. }
  237. ]
  238. };
  239. </textarea>
  240. </div><!--/.well -->
  241. </div><!--/span-->
  242. <div md="graphic" class="span8">
  243. <div md="main" class="main"></div>
  244. <div>
  245. <button onclick="refresh(true, 0)">Refresh ~</button>
  246. <span md='wrong-message' style="color:red"></span>
  247. </div>
  248. </div><!--/span-->
  249. </div><!--/row-->
  250. </div><!--/.fluid-container-->
  251. <!--------1:bar--------->
  252. <div class="container-fluid" idx="1">
  253. <div class="row-fluid">
  254. <div md="sidebar-code" class="span4">
  255. <div class="well sidebar-nav">
  256. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize"></a>option</div>
  257. <textarea md="code" name="code">
  258. option = {
  259. tooltip : {
  260. show: true,
  261. trigger: 'item'
  262. },
  263. legend: {
  264. data:['邮件营销','联盟广告','直接访问','搜索引擎']
  265. },
  266. toolbox: {
  267. show : true,
  268. feature : {
  269. mark : {show: true},
  270. dataView : {show: true, readOnly: false},
  271. magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
  272. restore : {show: true},
  273. saveAsImage : {show: true}
  274. }
  275. },
  276. calculable : true,
  277. xAxis : [
  278. {
  279. type : 'category',
  280. data : ['周一','周二','周三','周四','周五','周六','周日']
  281. }
  282. ],
  283. yAxis : [
  284. {
  285. type : 'value',
  286. splitArea : {show : true}
  287. }
  288. ],
  289. series : [
  290. {
  291. name:'邮件营销',
  292. type:'bar',
  293. itemStyle: { // 系列级个性化样式,纵向渐变填充
  294. normal: {
  295. borderColor:'red',
  296. color : (function (){
  297. var zrColor = require('zrender/tool/color');
  298. return zrColor.getLinearGradient(
  299. 0, 400, 0, 300,
  300. [[0, 'green'],[1, 'yellow']]
  301. )
  302. })()
  303. },
  304. emphasis: {
  305. borderWidth: 5,
  306. borderColor:'green',
  307. color: (function (){
  308. var zrColor = require('zrender/tool/color');
  309. return zrColor.getLinearGradient(
  310. 0, 400, 0, 300,
  311. [[0, 'red'],[1, 'orange']]
  312. )
  313. })(),
  314. label : {
  315. show : true,
  316. position : 'top',
  317. formatter : "{a} {b} {c}",
  318. textStyle : {
  319. color: 'blue'
  320. }
  321. }
  322. }
  323. },
  324. data:[220, 232, 101, 234, 190, 330, 210]
  325. },
  326. {
  327. name:'联盟广告',
  328. type:'bar',
  329. stack: '总量',
  330. data:[120, '-', 451, 134, 190, 230, 110]
  331. },
  332. {
  333. name:'直接访问',
  334. type:'bar',
  335. stack: '总量',
  336. itemStyle: { // 系列级个性化
  337. normal: {
  338. borderWidth: 6,
  339. borderColor:'tomato',
  340. color: 'red'
  341. },
  342. emphasis: {
  343. borderColor:'red',
  344. color: 'blue'
  345. }
  346. },
  347. data:[
  348. 320, 332, 100, 334,
  349. {
  350. value: 390,
  351. symbolSize : 10, // 数据级个性化
  352. itemStyle: {
  353. normal: {
  354. color :'lime'
  355. },
  356. emphasis: {
  357. color: 'skyBlue'
  358. }
  359. }
  360. },
  361. 330, 320
  362. ]
  363. },
  364. {
  365. name:'搜索引擎',
  366. type:'bar',
  367. barWidth: 40, // 系列级个性化,柱形宽度
  368. itemStyle: {
  369. normal: { // 系列级个性化,横向渐变填充
  370. borderRadius: 5,
  371. color : (function (){
  372. var zrColor = require('zrender/tool/color');
  373. return zrColor.getLinearGradient(
  374. 0, 0, 1000, 0,
  375. [[0, 'rgba(30,144,255,0.8)'],[1, 'rgba(138,43,226,0.8)']]
  376. )
  377. })(),
  378. label : {
  379. show : true,
  380. textStyle : {
  381. fontSize : '20',
  382. fontFamily : '微软雅黑',
  383. fontWeight : 'bold'
  384. }
  385. }
  386. }
  387. },
  388. data:[
  389. 620, 732,
  390. {
  391. value: 701,
  392. itemStyle : { normal: {label : {position: 'inside'}}}
  393. },
  394. 734, 890,
  395. {
  396. value: 930,
  397. itemStyle : { normal: {label : {show: false}}}
  398. },
  399. 820
  400. ],
  401. markPoint : {
  402. data : [
  403. {name : '最高', value : 930, xAxis: '周六', yAxis: 930, symbolSize:14}
  404. ]
  405. },
  406. markLine : {
  407. data : [
  408. {type : 'average', name : '平均值'},
  409. {type : 'max'},
  410. {type : 'min'}
  411. ]
  412. }
  413. }
  414. ]
  415. };
  416. </textarea>
  417. </div><!--/.well -->
  418. </div><!--/span-->
  419. <div md="graphic" class="span8">
  420. <div md="main" class="main"></div>
  421. <div>
  422. <button onclick="refresh(true, 1)">Refresh ~</button>
  423. <span md='wrong-message' style="color:red"></span>
  424. </div>
  425. </div><!--/span-->
  426. </div><!--/row-->
  427. </div><!--/.fluid-container-->
  428. <!--------2:scatter--------->
  429. <div class="container-fluid" idx="2">
  430. <div class="row-fluid">
  431. <div md="sidebar-code" class="span4">
  432. <div class="well sidebar-nav">
  433. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  434. <textarea md="code" name="code">
  435. option = {
  436. tooltip : {
  437. trigger: 'item'
  438. },
  439. legend: {
  440. data:['scatter1','scatter2']
  441. },
  442. toolbox: {
  443. show : true,
  444. feature : {
  445. mark : {show: true},
  446. dataView : {show: true, readOnly: false},
  447. restore : {show: true},
  448. saveAsImage : {show: true}
  449. }
  450. },
  451. calculable : true,
  452. xAxis : [
  453. {
  454. type : 'value'
  455. }
  456. ],
  457. yAxis : [
  458. {
  459. type : 'value',
  460. splitArea : {show : true}
  461. }
  462. ],
  463. series : [
  464. {
  465. name:'scatter1',
  466. type:'scatter',
  467. symbol: 'emptyCircle', //'circle', 'rectangle', 'triangle', 'diamond', 'emptyCircle', 'emptyRectangle', 'emptyTriangle', 'emptyDiamond'
  468. symbolSize: function (value){
  469. if (value[0] < 2) {
  470. return 2;
  471. }
  472. else if (value[0] < 8) {
  473. return Math.round(value[2] * 3);
  474. }
  475. else {
  476. return 20;
  477. }
  478. },
  479. itemStyle: {
  480. normal: {
  481. color: 'lightblue',
  482. borderWidth: 4,
  483. label : {show: true}
  484. },
  485. emphasis: {
  486. color: 'lightgreen'
  487. }
  488. },
  489. data: (function () {
  490. var d = [];
  491. var len = 20;
  492. while (len--) {
  493. d.push([
  494. (Math.random()*10).toFixed(2) - 0,
  495. (Math.random()*10).toFixed(2) - 0,
  496. (Math.random()*10).toFixed(2) - 0
  497. ]);
  498. }
  499. return d;
  500. })()
  501. },
  502. {
  503. name:'scatter2',
  504. type:'scatter',
  505. symbol: 'image://../../doc/asset/ico/favicon.png', // 系列级个性化拐点图形
  506. symbolSize: function (value){
  507. return Math.round(value[2] * 3);
  508. },
  509. itemStyle: {
  510. emphasis : {
  511. label : {show: true}
  512. }
  513. },
  514. data: (function () {
  515. var d = [];
  516. var len = 20;
  517. while (len--) {
  518. d.push([
  519. (Math.random()*10).toFixed(2) - 0,
  520. (Math.random()*10).toFixed(2) - 0,
  521. (Math.random()*10).toFixed(2) - 0
  522. ]);
  523. }
  524. d.push({
  525. value : [5,5,1000],
  526. itemStyle: {
  527. normal: {
  528. borderWidth: 8,
  529. color: 'orange'
  530. },
  531. emphasis: {
  532. borderWidth: 10,
  533. color: '#ff4500'
  534. }
  535. },
  536. symbol: 'emptyTriangle',
  537. symbolRotate:90,
  538. symbolSize:30
  539. })
  540. return d;
  541. })(),
  542. markPoint : {
  543. symbol: 'emptyCircle',
  544. itemStyle:{
  545. normal:{label:{position:'top'}}
  546. },
  547. data : [
  548. {name : '有个东西', value : 1000, xAxis: 5, yAxis: 5, symbolSize:80}
  549. ]
  550. }
  551. }
  552. ]
  553. };
  554. </textarea>
  555. </div><!--/.well -->
  556. </div><!--/span-->
  557. <div md="graphic" class="span8">
  558. <div md="main" class="main"></div>
  559. <div>
  560. <button onclick="refresh(true,2)">Refresh ~</button>
  561. <span md='wrong-message' style="color:red"></span>
  562. </div>
  563. </div><!--/span-->
  564. </div><!--/row-->
  565. </div><!--/.fluid-container-->
  566. <!--------3:k--------->
  567. <div class="container-fluid" idx="3">
  568. <div class="row-fluid">
  569. <div md="sidebar-code" class="span4">
  570. <div class="well sidebar-nav">
  571. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  572. <textarea md="code" name="code">
  573. option = {
  574. tooltip : {
  575. trigger: 'axis',
  576. formatter: function (params) {
  577. var res = params[0].name;
  578. res += '<br/>' + params[0].seriesName;
  579. res += '<br/> 开盘 : ' + params[0].value[0] + ' 最高 : ' + params[0].value[3];
  580. res += '<br/> 收盘 : ' + params[0].value[1] + ' 最低 : ' + params[0].value[2];
  581. return res;
  582. }
  583. },
  584. legend: {
  585. data:['上证指数']
  586. },
  587. toolbox: {
  588. show : true,
  589. feature : {
  590. mark : {show: true},
  591. dataZoom : {show: true},
  592. dataView : {show: true, readOnly: false},
  593. restore : {show: true},
  594. saveAsImage : {show: true}
  595. }
  596. },
  597. dataZoom : {
  598. show : true,
  599. realtime: true,
  600. start : 0,
  601. end : 50
  602. },
  603. xAxis : [
  604. {
  605. type : 'category',
  606. boundaryGap : true,
  607. axisTick: {onGap:false},
  608. splitLine: {show:false},
  609. data : [
  610. "2013/1/24", "2013/1/25", "2013/1/28", "2013/1/29", "2013/1/30",
  611. "2013/1/31", "2013/2/1", "2013/2/4", "2013/2/5", "2013/2/6",
  612. "2013/2/7", "2013/2/8", "2013/2/18", "2013/2/19", "2013/2/20",
  613. "2013/2/21", "2013/2/22", "2013/2/25", "2013/2/26", "2013/2/27",
  614. "2013/2/28", "2013/3/1", "2013/3/4", "2013/3/5", "2013/3/6",
  615. "2013/3/7", "2013/3/8", "2013/3/11", "2013/3/12", "2013/3/13",
  616. "2013/3/14", "2013/3/15", "2013/3/18", "2013/3/19", "2013/3/20",
  617. "2013/3/21", "2013/3/22", "2013/3/25", "2013/3/26", "2013/3/27",
  618. "2013/3/28", "2013/3/29", "2013/4/1", "2013/4/2", "2013/4/3",
  619. "2013/4/8", "2013/4/9", "2013/4/10", "2013/4/11", "2013/4/12",
  620. "2013/4/15", "2013/4/16", "2013/4/17", "2013/4/18", "2013/4/19",
  621. "2013/4/22", "2013/4/23", "2013/4/24", "2013/4/25", "2013/4/26",
  622. "2013/5/2", "2013/5/3", "2013/5/6", "2013/5/7", "2013/5/8",
  623. "2013/5/9", "2013/5/10", "2013/5/13", "2013/5/14", "2013/5/15",
  624. "2013/5/16", "2013/5/17", "2013/5/20", "2013/5/21", "2013/5/22",
  625. "2013/5/23", "2013/5/24", "2013/5/27", "2013/5/28", "2013/5/29",
  626. "2013/5/30", "2013/5/31", "2013/6/3", "2013/6/4", "2013/6/5",
  627. "2013/6/6", "2013/6/7", "2013/6/13"
  628. ]
  629. }
  630. ],
  631. yAxis : [
  632. {
  633. type : 'value',
  634. scale:true,
  635. splitNumber: 9,
  636. boundaryGap: [0.05, 0.05],
  637. splitArea : {show : true}
  638. }
  639. ],
  640. series : [
  641. {
  642. name:'上证指数',
  643. type:'k',
  644. barMaxWidth: 20,
  645. itemStyle: {
  646. normal: {
  647. color: 'red', // 阳线填充颜色
  648. color0: 'lightgreen', // 阴线填充颜色
  649. lineStyle: {
  650. width: 2,
  651. color: 'orange', // 阳线边框颜色
  652. color0: 'green' // 阴线边框颜色
  653. }
  654. },
  655. emphasis: {
  656. color: 'black', // 阳线填充颜色
  657. color0: 'white' // 阴线填充颜色
  658. }
  659. },
  660. data:[ // 开盘,收盘,最低,最高
  661. {
  662. value:[2320.26,2302.6,2287.3,2362.94],
  663. itemStyle: {
  664. normal: {
  665. color0: 'blue', // 阴线填充颜色
  666. lineStyle: {
  667. width: 3,
  668. color0: 'blue' // 阴线边框颜色
  669. }
  670. },
  671. emphasis: {
  672. color0: 'blue' // 阴线填充颜色
  673. }
  674. }
  675. },
  676. [2300,2291.3,2288.26,2308.38],
  677. [2295.35,2346.5,2295.35,2346.92],
  678. [2347.22,2358.98,2337.35,2363.8],
  679. [2360.75,2382.48,2347.89,2383.76],
  680. [2383.43,2385.42,2371.23,2391.82],
  681. [2377.41,2419.02,2369.57,2421.15],
  682. [2425.92,2428.15,2417.58,2440.38],
  683. [2411,2433.13,2403.3,2437.42],
  684. [2432.68,2434.48,2427.7,2441.73],
  685. [2430.69,2418.53,2394.22,2433.89],
  686. [2416.62,2432.4,2414.4,2443.03],
  687. [2441.91,2421.56,2415.43,2444.8],
  688. [2420.26,2382.91,2373.53,2427.07],
  689. [2383.49,2397.18,2370.61,2397.94],
  690. [2378.82,2325.95,2309.17,2378.82],
  691. [2322.94,2314.16,2308.76,2330.88],
  692. [2320.62,2325.82,2315.01,2338.78],
  693. [2313.74,2293.34,2289.89,2340.71],
  694. [2297.77,2313.22,2292.03,2324.63],
  695. [2322.32,2365.59,2308.92,2366.16],
  696. [2364.54,2359.51,2330.86,2369.65],
  697. [2332.08,2273.4,2259.25,2333.54],
  698. [2274.81,2326.31,2270.1,2328.14],
  699. [2333.61,2347.18,2321.6,2351.44],
  700. [2340.44,2324.29,2304.27,2352.02],
  701. [2326.42,2318.61,2314.59,2333.67],
  702. [2314.68,2310.59,2296.58,2320.96],
  703. [2309.16,2286.6,2264.83,2333.29],
  704. [2282.17,2263.97,2253.25,2286.33],
  705. [2255.77,2270.28,2253.31,2276.22],
  706. [2269.31,2278.4,2250,2312.08],
  707. [2267.29,2240.02,2239.21,2276.05],
  708. [2244.26,2257.43,2232.02,2261.31],
  709. [2257.74,2317.37,2257.42,2317.86],
  710. [2318.21,2324.24,2311.6,2330.81],
  711. [2321.4,2328.28,2314.97,2332],
  712. [2334.74,2326.72,2319.91,2344.89],
  713. [2318.58,2297.67,2281.12,2319.99],
  714. [2299.38,2301.26,2289,2323.48],
  715. [2273.55,2236.3,2232.91,2273.55],
  716. [2238.49,2236.62,2228.81,2246.87],
  717. [2229.46,2234.4,2227.31,2243.95],
  718. [2234.9,2227.74,2220.44,2253.42],
  719. [2232.69,2225.29,2217.25,2241.34],
  720. [2196.24,2211.59,2180.67,2212.59],
  721. [2215.47,2225.77,2215.47,2234.73],
  722. [2224.93,2226.13,2212.56,2233.04],
  723. [2236.98,2219.55,2217.26,2242.48],
  724. [2218.09,2206.78,2204.44,2226.26],
  725. [2199.91,2181.94,2177.39,2204.99],
  726. [2169.63,2194.85,2165.78,2196.43],
  727. [2195.03,2193.8,2178.47,2197.51],
  728. [2181.82,2197.6,2175.44,2206.03],
  729. [2201.12,2244.64,2200.58,2250.11],
  730. [2236.4,2242.17,2232.26,2245.12],
  731. [2242.62,2184.54,2182.81,2242.62],
  732. [2187.35,2218.32,2184.11,2226.12],
  733. [2213.19,2199.31,2191.85,2224.63],
  734. [2203.89,2177.91,2173.86,2210.58],
  735. [2170.78,2174.12,2161.14,2179.65],
  736. [2179.05,2205.5,2179.05,2222.81],
  737. [2212.5,2231.17,2212.5,2236.07],
  738. [2227.86,2235.57,2219.44,2240.26],
  739. [2242.39,2246.3,2235.42,2255.21],
  740. [2246.96,2232.97,2221.38,2247.86],
  741. [2228.82,2246.83,2225.81,2247.67],
  742. [2247.68,2241.92,2231.36,2250.85],
  743. [2238.9,2217.01,2205.87,2239.93],
  744. [2217.09,2224.8,2213.58,2225.19],
  745. [2221.34,2251.81,2210.77,2252.87],
  746. [2249.81,2282.87,2248.41,2288.09],
  747. [2286.33,2299.99,2281.9,2309.39],
  748. [2297.11,2305.11,2290.12,2305.3],
  749. [2303.75,2302.4,2292.43,2314.18],
  750. [2293.81,2275.67,2274.1,2304.95],
  751. [2281.45,2288.53,2270.25,2292.59],
  752. [2286.66,2293.08,2283.94,2301.7],
  753. [2293.4,2321.32,2281.47,2322.1],
  754. [2323.54,2324.02,2321.17,2334.33],
  755. [2316.25,2317.75,2310.49,2325.72],
  756. [2320.74,2300.59,2299.37,2325.53],
  757. [2300.21,2299.25,2294.11,2313.43],
  758. [2297.1,2272.42,2264.76,2297.1],
  759. [2270.71,2270.93,2260.87,2276.86],
  760. [2264.43,2242.11,2240.07,2266.69],
  761. [2242.26,2210.9,2205.07,2250.63],
  762. [2190.1,2148.35,2126.22,2190.1]
  763. ],
  764. markPoint : {
  765. symbol: 'star',
  766. //symbolSize:20,
  767. itemStyle:{
  768. normal:{label:{position:'top'}}
  769. },
  770. data : [
  771. {name : '最高', value : 2444.8, xAxis: '2013/2/18', yAxis: 2466}
  772. ]
  773. }
  774. }
  775. ]
  776. };
  777. </textarea>
  778. </div><!--/.well -->
  779. </div><!--/span-->
  780. <div md="graphic" class="span8">
  781. <div md="main" class="main"></div>
  782. <div>
  783. <button onclick="refresh(true, 3)">Refresh ~</button>
  784. <span md='wrong-message' style="color:red"></span>
  785. </div>
  786. </div><!--/span-->
  787. </div><!--/row-->
  788. </div><!--/.fluid-container-->
  789. <!--------4:pie--------->
  790. <div class="container-fluid" idx="4">
  791. <div class="row-fluid">
  792. <div md="sidebar-code" class="span4">
  793. <div class="well sidebar-nav">
  794. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  795. <textarea md="code" name="code">
  796. option = {
  797. tooltip : {
  798. show: true,
  799. formatter: "{a} <br/>{b} : {c} ({d}%)"
  800. },
  801. legend: {
  802. orient : 'vertical',
  803. x : 'left',
  804. data:['直达','营销广告','搜索引擎','邮件营销','联盟广告','视频广告','百度','谷歌','必应','其他']
  805. },
  806. toolbox: {
  807. show : true,
  808. feature : {
  809. mark : {show: true},
  810. dataView : {show: true, readOnly: false},
  811. restore : {show: true},
  812. saveAsImage : {show: true}
  813. }
  814. },
  815. calculable : true,
  816. series : [
  817. {
  818. name:'访问来源',
  819. type:'pie',
  820. center : ['35%', 200],
  821. radius : 80,
  822. itemStyle : {
  823. normal : {
  824. label : {
  825. position : 'inner',
  826. formatter : function (a,b,c,d) {return (d - 0).toFixed(0) + '%'},
  827. distance : 0.7
  828. },
  829. labelLine : {
  830. show : false
  831. }
  832. },
  833. emphasis : {
  834. label : {
  835. show : true,
  836. formatter : "{b}\n{d}%",
  837. distance : 0.6
  838. }
  839. }
  840. },
  841. data:[
  842. {value:335, name:'直达'},
  843. {value:679, name:'营销广告'},
  844. {value:1548, name:'搜索引擎'}
  845. ]
  846. },
  847. {
  848. name:'访问来源',
  849. type:'pie',
  850. center : ['35%', 200],
  851. radius : [110, 140],
  852. data:[
  853. {value:335, name:'直达'},
  854. {value:310, name:'邮件营销'},
  855. {value:234, name:'联盟广告'},
  856. {value:135, name:'视频广告'},
  857. {
  858. value:1048,
  859. name:'百度',
  860. itemStyle : {
  861. normal : {
  862. color : (function (){
  863. var zrColor = require('zrender/tool/color');
  864. return zrColor.getRadialGradient(
  865. 300, 200, 110, 300, 200, 140,
  866. [[0, 'rgba(255,255,0,1)'],[1, 'rgba(30,144,250,1)']]
  867. )
  868. })(),
  869. label : {
  870. textStyle : {
  871. color : 'rgba(30,144,255,0.8)',
  872. align : 'center',
  873. baseline : 'middle',
  874. fontFamily : '微软雅黑',
  875. fontSize : 30,
  876. fontWeight : 'bolder'
  877. }
  878. },
  879. labelLine : {
  880. length : 40,
  881. lineStyle : {
  882. color : '#f0f',
  883. width : 3,
  884. type : 'dotted'
  885. }
  886. }
  887. }
  888. }
  889. },
  890. {value:251, name:'谷歌'},
  891. {
  892. value:102,
  893. name:'必应',
  894. itemStyle : {
  895. normal : {
  896. label : {
  897. show : false
  898. },
  899. labelLine : {
  900. show : false
  901. }
  902. },
  903. emphasis : {
  904. label : {
  905. show : true
  906. },
  907. labelLine : {
  908. show : true,
  909. length : 50
  910. }
  911. }
  912. }
  913. },
  914. {value:147, name:'其他'}
  915. ]
  916. },
  917. {
  918. name:'访问来源',
  919. type:'pie',
  920. startAngle: 90,
  921. center : ['75%', 200],
  922. radius : [80, 120],
  923. itemStyle : {
  924. normal : {
  925. label : {
  926. show : false
  927. },
  928. labelLine : {
  929. show : false
  930. }
  931. },
  932. emphasis : {
  933. color: (function (){
  934. var zrColor = require('zrender/tool/color');
  935. return zrColor.getRadialGradient(
  936. 650, 200, 80, 650, 200, 120,
  937. [[0, 'rgba(255,255,0,1)'],[1, 'rgba(255,0,0,1)']]
  938. )
  939. })(),
  940. label : {
  941. show : true,
  942. position : 'center',
  943. formatter : "{d}%",
  944. textStyle : {
  945. color : 'red',
  946. fontSize : '30',
  947. fontFamily : '微软雅黑',
  948. fontWeight : 'bold'
  949. }
  950. }
  951. }
  952. },
  953. data:[
  954. {value:335, name:'直达'},
  955. {value:310, name:'邮件营销'},
  956. {value:234, name:'联盟广告'},
  957. {value:135, name:'视频广告'},
  958. {value:1548, name:'搜索引擎'}
  959. ],
  960. markPoint : {
  961. symbol: 'emptyHeart',
  962. data : [
  963. {name : '打酱油的标注', value : 100, x:'50%', y:'15%', symbolSize:32}
  964. ]
  965. }
  966. }
  967. ]
  968. };
  969. </textarea>
  970. </div><!--/.well -->
  971. </div><!--/span-->
  972. <div md="graphic" class="span8">
  973. <div md="main" class="main"></div>
  974. <div>
  975. <button onclick="refresh(true, 4)">Refresh ~</button>
  976. <span md='wrong-message' style="color:red"></span>
  977. </div>
  978. </div><!--/span-->
  979. </div><!--/row-->
  980. </div><!--/.fluid-container-->
  981. <!--------5:radar--------->
  982. <div class="container-fluid" idx="5">
  983. <div class="row-fluid">
  984. <div md="sidebar-code" class="span4">
  985. <div class="well sidebar-nav">
  986. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  987. <textarea md="code" name="code">
  988. option = {
  989. tooltip : {
  990. trigger: 'axis'
  991. },
  992. legend: {
  993. x : 'left',
  994. data:['图一','图二','图三']
  995. },
  996. toolbox: {
  997. show : true,
  998. feature : {
  999. mark : {show: true},
  1000. dataView : {show: true, readOnly: false},
  1001. restore : {show: true},
  1002. saveAsImage : {show: true}
  1003. }
  1004. },
  1005. polar : [
  1006. {
  1007. indicator : [
  1008. { text : '指标一' },
  1009. { text : '指标二' },
  1010. { text : '指标三' },
  1011. { text : '指标四' },
  1012. { text : '指标五' }
  1013. ],
  1014. center : ['25%',210],
  1015. radius : 150,
  1016. startAngle: 90,
  1017. splitNumber: 8,
  1018. name : {
  1019. formatter:'【{value}】',
  1020. textStyle: {color:'red'}
  1021. },
  1022. scale: true,
  1023. axisLine: { // 坐标轴线
  1024. show: true, // 默认显示,属性show控制显示与否
  1025. lineStyle: { // 属性lineStyle控制线条样式
  1026. color: 'green',
  1027. width: 2,
  1028. type: 'solid'
  1029. }
  1030. },
  1031. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  1032. show: false,
  1033. // formatter: null,
  1034. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1035. color: '#ccc'
  1036. }
  1037. },
  1038. splitArea : {
  1039. show : true,
  1040. areaStyle : {
  1041. color: ['rgba(250,0,250,0.3)','rgba(0,200,200,0.3)']
  1042. }
  1043. },
  1044. splitLine : {
  1045. show : true,
  1046. lineStyle : {
  1047. width : 2,
  1048. color : 'yellow'
  1049. }
  1050. }
  1051. },
  1052. {
  1053. indicator : [
  1054. { text : '语文', max : 150 },
  1055. { text : '数学', max : 150 },
  1056. { text : '英语', max : 150 },
  1057. { text : '物理', max : 120 },
  1058. { text : '化学', max : 108 },
  1059. { text : '生物', max : 72 }
  1060. ],
  1061. center : ['75%', 210],
  1062. radius : 150
  1063. }
  1064. ],
  1065. series : [
  1066. {
  1067. name: '雷达图',
  1068. type: 'radar',
  1069. itemStyle: {
  1070. emphasis: {
  1071. // color: 各异,
  1072. lineStyle: {
  1073. width: 4
  1074. }
  1075. }
  1076. },
  1077. data : [
  1078. {
  1079. value : [100, 8, 0.40, -80, 2000],
  1080. name : '图一',
  1081. symbol: 'star5',
  1082. symbolSize: 4, // 可计算特性参数,空数据拖拽提示图形大小
  1083. itemStyle: {
  1084. normal: {
  1085. lineStyle: {
  1086. type: 'dashed'
  1087. }
  1088. }
  1089. }
  1090. },
  1091. {
  1092. value : [10, 3, 0.20, -100, 1000],
  1093. name : '图二',
  1094. itemStyle: {
  1095. normal: {
  1096. areaStyle: {
  1097. type: 'default'
  1098. }
  1099. }
  1100. }
  1101. },
  1102. {
  1103. value : [20, 3, 0.3, -13.5, 3000],
  1104. name : '图三',
  1105. symbol: 'none', // 拐点图形类型,非标准参数
  1106. itemStyle: {
  1107. normal: {
  1108. lineStyle: {
  1109. type: 'dotted'
  1110. }
  1111. }
  1112. }
  1113. }
  1114. ]
  1115. },
  1116. {
  1117. name: '成绩单',
  1118. type: 'radar',
  1119. polarIndex : 1,
  1120. itemStyle: {
  1121. normal: {
  1122. areaStyle: {
  1123. type: 'default'
  1124. }
  1125. }
  1126. },
  1127. data : [
  1128. {
  1129. value : [120, 118, 130, 100, 99, 70],
  1130. name : '张三',
  1131. itemStyle: {
  1132. normal: {
  1133. areaStyle: {
  1134. color: (function (){
  1135. var zrColor = require('zrender/tool/color');
  1136. var x = 600
  1137. return zrColor.getRadialGradient(
  1138. x, 210, 0, x, 200, 150,
  1139. [[0, 'rgba(255,255,0,0.3)'],[1, 'rgba(255,0,0,0.5)']]
  1140. )
  1141. })()
  1142. }
  1143. }
  1144. }
  1145. },
  1146. {
  1147. value : [90, 113, 140, 30, 70, 60],
  1148. name : '李四',
  1149. itemStyle: {
  1150. normal: {
  1151. lineStyle: {
  1152. type: 'dashed'
  1153. }
  1154. }
  1155. }
  1156. }
  1157. ],
  1158. markPoint : {
  1159. symbol: 'emptyHeart',
  1160. data : [
  1161. {name : '打酱油的标注', value : 100, x:'50%', y:'15%', symbolSize:32}
  1162. ]
  1163. }
  1164. }
  1165. ]
  1166. };
  1167. </textarea>
  1168. </div><!--/.well -->
  1169. </div><!--/span-->
  1170. <div md="graphic" class="span8">
  1171. <div md="main" class="main"></div>
  1172. <div>
  1173. <button onclick="refresh(true, 5)">Refresh ~</button>
  1174. <span md='wrong-message' style="color:red"></span>
  1175. </div>
  1176. </div><!--/span-->
  1177. </div><!--/row-->
  1178. </div><!--/.fluid-container-->
  1179. <!--------6:chord--------->
  1180. <div class="container-fluid" idx="6">
  1181. <div class="row-fluid">
  1182. <div md="sidebar-code" class="span4">
  1183. <div class="well sidebar-nav">
  1184. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  1185. <textarea md="code" name="code">
  1186. option = {
  1187. title : {
  1188. text: '测试数据'
  1189. },
  1190. tooltip : {
  1191. trigger: 'item'
  1192. },
  1193. toolbox: {
  1194. show : true,
  1195. y: 'bottom',
  1196. feature : {
  1197. restore : {show: true},
  1198. magicType: {show: true, type: ['force', 'chord']},
  1199. saveAsImage : {show: true}
  1200. }
  1201. },
  1202. legend: {
  1203. x: 'right',
  1204. data:['g1','g2', 'g3', 'g4']
  1205. },
  1206. series : [
  1207. {
  1208. type:'chord',
  1209. radius : ['55%', '75%'],
  1210. center : ['50%', '50%'],
  1211. padding : 2,
  1212. sort : 'descending', // can be 'none', 'ascending', 'descending'
  1213. sortSub : 'descending', // can be 'none', 'ascending', 'descending'
  1214. startAngle : 90,
  1215. clockWise : false,
  1216. showScale : true,
  1217. showScaleText : true,
  1218. itemStyle : {
  1219. normal : {
  1220. lineStyle : {
  1221. width : 0,
  1222. color : '#000'
  1223. },
  1224. chordStyle : {
  1225. lineStyle : {
  1226. width : 1,
  1227. color : '#333'
  1228. }
  1229. },
  1230. label: {
  1231. show: true,
  1232. color: 'red'
  1233. }
  1234. },
  1235. emphasis : {
  1236. lineStyle : {
  1237. width : 0,
  1238. color : '#000'
  1239. },
  1240. chordStyle : {
  1241. lineStyle : {
  1242. width : 2,
  1243. color : 'black'
  1244. }
  1245. }
  1246. }
  1247. },
  1248. data : [
  1249. {
  1250. name : 'g1',
  1251. itemStyle : {
  1252. normal: {
  1253. color: 'rgba(255,30,30,0.5)',
  1254. lineStyle : {
  1255. width: 1,
  1256. color: 'green'
  1257. }
  1258. },
  1259. emphasis: {
  1260. color: 'yellow',
  1261. lineStyle : {
  1262. width: 2,
  1263. color: 'blue'
  1264. }
  1265. }
  1266. }
  1267. },
  1268. {name : 'g2'},
  1269. {name : 'g3'},
  1270. {name : 'g4'}
  1271. ],
  1272. matrix : [
  1273. [11975, 5871, 8916, 2868],
  1274. [ 1951, 10048, 2060, 6171],
  1275. [ 8010, 16145, 8090, 8045],
  1276. [ 1013, 990, 940, 6907]
  1277. ],
  1278. markPoint : {
  1279. symbol: 'star',
  1280. data : [
  1281. {name : '打酱油的标注', value : 100, x:'5%', y:'50%', symbolSize:32},
  1282. {name : '打酱油的标注', value : 100, x:'95%', y:'50%', symbolSize:32}
  1283. ]
  1284. }
  1285. }
  1286. ]
  1287. };
  1288. </textarea>
  1289. </div><!--/.well -->
  1290. </div><!--/span-->
  1291. <div md="graphic" class="span8">
  1292. <div md="main" class="main"></div>
  1293. <div>
  1294. <button onclick="refresh(true, 6)">Refresh ~</button>
  1295. <span md='wrong-message' style="color:red"></span>
  1296. </div>
  1297. </div><!--/span-->
  1298. </div><!--/row-->
  1299. </div><!--/.fluid-container-->
  1300. <!--------7:force--------->
  1301. <div class="container-fluid" idx="7">
  1302. <div class="row-fluid">
  1303. <div md="sidebar-code" class="span4">
  1304. <div class="well sidebar-nav">
  1305. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  1306. <textarea md="code" name="code">
  1307. option = {
  1308. title : {
  1309. text: '人物关系:乔布斯',
  1310. subtext: '数据来自人立方',
  1311. x:'right',
  1312. y:'bottom'
  1313. },
  1314. tooltip : {
  1315. trigger: 'item',
  1316. formatter: '{a} : {b}'
  1317. },
  1318. toolbox: {
  1319. show : true,
  1320. feature : {
  1321. restore : {show: true},
  1322. magicType: {show: true, type: ['force', 'chord']},
  1323. saveAsImage : {show: true}
  1324. }
  1325. },
  1326. legend: {
  1327. x: 'left',
  1328. data:['家人','朋友']
  1329. },
  1330. series : [
  1331. {
  1332. type:'force',
  1333. ribbonType: false,
  1334. name : "人物关系",
  1335. categories : [
  1336. {
  1337. name: '人物',
  1338. itemStyle: {
  1339. normal: {
  1340. color : '#ff7f50'
  1341. }
  1342. }
  1343. },
  1344. {
  1345. name: '家人',
  1346. itemStyle: {
  1347. normal: {
  1348. color : '#87cdfa'
  1349. }
  1350. }
  1351. },
  1352. {
  1353. name:'朋友',
  1354. itemStyle: {
  1355. normal: {
  1356. color : '#9acd32'
  1357. }
  1358. }
  1359. }
  1360. ],
  1361. itemStyle: {
  1362. normal: {
  1363. label: {
  1364. show: true,
  1365. textStyle: {
  1366. color: '#800080'
  1367. }
  1368. },
  1369. nodeStyle : {
  1370. brushType : 'both',
  1371. strokeColor : 'rgba(255,215,0,0.4)',
  1372. lineWidth : 8
  1373. }
  1374. },
  1375. emphasis: {
  1376. label: {
  1377. show: false
  1378. // textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
  1379. },
  1380. nodeStyle : {
  1381. r: 30
  1382. },
  1383. linkStyle : {}
  1384. }
  1385. },
  1386. minRadius : 15,
  1387. maxRadius : 25,
  1388. density : 0.05,
  1389. attractiveness: 1.2,
  1390. nodes:[
  1391. {category:0, name: '乔布斯', value : 10},
  1392. {category:1, name: '丽萨-乔布斯',value : 2},
  1393. {category:1, name: '保罗-乔布斯',value : 3},
  1394. {category:1, name: '克拉拉-乔布斯',value : 3},
  1395. {category:1, name: '劳伦-鲍威尔',value : 7},
  1396. {category:2, name: '史蒂夫-沃兹尼艾克',value : 5},
  1397. {category:2, name: '奥巴马',value : 8},
  1398. {category:2, name: '比尔-盖茨',value : 9},
  1399. {category:2, name: '乔纳森-艾夫',value : 4},
  1400. {category:2, name: '蒂姆-库克',value : 4},
  1401. {category:2, name: '龙-韦恩',value : 1},
  1402. ],
  1403. links : [
  1404. {source : 1, target : 0, weight : 1},
  1405. {source : 2, target : 0, weight : 2},
  1406. {source : 3, target : 0, weight : 1},
  1407. {source : 4, target : 0, weight : 2},
  1408. {source : 5, target : 0, weight : 3},
  1409. {source : 6, target : 0, weight : 6},
  1410. {source : 7, target : 0, weight : 6},
  1411. {source : 8, target : 0, weight : 1},
  1412. {source : 9, target : 0, weight : 1},
  1413. {source : 10, target : 0, weight : 1},
  1414. {source : 3, target : 2, weight : 1},
  1415. {source : 6, target : 2, weight : 1},
  1416. {source : 6, target : 3, weight : 1},
  1417. {source : 6, target : 4, weight : 1},
  1418. {source : 6, target : 5, weight : 1},
  1419. {source : 7, target : 6, weight : 6},
  1420. {source : 7, target : 3, weight : 1},
  1421. {source : 9, target : 6, weight : 1}
  1422. ],
  1423. markPoint : {
  1424. symbol: 'emptyCircle',
  1425. data : [
  1426. {name : '打酱油的标注', value : 100, x:'5%', y:'50%', symbolSize:32},
  1427. {name : '打酱油的标注', value : 100, x:'95%', y:'50%', symbolSize:32}
  1428. ]
  1429. }
  1430. }
  1431. ]
  1432. };
  1433. </textarea>
  1434. </div><!--/.well -->
  1435. </div><!--/span-->
  1436. <div md="graphic" class="span8">
  1437. <div md="main" class="main"></div>
  1438. <div>
  1439. <button onclick="refresh(true, 7)">Refresh ~</button>
  1440. <span md='wrong-message' style="color:red"></span>
  1441. </div>
  1442. </div><!--/span-->
  1443. </div><!--/row-->
  1444. </div><!--/.fluid-container-->
  1445. <!--------8:map--------->
  1446. <div class="container-fluid" idx="8">
  1447. <div class="row-fluid">
  1448. <div md="sidebar-code" class="span4">
  1449. <div class="well sidebar-nav">
  1450. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  1451. <textarea md="code" name="code">
  1452. option = {
  1453. roamController: {
  1454. show: true,
  1455. x: 'right',
  1456. mapTypeControl: {
  1457. 'china': true
  1458. }
  1459. },
  1460. series : [
  1461. {
  1462. name: 'Map',
  1463. type: 'map',
  1464. mapLocation: {
  1465. x : 'left',
  1466. y : 'top'
  1467. },
  1468. selectedMode: 'multiple',
  1469. itemStyle: {
  1470. normal: {
  1471. borderWidth:2,
  1472. borderColor:'lightgreen',
  1473. color: 'orange',
  1474. label: {
  1475. show: false
  1476. }
  1477. },
  1478. emphasis: { // 也是选中样式
  1479. borderWidth:2,
  1480. borderColor:'#fff',
  1481. color: '#32cd32',
  1482. label: {
  1483. show: true,
  1484. textStyle: {
  1485. color: '#fff'
  1486. }
  1487. }
  1488. }
  1489. },
  1490. data:[
  1491. {
  1492. name: '广东',
  1493. value: Math.round(Math.random()*1000),
  1494. itemStyle: {
  1495. normal: {
  1496. color: '#32cd32',
  1497. label: {
  1498. show: true,
  1499. textStyle: {
  1500. color: '#fff',
  1501. fontSize: 15
  1502. }
  1503. }
  1504. },
  1505. emphasis: { // 也是选中样式
  1506. borderWidth:5,
  1507. borderColor:'yellow',
  1508. color: '#cd5c5c',
  1509. label: {
  1510. show: false,
  1511. textStyle: {
  1512. color: 'blue'
  1513. }
  1514. }
  1515. }
  1516. }
  1517. }
  1518. ],
  1519. markPoint : {
  1520. itemStyle : {
  1521. normal:{
  1522. color:'skyblue'
  1523. }
  1524. },
  1525. data : [
  1526. {name : '天津', value : 350},
  1527. {name : '上海', value : 103}
  1528. ]
  1529. },
  1530. geoCoord: {
  1531. '上海': [121.4648,31.2891],
  1532. '天津': [117.4219,39.4189]
  1533. }
  1534. }
  1535. ]
  1536. };
  1537. </textarea>
  1538. </div><!--/.well -->
  1539. </div><!--/span-->
  1540. <div md="graphic" class="span8">
  1541. <div md="main" class="main"></div>
  1542. <div>
  1543. <button onclick="refresh(true, 8)">Refresh ~</button>
  1544. <span md='wrong-message' style="color:red"></span>
  1545. </div>
  1546. </div><!--/span-->
  1547. </div><!--/row-->
  1548. <!--------9:gauge--------->
  1549. <div class="container-fluid" idx='9'>
  1550. <div class="row-fluid">
  1551. <div md="sidebar-code" class="span4">
  1552. <div class="well sidebar-nav">
  1553. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  1554. <textarea md="code" name="code">
  1555. option = {
  1556. tooltip : {
  1557. formatter: "{a} <br/>{b} : {c}%"
  1558. },
  1559. toolbox: {
  1560. show : true,
  1561. feature : {
  1562. mark : {show: true},
  1563. restore : {show: true},
  1564. saveAsImage : {show: true}
  1565. }
  1566. },
  1567. series : [
  1568. {
  1569. name:'个性化仪表盘',
  1570. type:'gauge',
  1571. center : ['50%', '50%'], // 默认全局居中
  1572. radius : [0, '75%'],
  1573. startAngle: 140,
  1574. endAngle : -140,
  1575. min: 0, // 最小值
  1576. max: 100, // 最大值
  1577. precision: 0, // 小数精度,默认为0,无小数点
  1578. splitNumber: 10, // 分割段数,默认为5
  1579. axisLine: { // 坐标轴线
  1580. show: true, // 默认显示,属性show控制显示与否
  1581. lineStyle: { // 属性lineStyle控制线条样式
  1582. color: [[0.2, 'lightgreen'],[0.4, 'orange'],[0.8, 'skyblue'],[1, '#ff4500']],
  1583. width: 30
  1584. }
  1585. },
  1586. axisTick: { // 坐标轴小标记
  1587. show: true, // 属性show控制显示与否,默认不显示
  1588. splitNumber: 5, // 每份split细分多少段
  1589. length :8, // 属性length控制线长
  1590. lineStyle: { // 属性lineStyle控制线条样式
  1591. color: '#eee',
  1592. width: 1,
  1593. type: 'solid'
  1594. }
  1595. },
  1596. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  1597. show: true,
  1598. formatter: function(v){
  1599. switch (v+''){
  1600. case '10': return '弱';
  1601. case '30': return '低';
  1602. case '60': return '中';
  1603. case '90': return '高';
  1604. default: return '';
  1605. }
  1606. },
  1607. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1608. color: '#333'
  1609. }
  1610. },
  1611. splitLine: { // 分隔线
  1612. show: true, // 默认显示,属性show控制显示与否
  1613. length :30, // 属性length控制线长
  1614. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  1615. color: '#eee',
  1616. width: 2,
  1617. type: 'solid'
  1618. }
  1619. },
  1620. pointer : {
  1621. length : '80%',
  1622. width : 8,
  1623. color : 'auto'
  1624. },
  1625. title : {
  1626. show : true,
  1627. offsetCenter: ['-65%', -10], // x, y,单位px
  1628. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1629. color: '#333',
  1630. fontSize : 15
  1631. }
  1632. },
  1633. detail : {
  1634. show : true,
  1635. backgroundColor: 'rgba(0,0,0,0)',
  1636. borderWidth: 0,
  1637. borderColor: '#ccc',
  1638. width: 100,
  1639. height: 40,
  1640. offsetCenter: ['-60%', 10], // x, y,单位px
  1641. formatter:'{value}%',
  1642. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1643. color: 'auto',
  1644. fontSize : 30
  1645. }
  1646. },
  1647. data:[{value: 50, name: '仪表盘'}]
  1648. }
  1649. ]
  1650. };
  1651. </textarea>
  1652. </div><!--/.well -->
  1653. </div><!--/span-->
  1654. <div md="graphic" class="span8">
  1655. <div md="main" class="main"></div>
  1656. <div>
  1657. <button onclick="refresh(true, 9)">Refresh ~</button>
  1658. <span md='wrong-message' style="color:red"></span>
  1659. </div>
  1660. </div><!--/span-->
  1661. </div><!--/row-->
  1662. </div><!--/.fluid-container-->
  1663. <!--------10:funnel--------->
  1664. <div class="container-fluid" idx='10'>
  1665. <div class="row-fluid">
  1666. <div md="sidebar-code" class="span4">
  1667. <div class="well sidebar-nav">
  1668. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  1669. <textarea md="code" name="code">
  1670. option = {
  1671. title : {
  1672. text: '漏斗图',
  1673. subtext: '纯属虚构'
  1674. },
  1675. tooltip : {
  1676. trigger: 'item',
  1677. formatter: "{a} <br/>{b} : {c}%"
  1678. },
  1679. toolbox: {
  1680. show : true,
  1681. feature : {
  1682. mark : {show: true},
  1683. dataView : {show: true, readOnly: false},
  1684. restore : {show: true},
  1685. saveAsImage : {show: true}
  1686. }
  1687. },
  1688. legend: {
  1689. data : ['展现','点击','访问','咨询','订单']
  1690. },
  1691. calculable : true,
  1692. series : [
  1693. {
  1694. name:'漏斗图',
  1695. type:'funnel',
  1696. x: '10%',
  1697. y: 60,
  1698. //x2: 80,
  1699. y2: 60,
  1700. width: '80%',
  1701. // height: {totalHeight} - y - y2,
  1702. min: 0,
  1703. max: 100,
  1704. minSize: '0%',
  1705. maxSize: '100%',
  1706. sort : 'descending', // 'ascending', 'descending'
  1707. gap : 10,
  1708. itemStyle: {
  1709. normal: {
  1710. // color: 各异,
  1711. borderColor: '#fff',
  1712. borderWidth: 1,
  1713. label: {
  1714. show: true,
  1715. position: 'inside'
  1716. // textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
  1717. },
  1718. labelLine: {
  1719. show: false,
  1720. length: 10,
  1721. lineStyle: {
  1722. // color: 各异,
  1723. width: 1,
  1724. type: 'solid'
  1725. }
  1726. }
  1727. },
  1728. emphasis: {
  1729. // color: 各异,
  1730. borderColor: 'red',
  1731. borderWidth: 5,
  1732. label: {
  1733. show: true,
  1734. formatter: '{b}:{c}%',
  1735. textStyle:{
  1736. fontSize:20
  1737. }
  1738. },
  1739. labelLine: {
  1740. show: true
  1741. }
  1742. }
  1743. },
  1744. data:[
  1745. {value:60, name:'访问'},
  1746. {value:40, name:'咨询'},
  1747. {value:20, name:'订单'},
  1748. {value:80, name:'点击'},
  1749. {value:100, name:'展现'}
  1750. ]
  1751. }
  1752. ]
  1753. };
  1754. </textarea>
  1755. </div><!--/.well -->
  1756. </div><!--/span-->
  1757. <div md="graphic" class="span8">
  1758. <div md="main" class="main"></div>
  1759. <div>
  1760. <button onclick="refresh(true, 10)">Refresh ~</button>
  1761. <span md='wrong-message' style="color:red"></span>
  1762. </div>
  1763. </div><!--/span-->
  1764. </div><!--/row-->
  1765. </div><!--/.fluid-container-->
  1766. <!--------11:eventRiver--------->
  1767. <div class="container-fluid" idx='11'>
  1768. <div class="row-fluid">
  1769. <div md="sidebar-code" class="span4">
  1770. <div class="well sidebar-nav">
  1771. <div class="nav-header"><a href="#" onclick="autoResize()" class="icon-resize-full" md ="icon-resize" ></a>option</div>
  1772. <textarea md="code" name="code">
  1773. option = {
  1774. title : {
  1775. text: 'Event River',
  1776. subtext: '纯属虚构'
  1777. },
  1778. tooltip : {
  1779. trigger: 'item'
  1780. },
  1781. legend: {
  1782. data:['财经事件']
  1783. },
  1784. toolbox: {
  1785. show : true,
  1786. feature : {
  1787. mark : {show: true},
  1788. restore : {show: true},
  1789. saveAsImage : {show: true}
  1790. }
  1791. },
  1792. xAxis : [
  1793. {
  1794. type : 'time',
  1795. boundaryGap: [0.05,0.1]
  1796. }
  1797. ],
  1798. series : [
  1799. {
  1800. "name": "财经事件",
  1801. "type": "eventRiver",
  1802. "weight": 123,
  1803. "eventList": [
  1804. {
  1805. "name": "阿里巴巴上市",
  1806. "weight": 123,
  1807. "evolution": [
  1808. {
  1809. "time": "2014-05-01",
  1810. "value": 14,
  1811. "detail": {
  1812. "link": "http://www.baidu.com",
  1813. "text": "百度指数",
  1814. "img": '../../doc/asset/ico/favicon.png'
  1815. }
  1816. },
  1817. {
  1818. "time": "2014-05-02",
  1819. "value": 34,
  1820. "detail": {
  1821. "link": "http://www.baidu.com",
  1822. "text": "百度指数",
  1823. "img": '../../doc/asset/ico/favicon.png'
  1824. }
  1825. },
  1826. {
  1827. "time": "2014-05-03",
  1828. "value": 60,
  1829. "detail": {
  1830. "link": "http://www.baidu.com",
  1831. "text": "百度指数",
  1832. "img": '../../doc/asset/ico/favicon.png'
  1833. }
  1834. },
  1835. {
  1836. "time": "2014-05-04",
  1837. "value": 40,
  1838. "detail": {
  1839. "link": "http://www.baidu.com",
  1840. "text": "百度指数",
  1841. "img": '../../doc/asset/ico/favicon.png'
  1842. }
  1843. },
  1844. {
  1845. "time": "2014-05-05",
  1846. "value": 10,
  1847. "detail": {
  1848. "link": "http://www.baidu.com",
  1849. "text": "百度指数",
  1850. "img": '../../doc/asset/ico/favicon.png'
  1851. }
  1852. }
  1853. ]
  1854. },
  1855. {
  1856. "name": "阿里巴巴上市2",
  1857. "weight": 123,
  1858. "evolution": [
  1859. {
  1860. "time": "2014-05-02",
  1861. "value": 10,
  1862. "detail": {
  1863. "link": "www.baidu.com",
  1864. "text": "百度指数",
  1865. "img": '../../doc/asset/ico/favicon.png'
  1866. }
  1867. },
  1868. {
  1869. "time": "2014-05-03",
  1870. "value": 34,
  1871. "detail": {
  1872. "link": "http://www.baidu.com",
  1873. "text": "百度指数",
  1874. "img": '../../doc/asset/ico/favicon.png'
  1875. }
  1876. },
  1877. {
  1878. "time": "2014-05-04",
  1879. "value": 40,
  1880. "detail": {
  1881. "link": "http://www.baidu.com",
  1882. "text": "百度指数",
  1883. "img": '../../doc/asset/ico/favicon.png'
  1884. }
  1885. },
  1886. {
  1887. "time": "2014-05-05",
  1888. "value": 10,
  1889. "detail": {
  1890. "link": "http://www.baidu.com",
  1891. "text": "百度指数",
  1892. "img": '../../doc/asset/ico/favicon.png'
  1893. }
  1894. }
  1895. ]
  1896. },
  1897. {
  1898. "name": "三星业绩暴跌",
  1899. "weight": 123,
  1900. "evolution": [
  1901. {
  1902. "time": "2014-05-03",
  1903. "value": 24,
  1904. "detail": {
  1905. "link": "www.baidu.com",
  1906. "text": "百度指数",
  1907. "img": '../../doc/asset/ico/favicon.png'
  1908. }
  1909. },
  1910. {
  1911. "time": "2014-05-04",
  1912. "value": 34,
  1913. "detail": {
  1914. "link": "http://www.baidu.com",
  1915. "text": "百度指数",
  1916. "img": '../../doc/asset/ico/favicon.png'
  1917. }
  1918. },
  1919. {
  1920. "time": "2014-05-05",
  1921. "value": 50,
  1922. "detail": {
  1923. "link": "http://www.baidu.com",
  1924. "text": "百度指数",
  1925. "img": '../../doc/asset/ico/favicon.png'
  1926. }
  1927. },
  1928. {
  1929. "time": "2014-05-06",
  1930. "value": 30,
  1931. "detail": {
  1932. "link": "http://www.baidu.com",
  1933. "text": "百度指数",
  1934. "img": '../../doc/asset/ico/favicon.png'
  1935. }
  1936. },
  1937. {
  1938. "time": "2014-05-07",
  1939. "value": 20,
  1940. "detail": {
  1941. "link": "http://www.baidu.com",
  1942. "text": "百度指数",
  1943. "img": '../../doc/asset/ico/favicon.png'
  1944. }
  1945. }
  1946. ]
  1947. }
  1948. ],
  1949. markPoint : {
  1950. symbol: 'emptyCircle',
  1951. data : [
  1952. {name : '打酱油的标注', value : 100, x:'5%', y:'50%', symbolSize:32},
  1953. {name : '打酱油的标注', value : 100, x:'95%', y:'50%', symbolSize:32}
  1954. ]
  1955. }
  1956. }
  1957. ]
  1958. };
  1959. </textarea>
  1960. </div><!--/.well -->
  1961. </div><!--/span-->
  1962. <div md="graphic" class="span8">
  1963. <div md="main" class="main"></div>
  1964. <div>
  1965. <button onclick="refresh(true, 11)">Refresh ~</button>
  1966. <span md='wrong-message' style="color:red"></span>
  1967. </div>
  1968. </div><!--/span-->
  1969. </div><!--/row-->
  1970. </div><!--/.fluid-container-->
  1971. <hr>
  1972. <!-- FOOTER -->
  1973. <footer>
  1974. <p class="pull-right"><a href="#">Back to top</a></p>
  1975. <p>&copy; 2014 <a href="http://efe.baidu.com" target="_blank">EFE</a> &middot; <a href="https://github.com/ecomfe/echarts/blob/master/LICENSE.txt" target="_blank">License</a> &middot; <a href="../../doc/changelog.html" target="_blank">Changelog</a></p>
  1976. </footer>
  1977. </div><!--/.fluid-container-->
  1978. <script src="../../doc/asset/js/jquery.js"></script>
  1979. <script src="all.js"></script>
  1980. </body>
  1981. </html>