whyEcharts.js 144 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617
  1. var developMode = false;
  2. if (developMode) {
  3. window.esl = null;
  4. window.define = null;
  5. window.require = null;
  6. (function () {
  7. var script = document.createElement('script');
  8. script.async = true;
  9. var pathname = location.pathname;
  10. var pathSegs = pathname.slice(pathname.indexOf('doc')).split('/');
  11. var pathLevelArr = new Array(pathSegs.length - 1);
  12. script.src = pathLevelArr.join('../') + 'asset/js/esl/esl.js';
  13. if (script.readyState) {
  14. script.onreadystatechange = fireLoad;
  15. }
  16. else {
  17. script.onload = fireLoad;
  18. }
  19. (document.getElementsByTagName('head')[0] || document.body).appendChild(script);
  20. function fireLoad() {
  21. script.onload = script.onreadystatechange = null;
  22. setTimeout(loadedListener,100);
  23. }
  24. function loadedListener() {
  25. // for develop
  26. require.config({
  27. paths : {
  28. webkitDep : '../../doc/example/webkit-dep'
  29. },
  30. packages: [
  31. {
  32. name: 'echarts',
  33. location: '../../src',
  34. main: 'echarts'
  35. },
  36. {
  37. name: 'zrender',
  38. //location: 'http://ecomfe.github.io/zrender/src',
  39. location: '../../../zrender/src',
  40. main: 'zrender'
  41. }
  42. ]
  43. });
  44. launchExample();
  45. }
  46. })();
  47. }
  48. else {
  49. // for echarts online home page
  50. require.config({
  51. paths:{
  52. echarts: '../../doc/example/www/js',
  53. webkitDep : '../../doc/example/webkit-dep'
  54. }
  55. });
  56. launchExample();
  57. }
  58. var theme = {
  59. backgroundColor:'#fff',
  60. color: [
  61. '#5d9cec', '#62c87f', '#f15755', '#fc863f', '#7053b6',
  62. '#6ed5e6','#ffce55', '#f57bc1', '#dcb186', '#647c9d'
  63. ],
  64. symbolList : [
  65. 'emptyCircle', 'emptyRectangle', 'emptyTriangle', 'emptyDiamond',
  66. 'circle', 'rectangle', 'triangle', 'diamond'
  67. ],
  68. k: {
  69. itemStyle: {
  70. normal: {
  71. color: '#ff3200', // 阳线填充颜色
  72. color0: '#00aa11', // 阴线填充颜色
  73. lineStyle: {
  74. width: 1,
  75. color: '#ff3200', // 阳线边框颜色
  76. color0: '#00aa11' // 阴线边框颜色
  77. }
  78. }
  79. }
  80. }
  81. }
  82. var echarts;
  83. var webkitDepData;
  84. var isExampleLaunched;
  85. function launchExample() {
  86. if (isExampleLaunched) {
  87. return;
  88. }
  89. // 按需加载
  90. isExampleLaunched = 1;
  91. require(
  92. [
  93. 'echarts',
  94. 'webkitDep',
  95. 'echarts/chart/line',
  96. 'echarts/chart/bar',
  97. 'echarts/chart/scatter',
  98. 'echarts/chart/k',
  99. 'echarts/chart/pie',
  100. 'echarts/chart/radar',
  101. 'echarts/chart/force',
  102. 'echarts/chart/chord',
  103. 'echarts/chart/map',
  104. 'echarts/chart/gauge',
  105. 'echarts/chart/funnel'
  106. ],
  107. function (ec, wd) {
  108. echarts = ec;
  109. webkitDepData = wd;
  110. webkitDepData.minRadius = 5;
  111. webkitDepData.maxRadius = 8;
  112. webkitDepData.density = 1.1;
  113. webkitDepData.attractiveness = 1.3;
  114. webkitDepData.itemStyle = {
  115. normal : {
  116. linkStyle : {
  117. opacity : 0.6
  118. }
  119. }
  120. }
  121. optionMap.force2.series[0] = webkitDepData;
  122. optionMap.force2.color = ['#ff7f50','#87cefa','#da70d6','#32cd32','#6495ed',
  123. '#ff69b4','#ba55d3','#cd5c5c','#ffa500','#40e0d0',
  124. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  125. '#6699FF','#ff6666','#3cb371','#b8860b','#30e0e0'];
  126. if (typeof curEvent != 'undefined') {
  127. clearTimeout(showChartTimer);
  128. getCurParams();
  129. showChart()
  130. //showChartTimer = setTimeout(showChart, 500);
  131. }
  132. }
  133. );
  134. }
  135. var curEvent;
  136. var showChartTimer;
  137. Reveal.addEventListener( 'ready', function (event){
  138. clearTimeout(showChartTimer);
  139. curEvent = event;
  140. getCurParams();
  141. showChartTimer = setTimeout(showChart, 800);
  142. });
  143. Reveal.addEventListener( 'slidechanged', function (event){
  144. clearTimeout(showChartTimer);
  145. curEvent = event;
  146. getCurParams();
  147. showChartTimer = setTimeout(showChart, 800);
  148. });
  149. var myChart;
  150. var myChart2;
  151. var myChart3;
  152. var timeTicket;
  153. var dom;
  154. var optionKey;
  155. function getCurParams(){
  156. clearInterval(timeTicket);
  157. var len = curEvent.currentSlide.childNodes.length;
  158. while(--len) {
  159. dom = curEvent.currentSlide.childNodes[len];
  160. if (dom.className == 'main'){
  161. optionKey = dom.getAttribute('optionKey');
  162. if (optionKey == 'multiCharts') {
  163. if (myChart2 && myChart2.dispose) {
  164. myChart2.getDom().className = 'main';
  165. myChart2.dispose();
  166. myChart2 = null;
  167. }
  168. if (myChart3 && myChart3.dispose) {
  169. myChart3.getDom().className = 'main';
  170. myChart3.dispose();
  171. myChart3 = null;
  172. }
  173. }
  174. return;
  175. }
  176. }
  177. optionKey = false;
  178. }
  179. function showChart() {
  180. if (!echarts) {return;}
  181. if (myChart && myChart.dispose) {
  182. myChart.getDom().className = 'main';
  183. myChart.dispose();
  184. myChart = null;
  185. }
  186. if (optionKey) {
  187. myChart = echarts.init(dom, theme);
  188. var option = optionMap[optionKey];
  189. dom.className = 'main noLoading';
  190. myChart.setOption(option);
  191. if (functionMap[optionKey]) {
  192. functionMap[optionKey]();
  193. }
  194. }
  195. }
  196. var axisData = [
  197. "2013/1/24", "2013/1/25", "2013/1/28", "2013/1/29", "2013/1/30",
  198. "2013/1/31", "2013/2/1", "2013/2/4", "2013/2/5", "2013/2/6",
  199. "2013/2/7", "2013/2/8", "2013/2/18", "2013/2/19", "2013/2/20",
  200. "2013/2/21", "2013/2/22", "2013/2/25", "2013/2/26", "2013/2/27",
  201. "2013/2/28", "2013/3/1", "2013/3/4", "2013/3/5", "2013/3/6",
  202. "2013/3/7", "2013/3/8", "2013/3/11", "2013/3/12", "2013/3/13",
  203. "2013/3/14", "2013/3/15", "2013/3/18", "2013/3/19", "2013/3/20",
  204. "2013/3/21", "2013/3/22", "2013/3/25", "2013/3/26", "2013/3/27",
  205. "2013/3/28", "2013/3/29", "2013/4/1", "2013/4/2", "2013/4/3",
  206. "2013/4/8", "2013/4/9", "2013/4/10", "2013/4/11", "2013/4/12",
  207. "2013/4/15", "2013/4/16", "2013/4/17", "2013/4/18", "2013/4/19",
  208. "2013/4/22", "2013/4/23", "2013/4/24", "2013/4/25", "2013/4/26",
  209. "2013/5/2", "2013/5/3", "2013/5/6", "2013/5/7", "2013/5/8",
  210. "2013/5/9", "2013/5/10", "2013/5/13", "2013/5/14", "2013/5/15",
  211. "2013/5/16", "2013/5/17", "2013/5/20", "2013/5/21", "2013/5/22",
  212. "2013/5/23", "2013/5/24", "2013/5/27", "2013/5/28", "2013/5/29",
  213. "2013/5/30", "2013/5/31", "2013/6/3", "2013/6/4", "2013/6/5",
  214. "2013/6/6", "2013/6/7", "2013/6/13"
  215. ];
  216. var kData = [ // 开盘,收盘,最低,最高
  217. [2320.26,2302.6,2287.3,2362.94],
  218. [2300,2291.3,2288.26,2308.38],
  219. [2295.35,2346.5,2295.35,2346.92],
  220. [2347.22,2358.98,2337.35,2363.8],
  221. [2360.75,2382.48,2347.89,2383.76],
  222. [2383.43,2385.42,2371.23,2391.82],
  223. [2377.41,2419.02,2369.57,2421.15],
  224. [2425.92,2428.15,2417.58,2440.38],
  225. [2411,2433.13,2403.3,2437.42],
  226. [2432.68,2434.48,2427.7,2441.73],
  227. [2430.69,2418.53,2394.22,2433.89],
  228. [2416.62,2432.4,2414.4,2443.03],
  229. [2441.91,2421.56,2415.43,2444.8],
  230. [2420.26,2382.91,2373.53,2427.07],
  231. [2383.49,2397.18,2370.61,2397.94],
  232. [2378.82,2325.95,2309.17,2378.82],
  233. [2322.94,2314.16,2308.76,2330.88],
  234. [2320.62,2325.82,2315.01,2338.78],
  235. [2313.74,2293.34,2289.89,2340.71],
  236. [2297.77,2313.22,2292.03,2324.63],
  237. [2322.32,2365.59,2308.92,2366.16],
  238. [2364.54,2359.51,2330.86,2369.65],
  239. [2332.08,2273.4,2259.25,2333.54],
  240. [2274.81,2326.31,2270.1,2328.14],
  241. [2333.61,2347.18,2321.6,2351.44],
  242. [2340.44,2324.29,2304.27,2352.02],
  243. [2326.42,2318.61,2314.59,2333.67],
  244. [2314.68,2310.59,2296.58,2320.96],
  245. [2309.16,2286.6,2264.83,2333.29],
  246. [2282.17,2263.97,2253.25,2286.33],
  247. [2255.77,2270.28,2253.31,2276.22],
  248. [2269.31,2278.4,2250,2312.08],
  249. [2267.29,2240.02,2239.21,2276.05],
  250. [2244.26,2257.43,2232.02,2261.31],
  251. [2257.74,2317.37,2257.42,2317.86],
  252. [2318.21,2324.24,2311.6,2330.81],
  253. [2321.4,2328.28,2314.97,2332],
  254. [2334.74,2326.72,2319.91,2344.89],
  255. [2318.58,2297.67,2281.12,2319.99],
  256. [2299.38,2301.26,2289,2323.48],
  257. [2273.55,2236.3,2232.91,2273.55],
  258. [2238.49,2236.62,2228.81,2246.87],
  259. [2229.46,2234.4,2227.31,2243.95],
  260. [2234.9,2227.74,2220.44,2253.42],
  261. [2232.69,2225.29,2217.25,2241.34],
  262. [2196.24,2211.59,2180.67,2212.59],
  263. [2215.47,2225.77,2215.47,2234.73],
  264. [2224.93,2226.13,2212.56,2233.04],
  265. [2236.98,2219.55,2217.26,2242.48],
  266. [2218.09,2206.78,2204.44,2226.26],
  267. [2199.91,2181.94,2177.39,2204.99],
  268. [2169.63,2194.85,2165.78,2196.43],
  269. [2195.03,2193.8,2178.47,2197.51],
  270. [2181.82,2197.6,2175.44,2206.03],
  271. [2201.12,2244.64,2200.58,2250.11],
  272. [2236.4,2242.17,2232.26,2245.12],
  273. [2242.62,2184.54,2182.81,2242.62],
  274. [2187.35,2218.32,2184.11,2226.12],
  275. [2213.19,2199.31,2191.85,2224.63],
  276. [2203.89,2177.91,2173.86,2210.58],
  277. [2170.78,2174.12,2161.14,2179.65],
  278. [2179.05,2205.5,2179.05,2222.81],
  279. [2212.5,2231.17,2212.5,2236.07],
  280. [2227.86,2235.57,2219.44,2240.26],
  281. [2242.39,2246.3,2235.42,2255.21],
  282. [2246.96,2232.97,2221.38,2247.86],
  283. [2228.82,2246.83,2225.81,2247.67],
  284. [2247.68,2241.92,2231.36,2250.85],
  285. [2238.9,2217.01,2205.87,2239.93],
  286. [2217.09,2224.8,2213.58,2225.19],
  287. [2221.34,2251.81,2210.77,2252.87],
  288. [2249.81,2282.87,2248.41,2288.09],
  289. [2286.33,2299.99,2281.9,2309.39],
  290. [2297.11,2305.11,2290.12,2305.3],
  291. [2303.75,2302.4,2292.43,2314.18],
  292. [2293.81,2275.67,2274.1,2304.95],
  293. [2281.45,2288.53,2270.25,2292.59],
  294. [2286.66,2293.08,2283.94,2301.7],
  295. [2293.4,2321.32,2281.47,2322.1],
  296. [2323.54,2324.02,2321.17,2334.33],
  297. [2316.25,2317.75,2310.49,2325.72],
  298. [2320.74,2300.59,2299.37,2325.53],
  299. [2300.21,2299.25,2294.11,2313.43],
  300. [2297.1,2272.42,2264.76,2297.1],
  301. [2270.71,2270.93,2260.87,2276.86],
  302. [2264.43,2242.11,2240.07,2266.69],
  303. [2242.26,2210.9,2205.07,2250.63],
  304. [2190.1,2148.35,2126.22,2190.1]
  305. ];
  306. var functionMap = {};
  307. var optionMap = {
  308. 'calculable1' : {
  309. tooltip : {
  310. trigger: 'item',
  311. formatter: "{a} <br/>{b} : {c} ({d}%)"
  312. },
  313. legend: {
  314. orient : 'vertical',
  315. x : 'left',
  316. data:['Chrome','Firefox','Safari','IE9+','IE8','IE7','IE6-']
  317. },
  318. toolbox: {
  319. show : true,
  320. feature : {
  321. dataView : {show: true, readOnly: false},
  322. restore : {show: true},
  323. saveAsImage : {show: true}
  324. }
  325. },
  326. calculable : true,
  327. series : [
  328. {
  329. name:'浏览器占比',
  330. type:'pie',
  331. radius : ['30%', '70%'],
  332. data:[
  333. {value:535, name:'Chrome'},
  334. {value:310, name:'Firefox'},
  335. {value:234, name:'Safari'},
  336. {value:235, name:'IE9+'},
  337. {value:1035, name:'IE8'},
  338. {value:1305, name:'IE7'},
  339. {value:948, name:'IE6-'}
  340. ]
  341. }
  342. ]
  343. },
  344. 'calculable2' : {
  345. tooltip : {
  346. trigger: 'axis'
  347. },
  348. legend: {
  349. x: 'left',
  350. data:['销售量']
  351. },
  352. toolbox: {
  353. show : true,
  354. feature : {
  355. mark : {show: true},
  356. dataView : {show: true, readOnly: false},
  357. magicType : {show: true, type: ['line', 'bar']},
  358. restore : {show: true},
  359. saveAsImage : {show: true}
  360. }
  361. },
  362. calculable : true,
  363. xAxis : [
  364. {
  365. type : 'category',
  366. axisLabel : {
  367. rotate: 45
  368. },
  369. data : function (){
  370. var list = [];
  371. for (var i = 1; i <= 30; i++) {
  372. list.push('11 - ' + i);
  373. }
  374. return list;
  375. }()
  376. }
  377. ],
  378. yAxis : [
  379. {
  380. type : 'value',
  381. splitArea : {show : true}
  382. }
  383. ],
  384. series : [
  385. {
  386. name:'销售量',
  387. type:'bar',
  388. data:[
  389. 123,121,120,122,127,130,128,127,129,132,
  390. 2380,140,138,135,130,125,120,120,118,115,
  391. 105,95,100,94,85,83,78,80,73,68
  392. ]
  393. }
  394. ]
  395. },
  396. dataView : {
  397. tooltip : {
  398. trigger: 'axis',
  399. axisPointer : { // 坐标轴指示器,坐标轴触发有效
  400. type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  401. }
  402. },
  403. legend: {
  404. data:['利润', '支出', '收入']
  405. },
  406. toolbox: {
  407. show : true,
  408. feature : {
  409. mark : {show: true},
  410. dataView : {show: true, readOnly: false},
  411. magicType: {show: true, type : ['line', 'bar']},
  412. restore : {show: true},
  413. saveAsImage : {show: true}
  414. }
  415. },
  416. calculable : true,
  417. xAxis : [
  418. {
  419. type : 'value',
  420. splitArea: {show : true}
  421. }
  422. ],
  423. yAxis : [
  424. {
  425. type : 'category',
  426. data : ['周一','周二','周三','周四','周五','周六','周日']
  427. }
  428. ],
  429. series : [
  430. {
  431. name:'利润',
  432. type:'bar',
  433. itemStyle : { normal: {
  434. color: 'rgba(248, 83, 0, 1)',
  435. label : {show: true, position: 'inside'}}
  436. },
  437. data:[200, 170, 240, 244, 200, 220, 210]
  438. },
  439. {
  440. name:'收入',
  441. type:'bar',
  442. stack: '总量',
  443. barWidth : 5,
  444. itemStyle: {normal: {
  445. color: 'rgba(255, 160, 0, 0.8)',//'rgba(138, 43, 226, 0.6)',
  446. label : {show: true}
  447. }},
  448. data:[320, 302, 341, 374, 390, 450, 420]
  449. },
  450. {
  451. name:'支出',
  452. type:'bar',
  453. stack: '总量',
  454. itemStyle: {normal: {
  455. color: 'rgba(30, 144, 255, 0.6)',
  456. label : {show: true, position: 'left'}
  457. }},
  458. data:[-120, -132, -101, -134, -190, -230, -210]
  459. }
  460. ]
  461. },
  462. magicType : {
  463. tooltip : {
  464. trigger: 'axis'
  465. },
  466. legend: {
  467. data:['意向','预购','成交']
  468. },
  469. toolbox: {
  470. show : true,
  471. feature : {
  472. mark : {show: true},
  473. dataView : {show: true, readOnly: false},
  474. magicType: {show: true, type : ['line', 'bar', 'stack', 'tiled']},
  475. restore : {show: true},
  476. saveAsImage : {show: true}
  477. }
  478. },
  479. calculable : true,
  480. xAxis : [
  481. {
  482. type : 'category',
  483. boundaryGap : true,
  484. data : ['周一','周二','周三','周四','周五','周六','周日']
  485. }
  486. ],
  487. yAxis : [
  488. {
  489. type : 'value'
  490. }
  491. ],
  492. series : [
  493. {
  494. name:'意向',
  495. type:'bar',
  496. smooth:true,
  497. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  498. data:[1320, 1132, 601, 234, 120, 90, 20]
  499. },
  500. {
  501. name:'预购',
  502. type:'bar',
  503. smooth:true,
  504. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  505. data:[30, 182, 434, 791, 390, 30, 10]
  506. },
  507. {
  508. name:'成交',
  509. type:'bar',
  510. smooth:true,
  511. itemStyle: {normal: {areaStyle: {type: 'default'}}},
  512. data:[10, 12, 21, 54, 260, 830, 710]
  513. }
  514. ]
  515. },
  516. magicType2: (function(){
  517. var labelTop = {
  518. normal : {
  519. label : {
  520. show : true,
  521. position : 'center',
  522. formatter : '{b}',
  523. textStyle: {
  524. baseline : 'bottom'
  525. }
  526. },
  527. labelLine : {
  528. show : false
  529. }
  530. }
  531. };
  532. var labelFromatter = {
  533. normal : {
  534. label : {
  535. formatter : function (params){
  536. return 100 - params.value + '%'
  537. },
  538. textStyle: {
  539. baseline : 'top'
  540. }
  541. }
  542. },
  543. }
  544. var labelBottom = {
  545. normal : {
  546. color: '#ccc',
  547. label : {
  548. show : true,
  549. position : 'center'
  550. },
  551. labelLine : {
  552. show : false
  553. }
  554. },
  555. emphasis: {
  556. color: 'rgba(0,0,0,0)'
  557. }
  558. };
  559. var radius = [40, 55];
  560. return {
  561. legend: {
  562. x : 'center',
  563. y : 'center',
  564. data:[
  565. 'GoogleMaps','Facebook','Youtube','Google+','Weixin',
  566. 'Twitter', 'Skype', 'Messenger', 'Whatsapp', 'Instagram'
  567. ]
  568. },
  569. title : {
  570. text: 'The App World',
  571. subtext: 'from global web index',
  572. x: 'center'
  573. },
  574. toolbox: {
  575. show : true,
  576. feature : {
  577. dataView : {show: true, readOnly: false},
  578. magicType : {
  579. show: true,
  580. type: ['pie', 'funnel'],
  581. option: {
  582. funnel: {
  583. width: '20%',
  584. height: '30%',
  585. itemStyle : {
  586. normal : {
  587. label : {
  588. formatter : function (params){
  589. return 'other\n' + params.value + '%\n'
  590. },
  591. textStyle: {
  592. baseline : 'middle'
  593. }
  594. }
  595. },
  596. }
  597. }
  598. }
  599. },
  600. restore : {show: true},
  601. saveAsImage : {show: true}
  602. }
  603. },
  604. series : [
  605. {
  606. type : 'pie',
  607. center : ['10%', '30%'],
  608. radius : radius,
  609. x: '0%', // for funnel
  610. itemStyle : labelFromatter,
  611. data : [
  612. {name:'other', value:46, itemStyle : labelBottom},
  613. {name:'GoogleMaps', value:54,itemStyle : labelTop}
  614. ]
  615. },
  616. {
  617. type : 'pie',
  618. center : ['30%', '30%'],
  619. radius : radius,
  620. x:'20%', // for funnel
  621. itemStyle : labelFromatter,
  622. data : [
  623. {name:'other', value:56, itemStyle : labelBottom},
  624. {name:'Facebook', value:44,itemStyle : labelTop}
  625. ]
  626. },
  627. {
  628. type : 'pie',
  629. center : ['50%', '30%'],
  630. radius : radius,
  631. x:'40%', // for funnel
  632. itemStyle : labelFromatter,
  633. data : [
  634. {name:'other', value:65, itemStyle : labelBottom},
  635. {name:'Youtube', value:35,itemStyle : labelTop}
  636. ]
  637. },
  638. {
  639. type : 'pie',
  640. center : ['70%', '30%'],
  641. radius : radius,
  642. x:'60%', // for funnel
  643. itemStyle : labelFromatter,
  644. data : [
  645. {name:'other', value:70, itemStyle : labelBottom},
  646. {name:'Google+', value:30,itemStyle : labelTop}
  647. ]
  648. },
  649. {
  650. type : 'pie',
  651. center : ['90%', '30%'],
  652. radius : radius,
  653. x:'80%', // for funnel
  654. itemStyle : labelFromatter,
  655. data : [
  656. {name:'other', value:73, itemStyle : labelBottom},
  657. {name:'Weixin', value:27,itemStyle : labelTop}
  658. ]
  659. },
  660. {
  661. type : 'pie',
  662. center : ['10%', '70%'],
  663. radius : radius,
  664. y: '55%', // for funnel
  665. x: '0%', // for funnel
  666. itemStyle : labelFromatter,
  667. data : [
  668. {name:'other', value:78, itemStyle : labelBottom},
  669. {name:'Twitter', value:22,itemStyle : labelTop}
  670. ]
  671. },
  672. {
  673. type : 'pie',
  674. center : ['30%', '70%'],
  675. radius : radius,
  676. y: '55%', // for funnel
  677. x:'20%', // for funnel
  678. itemStyle : labelFromatter,
  679. data : [
  680. {name:'other', value:78, itemStyle : labelBottom},
  681. {name:'Skype', value:22,itemStyle : labelTop}
  682. ]
  683. },
  684. {
  685. type : 'pie',
  686. center : ['50%', '70%'],
  687. radius : radius,
  688. y: '55%', // for funnel
  689. x:'40%', // for funnel
  690. itemStyle : labelFromatter,
  691. data : [
  692. {name:'other', value:78, itemStyle : labelBottom},
  693. {name:'Messenger', value:22,itemStyle : labelTop}
  694. ]
  695. },
  696. {
  697. type : 'pie',
  698. center : ['70%', '70%'],
  699. radius : radius,
  700. y: '55%', // for funnel
  701. x:'60%', // for funnel
  702. itemStyle : labelFromatter,
  703. data : [
  704. {name:'other', value:83, itemStyle : labelBottom},
  705. {name:'Whatsapp', value:17,itemStyle : labelTop}
  706. ]
  707. },
  708. {
  709. type : 'pie',
  710. center : ['90%', '70%'],
  711. radius : radius,
  712. y: '55%', // for funnel
  713. x:'80%', // for funnel
  714. itemStyle : labelFromatter,
  715. data : [
  716. {name:'other', value:89, itemStyle : labelBottom},
  717. {name:'Instagram', value:11,itemStyle : labelTop}
  718. ]
  719. }
  720. ]
  721. };
  722. })(),
  723. dataRange1 : {
  724. title : {
  725. text: '2011全国GDP(亿元)',
  726. subtext: '数据来自国家统计局'
  727. },
  728. tooltip : {
  729. trigger: 'item'
  730. },
  731. dataRange: {
  732. min: 0,
  733. max: 55000,
  734. text:['高','低'], // 文本,默认为数值文本
  735. color:[ 'red', 'yellow'],//颜色
  736. calculable : true
  737. },
  738. toolbox: {
  739. show : true,
  740. feature : {
  741. mark : {show: true},
  742. dataView : {show: true, readOnly: false},
  743. restore : {show: true},
  744. saveAsImage : {show: true}
  745. }
  746. },
  747. series : [
  748. {
  749. name: '2011全国GDP',
  750. type: 'map',
  751. mapType: 'china',
  752. itemStyle:{
  753. normal:{label:{show:true}},
  754. emphasis:{color:'rgba(104,255,104,0.5)'}
  755. },
  756. data:[
  757. {name:'西藏', value:605.83},
  758. {name:'青海', value:1670.44},
  759. {name:'宁夏', value:2102.21},
  760. {name:'海南', value:2522.66},
  761. {name:'甘肃', value:5020.37},
  762. {name:'贵州', value:5701.84},
  763. {name:'新疆', value:6610.05},
  764. {name:'云南', value:8893.12},
  765. {name:'重庆', value:10011.37},
  766. {name:'吉林', value:10568.83},
  767. {name:'山西', value:11237.55},
  768. {name:'天津', value:11307.28},
  769. {name:'江西', value:11702.82},
  770. {name:'广西', value:11720.87},
  771. {name:'陕西', value:12512.3},
  772. {name:'黑龙江', value:12582},
  773. {name:'内蒙古', value:14359.88},
  774. {name:'安徽', value:15300.65},
  775. {name:'北京', value:16251.93},
  776. {name:'福建', value:17560.18},
  777. {name:'上海', value:19195.69},
  778. {name:'湖北', value:19632.26},
  779. {name:'湖南', value:19669.56},
  780. {name:'四川', value:21026.68},
  781. {name:'辽宁', value:22226.7},
  782. {name:'河北', value:24515.76},
  783. {name:'河南', value:26931.03},
  784. {name:'浙江', value:32318.85},
  785. {name:'山东', value:45361.85},
  786. {name:'江苏', value:49110.27},
  787. {name:'广东', value:53210.28}
  788. ]
  789. }
  790. ]
  791. },
  792. dataZoom1 : {
  793. tooltip : {
  794. trigger: 'axis',
  795. formatter: function (params) {
  796. var res = params[1][1];
  797. res += '<br/>' + params[1][0];
  798. res += '<br/> 开盘 : ' + params[1][2][0] + ' 最高 : ' + params[1][2][3];
  799. res += '<br/> 收盘 : ' + params[1][2][1] + ' 最低 : ' + params[1][2][2];
  800. res += '<br/>' + params[0][0];
  801. res += ' : ' + params[0][2];
  802. return res;
  803. }
  804. },
  805. legend: {
  806. data:['上证指数','成交金额(万)']
  807. },
  808. toolbox: {
  809. show : true,
  810. feature : {
  811. mark : {show: true},
  812. dataZoom : {show: true},
  813. dataView : {show: true, readOnly: false},
  814. restore : {show: true},
  815. saveAsImage : {show: true}
  816. }
  817. },
  818. dataZoom : {
  819. show : true,
  820. realtime: true,
  821. start : 0,
  822. end : 50
  823. },
  824. xAxis : [
  825. {
  826. type : 'category',
  827. boundaryGap : true,
  828. axisTick: {onGap:false},
  829. data : axisData
  830. }
  831. ],
  832. yAxis : [
  833. {
  834. type: 'value',
  835. scale: true,
  836. splitNumber: 9,
  837. boundaryGap: [0.05, 0.05],
  838. splitArea: {show : true}
  839. },
  840. {
  841. type : 'value',
  842. scale:true,
  843. splitNumber: 9,
  844. boundaryGap: [0.05, 0.05],
  845. axisLabel: {
  846. formatter: function (v) {
  847. return Math.round(v/10000) + ' 万'
  848. }
  849. },
  850. splitArea : {show : true}
  851. }
  852. ],
  853. series : [
  854. {
  855. name:'成交金额(万)',
  856. type:'line',
  857. yAxisIndex: 1,
  858. symbol: 'none',
  859. itemStyle:{
  860. normal:{
  861. color:'#1e90ff'
  862. }
  863. },
  864. data:[
  865. 13560434, 8026738.5, 11691637, 12491697, 12485603,
  866. 11620504, 12555496, 15253370, 12709611, 10458354,
  867. 10933507, 9896523, 10365702, 10633095, 9722230,
  868. 12662783, 8757982, 7764234, 10591719, 8826293,
  869. 11591827, 11153111, 14304651, 11672120, 12536480,
  870. 12608589, 8843860, 7391994.5, 10063709, 7768895.5,
  871. 6921859, 10157810, 8148617.5, 7551207, 11397426,
  872. 10478607, 8595132, 8541862, 9181132, 8570842,
  873. 10759351, 7335819, 6699753.5, 7759666.5, 6880135.5,
  874. 7366616.5, 7313504, 7109021.5, 6213270, 5619688,
  875. 5816217.5, 6695584.5, 5998655.5, 6188812.5, 9538301,
  876. 8224500, 8221751.5, 7897721, 8448324, 6525151,
  877. 5987761, 7831570, 8162560.5, 7904092, 8139084.5,
  878. 9116529, 8128014, 7919148, 7566047, 6665826.5,
  879. 10225527, 11124881, 12884353, 11302521, 11529046,
  880. 11105205, 9202153, 9992016, 12035250, 11431155,
  881. 10354677, 10070399, 9164861, 9237718, 7114268,
  882. 7526158.5, 8105835, 7971452.5
  883. ],
  884. markPoint : {
  885. symbol: 'emptyPin',
  886. itemStyle : {
  887. normal : {
  888. color:'#1e90ff',
  889. label : {
  890. show:true,
  891. position:'top',
  892. formatter: function (params) {
  893. return Math.round(params.value/10000) + ' 万'
  894. }
  895. }
  896. }
  897. },
  898. data : [
  899. {type : 'max', name: '最大值', symbolSize:5},
  900. {type : 'min', name: '最小值', symbolSize:5}
  901. ]
  902. },
  903. markLine : {
  904. symbol : 'none',
  905. itemStyle : {
  906. normal : {
  907. color:'#1e90ff',
  908. label : {
  909. show:true,
  910. formatter: function (params) {
  911. return Math.round(params.value/10000) + ' 万'
  912. }
  913. }
  914. }
  915. },
  916. data : [
  917. {type : 'average', name: '平均值'}
  918. ]
  919. }
  920. },
  921. {
  922. name:'上证指数',
  923. type:'k',
  924. data: kData
  925. }
  926. ]
  927. },
  928. multiCharts : (function (){
  929. functionMap.multiCharts = function (){
  930. var option2 = {
  931. tooltip : {
  932. trigger: 'axis',
  933. showDelay: 0
  934. },
  935. legend: {
  936. y : -30,
  937. data:['上证指数','成交金额(万)','虚拟数据']
  938. },
  939. toolbox: {
  940. y : -30,
  941. show : true,
  942. feature : {
  943. mark : {show: true},
  944. dataZoom : {show: true},
  945. dataView : {show: true, readOnly: false},
  946. magicType : {show: true, type: ['line', 'bar']},
  947. restore : {show: true},
  948. saveAsImage : {show: true}
  949. }
  950. },
  951. dataZoom : {
  952. show : true,
  953. realtime: true,
  954. start : 0,
  955. end : 50
  956. },
  957. grid: {
  958. x: 80,
  959. y:5,
  960. x2:20,
  961. y2:40
  962. },
  963. xAxis : [
  964. {
  965. type : 'category',
  966. position:'top',
  967. boundaryGap : true,
  968. axisLabel:{show:false},
  969. axisTick: {onGap:false},
  970. splitLine: {show:false},
  971. data : axisData
  972. }
  973. ],
  974. yAxis : [
  975. {
  976. type : 'value',
  977. scale:true,
  978. splitNumber: 3,
  979. boundaryGap: [0.05, 0.05],
  980. axisLabel: {
  981. formatter: function (v) {
  982. return Math.round(v/10000) + ' 万'
  983. }
  984. },
  985. splitArea : {show : true}
  986. }
  987. ],
  988. series : [
  989. {
  990. name:'成交金额(万)',
  991. type:'line',
  992. symbol: 'none',
  993. data:[
  994. 13560434, 8026738.5, 11691637, 12491697, 12485603,
  995. 11620504, 12555496, 15253370, 12709611, 10458354,
  996. 10933507, 9896523, 10365702, 10633095, 9722230,
  997. 12662783, 8757982, 7764234, 10591719, 8826293,
  998. 11591827, 11153111, 14304651, 11672120, 12536480,
  999. 12608589, 8843860, 7391994.5, 10063709, 7768895.5,
  1000. 6921859, 10157810, 8148617.5, 7551207, 11397426,
  1001. 10478607, 8595132, 8541862, 9181132, 8570842,
  1002. 10759351, 7335819, 6699753.5, 7759666.5, 6880135.5,
  1003. 7366616.5, 7313504, 7109021.5, 6213270, 5619688,
  1004. 5816217.5, 6695584.5, 5998655.5, 6188812.5, 9538301,
  1005. 8224500, 8221751.5, 7897721, 8448324, 6525151,
  1006. 5987761, 7831570, 8162560.5, 7904092, 8139084.5,
  1007. 9116529, 8128014, 7919148, 7566047, 6665826.5,
  1008. 10225527, 11124881, 12884353, 11302521, 11529046,
  1009. 11105205, 9202153, 9992016, 12035250, 11431155,
  1010. 10354677, 10070399, 9164861, 9237718, 7114268,
  1011. 7526158.5, 8105835, 7971452.5
  1012. ]
  1013. }
  1014. ]
  1015. };
  1016. document.getElementById('mcMain2').className = 'main noLoading';
  1017. myChart2 = echarts.init(document.getElementById('mcMain2'),theme);
  1018. myChart2.setOption(option2);
  1019. var option3 = {
  1020. tooltip : {
  1021. trigger: 'axis',
  1022. showDelay: 0
  1023. },
  1024. legend: {
  1025. y : -30,
  1026. data:['上证指数','成交金额(万)','虚拟数据']
  1027. },
  1028. toolbox: {
  1029. y : -30,
  1030. show : true,
  1031. feature : {
  1032. mark : {show: true},
  1033. dataZoom : {show: true},
  1034. dataView : {show: true, readOnly: false},
  1035. magicType : {show: true, type: ['line', 'bar']},
  1036. restore : {show: true},
  1037. saveAsImage : {show: true}
  1038. }
  1039. },
  1040. dataZoom : {
  1041. y:200,
  1042. show : true,
  1043. realtime: true,
  1044. start : 0,
  1045. end : 50
  1046. },
  1047. grid: {
  1048. x: 80,
  1049. y:5,
  1050. x2:20,
  1051. y2:30
  1052. },
  1053. xAxis : [
  1054. {
  1055. type : 'category',
  1056. position:'bottom',
  1057. boundaryGap : true,
  1058. axisTick: {onGap:false},
  1059. splitLine: {show:false},
  1060. data : axisData
  1061. }
  1062. ],
  1063. yAxis : [
  1064. {
  1065. type : 'value',
  1066. scale:true,
  1067. splitNumber:3,
  1068. boundaryGap: [0.05, 0.05],
  1069. axisLabel: {
  1070. formatter: function (v) {
  1071. return Math.round(v/10000) + ' 万'
  1072. }
  1073. },
  1074. splitArea : {show : true}
  1075. }
  1076. ],
  1077. series : [
  1078. {
  1079. name:'虚拟数据',
  1080. type:'bar',
  1081. symbol: 'none',
  1082. data:[
  1083. 560434, 226738, 696370, 249697, 248563,
  1084. 620504, 555496, 525337, 270968, 458354,
  1085. 933507, 896523, 365702, 633095, 722230,
  1086. 662783, 875798, 776423, 105979, 882629,
  1087. 598278, 231253, 430465, 672208, 253648,
  1088. 608589, 884386, 739994, 263709, 776889,
  1089. 692859, 105780, 848675, 755207, 397426,
  1090. 478607, 859532, 854862, 983288, 857084,
  1091. 759358, 733589, 669975, 775965, 688035,
  1092. 736666, 733504, 709025, 623270, 569688,
  1093. 586275, 669558, 599865, 688825, 953830,
  1094. 822450, 822755, 789772, 844832, 652558,
  1095. 598776, 783570, 862560, 794092, 839084,
  1096. 965298, 828048, 799480, 756647, 665826,
  1097. 102257, 248870, 288435, 302528, 529046,
  1098. 105205, 920253, 999206, 203525, 435588,
  1099. 103546, 703990, 964868, 923778, 742688,
  1100. 752658, 805835, 797452
  1101. ]
  1102. }
  1103. ]
  1104. };
  1105. document.getElementById('mcMain3').className = 'main noLoading';
  1106. myChart3 = echarts.init(document.getElementById('mcMain3'),theme);
  1107. myChart3.setOption(option3);
  1108. myChart.connect([myChart2, myChart3]);
  1109. myChart2.connect([myChart, myChart3]);
  1110. myChart3.connect([myChart, myChart2])
  1111. }
  1112. return {
  1113. title : {
  1114. text: '2013年上半年上证指数'
  1115. },
  1116. tooltip : {
  1117. trigger: 'axis',
  1118. showDelay: 0, // 显示延迟,添加显示延迟可以避免频繁切换,单位ms
  1119. formatter: function (params) {
  1120. var res = params[0][1];
  1121. res += '<br/>' + params[0][0];
  1122. res += '<br/> 开盘 : ' + params[0][2][0] + ' 最高 : ' + params[0][2][3];
  1123. res += '<br/> 收盘 : ' + params[0][2][1] + ' 最低 : ' + params[0][2][2];
  1124. return res;
  1125. }
  1126. },
  1127. legend: {
  1128. data:['上证指数','成交金额(万)','虚拟数据']
  1129. },
  1130. toolbox: {
  1131. show : true,
  1132. feature : {
  1133. mark : {show: true},
  1134. dataZoom : {show: true},
  1135. magicType : {show: true, type: ['line', 'bar']},
  1136. restore : {show: true},
  1137. saveAsImage : {show: true}
  1138. }
  1139. },
  1140. dataZoom : {
  1141. y: 250,
  1142. show : true,
  1143. realtime: true,
  1144. start : 0,
  1145. end : 50
  1146. },
  1147. grid: {
  1148. x: 80,
  1149. y: 40,
  1150. x2:20,
  1151. y2:25
  1152. },
  1153. xAxis : [
  1154. {
  1155. type : 'category',
  1156. boundaryGap : true,
  1157. axisTick: {onGap:false},
  1158. splitLine: {show:false},
  1159. data : axisData
  1160. }
  1161. ],
  1162. yAxis : [
  1163. {
  1164. type : 'value',
  1165. scale:true,
  1166. boundaryGap: [0.05, 0.05],
  1167. splitArea : {show : true}
  1168. }
  1169. ],
  1170. series : [
  1171. {
  1172. name:'上证指数',
  1173. type:'k',
  1174. data: kData
  1175. },
  1176. {
  1177. name:'成交金额(万)',
  1178. type:'line',
  1179. symbol: 'none',
  1180. data:[]
  1181. },
  1182. {
  1183. name:'虚拟数据',
  1184. type:'bar',data:[]
  1185. }
  1186. ]
  1187. };
  1188. })(),
  1189. scatter : {
  1190. tooltip : {
  1191. trigger: 'item'
  1192. },
  1193. legend: {
  1194. data:['sin','cos']
  1195. },
  1196. toolbox: {
  1197. show : true,
  1198. feature : {
  1199. mark : {show: true},
  1200. dataZoom : {show: true},
  1201. dataView : {show: true, readOnly: false},
  1202. restore : {show: true},
  1203. saveAsImage : {show: true}
  1204. }
  1205. },
  1206. xAxis : [
  1207. {
  1208. type : 'value',
  1209. scale:true
  1210. }
  1211. ],
  1212. yAxis : [
  1213. {
  1214. type : 'value',
  1215. scale:true,
  1216. splitArea : {show : true}
  1217. }
  1218. ],
  1219. series : [
  1220. {
  1221. name:'sin',
  1222. type:'scatter',
  1223. large: true,
  1224. symbol:'circle',
  1225. data: (function () {
  1226. var d = [];
  1227. var len = 25000;
  1228. var x = 0;
  1229. while (len--) {
  1230. x = (Math.random() * 10).toFixed(3) - 0;
  1231. d.push([
  1232. x,
  1233. //Math.random() * 10
  1234. (Math.sin(x) - x * (len % 2 ? 0.1 : -0.1) * Math.random()).toFixed(3) - 0
  1235. ]);
  1236. }
  1237. return d;
  1238. })()
  1239. },
  1240. {
  1241. name:'cos',
  1242. type:'scatter',
  1243. large: true,
  1244. symbol:'circle',
  1245. data: (function () {
  1246. var d = [];
  1247. var len = 25000;
  1248. var x = 0;
  1249. while (len--) {
  1250. x = (Math.random() * 10).toFixed(3) - 0;
  1251. d.push([
  1252. x,
  1253. //Math.random() * 10
  1254. (Math.cos(x) - x * (len % 2 ? 0.1 : -0.1) * Math.random()).toFixed(3) - 0
  1255. ]);
  1256. }
  1257. return d;
  1258. })()
  1259. }
  1260. ]
  1261. },
  1262. force1 : {
  1263. tooltip : {
  1264. trigger: 'item',
  1265. formatter: '{a} : {b}'
  1266. },
  1267. toolbox: {
  1268. show : true,
  1269. feature : {
  1270. restore : {show: true},
  1271. magicType: {show: true, type: ['force', 'chord']},
  1272. saveAsImage : {show: true}
  1273. }
  1274. },
  1275. legend: {
  1276. x: 'left',
  1277. data:['家人','朋友']
  1278. },
  1279. series : [
  1280. {
  1281. type:'force',
  1282. ribbonType: false,
  1283. categories : [
  1284. {
  1285. name: '人物',
  1286. itemStyle: {
  1287. normal: {
  1288. color : '#ff7f50'
  1289. }
  1290. }
  1291. },
  1292. {
  1293. name: '家人',
  1294. itemStyle: {
  1295. normal: {
  1296. color : '#87cdfa'
  1297. }
  1298. }
  1299. },
  1300. {
  1301. name:'朋友',
  1302. itemStyle: {
  1303. normal: {
  1304. color : '#9acd32'
  1305. }
  1306. }
  1307. }
  1308. ],
  1309. itemStyle: {
  1310. normal: {
  1311. label: {
  1312. show: true,
  1313. textStyle: {
  1314. color: '#800080'
  1315. }
  1316. },
  1317. nodeStyle : {
  1318. brushType : 'both',
  1319. strokeColor : 'rgba(255,215,0,0.4)',
  1320. lineWidth : 8
  1321. }
  1322. },
  1323. emphasis: {
  1324. label: {
  1325. show: false
  1326. // textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
  1327. },
  1328. nodeStyle : {
  1329. r: 30
  1330. },
  1331. linkStyle : {}
  1332. }
  1333. },
  1334. minRadius : 15,
  1335. maxRadius : 25,
  1336. density : 0.05,
  1337. attractiveness: 1.2,
  1338. nodes:[
  1339. {category:0, name: '乔布斯', value : 10},
  1340. {category:1, name: '丽萨-乔布斯',value : 2},
  1341. {category:1, name: '保罗-乔布斯',value : 3},
  1342. {category:1, name: '克拉拉-乔布斯',value : 3},
  1343. {category:1, name: '劳伦-鲍威尔',value : 7},
  1344. {category:2, name: '史蒂夫-沃兹尼艾克',value : 5},
  1345. {category:2, name: '奥巴马',value : 8},
  1346. {category:2, name: '比尔-盖茨',value : 9},
  1347. {category:2, name: '乔纳森-艾夫',value : 4},
  1348. {category:2, name: '蒂姆-库克',value : 4},
  1349. {category:2, name: '龙-韦恩',value : 1},
  1350. ],
  1351. links : [
  1352. {source : 1, target : 0, weight : 1},
  1353. {source : 2, target : 0, weight : 2},
  1354. {source : 3, target : 0, weight : 1},
  1355. {source : 4, target : 0, weight : 2},
  1356. {source : 5, target : 0, weight : 3},
  1357. {source : 6, target : 0, weight : 6},
  1358. {source : 7, target : 0, weight : 6},
  1359. {source : 8, target : 0, weight : 1},
  1360. {source : 9, target : 0, weight : 1},
  1361. {source : 10, target : 0, weight : 1},
  1362. {source : 3, target : 2, weight : 1},
  1363. {source : 6, target : 2, weight : 1},
  1364. {source : 6, target : 3, weight : 1},
  1365. {source : 6, target : 4, weight : 1},
  1366. {source : 6, target : 5, weight : 1},
  1367. {source : 7, target : 6, weight : 6},
  1368. {source : 7, target : 3, weight : 1},
  1369. {source : 9, target : 6, weight : 1}
  1370. ]
  1371. }
  1372. ]
  1373. },
  1374. force2 : {
  1375. tooltip : {
  1376. trigger: 'item'
  1377. },
  1378. legend : {
  1379. data : ['HTMLElement', 'WebGL', 'SVG', 'CSS', 'Other'],
  1380. orient : 'vertical',
  1381. x : 'left'
  1382. },
  1383. series : []
  1384. },
  1385. dynamic : (function(){
  1386. functionMap.dynamic = function() {
  1387. var lastData = 11;
  1388. var axisData;
  1389. timeTicket = setInterval(function (){
  1390. lastData += Math.random() * ((Math.round(Math.random() * 10) % 2) == 0 ? 1 : -1);
  1391. lastData = lastData.toFixed(1) - 0;
  1392. axisData = (new Date()).toLocaleTimeString().replace(/^\D*/,'');
  1393. // 动态数据接口 addData
  1394. myChart.addData([
  1395. [
  1396. 0, // 系列索引
  1397. Math.round(Math.random() * 1000), // 新增数据
  1398. true, // 新增数据是否从队列头部插入
  1399. false // 是否增加队列长度,false则自定删除原有数据,队头插入删队尾,队尾插入删队头
  1400. ],
  1401. [
  1402. 1, // 系列索引
  1403. lastData, // 新增数据
  1404. false, // 新增数据是否从队列头部插入
  1405. false, // 是否增加队列长度,false则自定删除原有数据,队头插入删队尾,队尾插入删队头
  1406. axisData // 坐标轴标签
  1407. ]
  1408. ]);
  1409. }, 1500);
  1410. };
  1411. return {
  1412. title : {
  1413. text: '动态数据',
  1414. subtext: '纯属虚构'
  1415. },
  1416. tooltip : {
  1417. trigger: 'axis'
  1418. },
  1419. legend: {
  1420. data:['最新成交价', '预购队列']
  1421. },
  1422. toolbox: {
  1423. show : true,
  1424. feature : {
  1425. mark : {show: true},
  1426. dataView : {show: true, readOnly: false},
  1427. magicType: {show: true, type : ['line', 'bar']},
  1428. restore : {show: true},
  1429. saveAsImage : {show: true}
  1430. }
  1431. },
  1432. AAdataZoom : {
  1433. show : false,
  1434. realtime: true,
  1435. start : 0,
  1436. end : 50
  1437. },
  1438. grid:{y2:30,y:70},
  1439. xAxis : [
  1440. {
  1441. type : 'category',
  1442. boundaryGap : true,
  1443. axisLine: {onZero: false},
  1444. data : (function (){
  1445. var now = new Date();
  1446. var res = [];
  1447. var len = 10;
  1448. while (len--) {
  1449. res.unshift(now.toLocaleTimeString().replace(/^\D*/,''));
  1450. now = new Date(now - 2000);
  1451. }
  1452. return res;
  1453. })()
  1454. },
  1455. {
  1456. type : 'category',
  1457. boundaryGap : true,
  1458. splitline : {show : false},
  1459. axisLine: {onZero: false},
  1460. data : (function (){
  1461. var res = [];
  1462. var len = 10;
  1463. while (len--) {
  1464. res.push(len + 1);
  1465. }
  1466. return res;
  1467. })()
  1468. }
  1469. ],
  1470. yAxis : [
  1471. {
  1472. type : 'value',
  1473. scale: true,
  1474. name : '价格',
  1475. boundaryGap: [0.2, 0.2],
  1476. splitNumber:5,
  1477. splitArea : {show : true}
  1478. },
  1479. {
  1480. type : 'value',
  1481. splitNumber:5,
  1482. scale: true,
  1483. name : '预购量',
  1484. boundaryGap: [0.2, 0.2]
  1485. }
  1486. ],
  1487. series : [
  1488. {
  1489. name:'预购队列',
  1490. type:'bar',
  1491. xAxisIndex: 1,
  1492. yAxisIndex: 1,
  1493. itemStyle: {
  1494. normal: {
  1495. color : 'rgba(85,206,85,0.4)'
  1496. }
  1497. },
  1498. data:(function (){
  1499. var res = [];
  1500. var len = 10;
  1501. while (len--) {
  1502. res.push(Math.round(Math.random() * 1000));
  1503. }
  1504. return res;
  1505. })()
  1506. },
  1507. {
  1508. name:'最新成交价',
  1509. type:'line',
  1510. itemStyle: {
  1511. normal: {
  1512. // areaStyle: {type: 'default'},
  1513. lineStyle: {
  1514. shadowColor : 'rgba(0,0,0,0.4)'
  1515. }
  1516. }
  1517. },
  1518. data:(function (){
  1519. var res = [];
  1520. var len = 10;
  1521. while (len--) {
  1522. res.push((Math.random()*10 + 5).toFixed(1) - 0);
  1523. }
  1524. return res;
  1525. })()
  1526. }
  1527. ]
  1528. }
  1529. })(),
  1530. legendSelected : {
  1531. color : [
  1532. '#FBB367','#80B1D2','#FB8070','#CC99FF','#B0D961',
  1533. '#99CCCC','#BEBBD8','#FFCC99','#8DD3C8','#FF9999',
  1534. '#CCEAC4','#BB81BC','#FBCCEC','#CCFF66','#99CC66',
  1535. '#66CC66','#FF6666','#FFED6F','#ff7f50','#87cefa',
  1536. ],
  1537. title : {
  1538. text : '中东地区的敌友关系',
  1539. subtext: '数据来自财新网',
  1540. sublink: 'http://international.caixin.com/2013-09-06/100579154.html',
  1541. x:'right',
  1542. y:'bottom'
  1543. },
  1544. toolbox: {
  1545. show : true,
  1546. feature : {
  1547. restore : {show: true},
  1548. magicType: {show: true, type: ['force', 'chord']},
  1549. saveAsImage : {show: true}
  1550. }
  1551. },
  1552. tooltip : {
  1553. trigger: 'item',
  1554. formatter : function (params) {
  1555. if (params.name && params.name.indexOf('-') != -1) {
  1556. return params.name.replace('-', ' ' + params.seriesName + ' ')
  1557. }
  1558. else {
  1559. return params.name ? params.name : params.data.id
  1560. }
  1561. }
  1562. },
  1563. legend : {
  1564. data : [
  1565. '美国',
  1566. '叙利亚反对派',
  1567. '阿萨德',
  1568. '伊朗',
  1569. '塞西',
  1570. '哈马斯',
  1571. '以色列',
  1572. '穆斯林兄弟会',
  1573. '基地组织',
  1574. '俄罗斯',
  1575. '黎巴嫩什叶派',
  1576. '土耳其',
  1577. '卡塔尔',
  1578. '沙特',
  1579. '黎巴嫩逊尼派',
  1580. '',
  1581. '支持',
  1582. '反对',
  1583. '未表态'
  1584. ],
  1585. orient : 'vertical',
  1586. x : 'left'
  1587. },
  1588. series : [
  1589. {
  1590. "name": "支持",
  1591. "type": "chord",
  1592. "showScaleText": false,
  1593. "clockWise": false,
  1594. "data": [
  1595. {"name": "美国"},
  1596. {"name": "叙利亚反对派"},
  1597. {"name": "阿萨德"},
  1598. {"name": "伊朗"},
  1599. {"name": "塞西"},
  1600. {"name": "哈马斯"},
  1601. {"name": "以色列"},
  1602. {"name": "穆斯林兄弟会"},
  1603. {"name": "基地组织"},
  1604. {"name": "俄罗斯"},
  1605. {"name": "黎巴嫩什叶派"},
  1606. {"name": "土耳其"},
  1607. {"name": "卡塔尔"},
  1608. {"name": "沙特"},
  1609. {"name": "黎巴嫩逊尼派"}
  1610. ],
  1611. "matrix": [
  1612. [0,100,0,0,0,0,100,0,0,0,0,0,0,0,0],
  1613. [10,0,0,0,0,10,10,0,10,0,0,10,10,10,10],
  1614. [0,0,0,10,0,0,0,0,0,10,10,0,0,0,0],
  1615. [0,0,100,0,0,100,0,0,0,0,100,0,0,0,0],
  1616. [0,0,0,0,0,0,0,0,0,0,0,0,0,10,0],
  1617. [0,100,0,10,0,0,0,0,0,0,0,0,10,0,0],
  1618. [10,100,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1619. [0,0,0,0,0,0,0,0,0,0,0,10,10,0,0],
  1620. [0,100,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1621. [0,0,100,0,0,0,0,0,0,0,0,0,0,0,0],
  1622. [0,0,100,10,0,0,0,0,0,0,0,0,0,0,0],
  1623. [0,100,0,0,0,0,0,100,0,0,0,0,0,0,0],
  1624. [0,100,0,0,0,100,0,100,0,0,0,0,0,0,0],
  1625. [0,100,0,0,100,0,0,0,0,0,0,0,0,0,100],
  1626. [0,100,0,0,0,0,0,0,0,0,0,0,0,10,0]
  1627. ]
  1628. },
  1629. {
  1630. "name": "反对",
  1631. "type": "chord",
  1632. "insertToSerie": "支持",
  1633. "data": [
  1634. {"name": "美国"},
  1635. {"name": "叙利亚反对派"},
  1636. {"name": "阿萨德"},
  1637. {"name": "伊朗"},
  1638. {"name": "塞西"},
  1639. {"name": "哈马斯"},
  1640. {"name": "以色列"},
  1641. {"name": "穆斯林兄弟会"},
  1642. {"name": "基地组织"},
  1643. {"name": "俄罗斯"},
  1644. {"name": "黎巴嫩什叶派"},
  1645. {"name": "土耳其"},
  1646. {"name": "卡塔尔"},
  1647. {"name": "沙特"},
  1648. {"name": "黎巴嫩逊尼派"}
  1649. ],
  1650. "matrix": [
  1651. [0,0,100,100,0,100,0,0,100,0,0,0,0,0,0],
  1652. [0,0,0,10,0,0,0,0,0,10,10,0,0,0,0],
  1653. [10,0,0,0,0,0,10,10,10,0,0,10,10,0,10],
  1654. [10,100,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1655. [0,0,0,0,0,10,0,100,0,0,0,10,10,0,0],
  1656. [10,0,0,0,100,0,10,0,0,0,0,0,0,0,0],
  1657. [0,0,100,0,0,100,0,0,0,0,0,0,0,0,0],
  1658. [0,0,100,0,10,0,0,0,0,0,0,0,0,10,0],
  1659. [10,0,100,0,0,0,0,0,0,0,0,0,0,100,0],
  1660. [0,100,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1661. [0,100,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1662. [0,0,100,0,100,0,0,0,0,0,0,0,0,0,0],
  1663. [0,0,100,0,100,0,0,0,0,0,0,0,0,0,0],
  1664. [0,0,0,0,0,0,0,100,10,0,0,0,0,0,0],
  1665. [0,0,100,0,0,0,0,0,0,0,0,0,0,0,0]
  1666. ]
  1667. },
  1668. {
  1669. "name": "未表态",
  1670. "type": "chord",
  1671. "insertToSerie": "支持",
  1672. "data": [
  1673. {"name": "美国"},
  1674. {"name": "叙利亚反对派"},
  1675. {"name": "阿萨德"},
  1676. {"name": "伊朗"},
  1677. {"name": "塞西"},
  1678. {"name": "哈马斯"},
  1679. {"name": "以色列"},
  1680. {"name": "穆斯林兄弟会"},
  1681. {"name": "基地组织"},
  1682. {"name": "俄罗斯"},
  1683. {"name": "黎巴嫩什叶派"},
  1684. {"name": "土耳其"},
  1685. {"name": "卡塔尔"},
  1686. {"name": "沙特"},
  1687. {"name": "黎巴嫩逊尼派"}
  1688. ],
  1689. "matrix": [
  1690. [0,0,0,0,100,0,0,100,0,0,0,0,0,0,0],
  1691. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1692. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1693. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1694. [10,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1695. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1696. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1697. [10,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1698. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1699. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1700. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1701. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1702. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1703. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  1704. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
  1705. ]
  1706. }
  1707. ]
  1708. },
  1709. stack : {
  1710. tooltip : {
  1711. trigger: 'axis',
  1712. axisPointer:{
  1713. type:'shadow'
  1714. }
  1715. },
  1716. legend: {
  1717. data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎','百度','谷歌','必应','其他']
  1718. },
  1719. toolbox: {
  1720. show : true,
  1721. orient: 'vertical',
  1722. x: 'right',
  1723. y: 'center',
  1724. feature : {
  1725. mark : {show: true},
  1726. dataView : {show: true, readOnly: false},
  1727. magicType: {show: true, type : ['line', 'bar']},
  1728. restore : {show: true},
  1729. saveAsImage : {show: true}
  1730. }
  1731. },
  1732. calculable : true,
  1733. xAxis : [
  1734. {
  1735. type : 'category',
  1736. data : ['周一','周二','周三','周四','周五','周六','周日']
  1737. }
  1738. ],
  1739. yAxis : [
  1740. {
  1741. type : 'value',
  1742. splitArea : {show : true}
  1743. }
  1744. ],
  1745. series : [
  1746. {
  1747. name:'直接访问',
  1748. type:'bar',
  1749. data:[320, 332, 301, 334, 390, 330, 320]
  1750. },
  1751. {
  1752. name:'邮件营销',
  1753. type:'bar',
  1754. stack: '广告',
  1755. data:[120, 132, 101, 134, 90, 230, 210]
  1756. },
  1757. {
  1758. name:'联盟广告',
  1759. type:'bar',
  1760. stack: '广告',
  1761. data:[220, 182, 191, 234, 290, 330, 310]
  1762. },
  1763. {
  1764. name:'视频广告',
  1765. type:'bar',
  1766. stack: '广告',
  1767. data:[150, 232, 201, 154, 190, 330, 410]
  1768. },
  1769. {
  1770. name:'搜索引擎',
  1771. type:'bar',
  1772. data:[862, 1018, 964, 1026, 1679, 1600, 1570]
  1773. },
  1774. {
  1775. name:'百度',
  1776. type:'bar',
  1777. barWidth : 5,
  1778. stack: '搜索引擎',
  1779. data:[620, 732, 701, 734, 1090, 1130, 1120]
  1780. },
  1781. {
  1782. name:'谷歌',
  1783. type:'bar',
  1784. stack: '搜索引擎',
  1785. data:[120, 132, 101, 134, 290, 230, 220]
  1786. },
  1787. {
  1788. name:'必应',
  1789. type:'bar',
  1790. stack: '搜索引擎',
  1791. data:[60, 72, 71, 74, 190, 130, 110]
  1792. },
  1793. {
  1794. name:'其他',
  1795. type:'bar',
  1796. stack: '搜索引擎',
  1797. data:[62, 82, 91, 84, 109, 110, 120]
  1798. }
  1799. ]
  1800. },
  1801. gf : {
  1802. color : [
  1803. 'rgba(255, 69, 0, 0.5)',
  1804. 'rgba(255, 150, 0, 0.5)',
  1805. 'rgba(255, 200, 0, 0.5)',
  1806. 'rgba(155, 200, 50, 0.5)',
  1807. 'rgba(55, 200, 100, 0.5)'
  1808. ],
  1809. title : {
  1810. text: '商业BI图表',
  1811. subtext: '纯属虚构'
  1812. },
  1813. tooltip : {
  1814. trigger: 'item',
  1815. formatter: "{a} <br/>{b} : {c}%"
  1816. },
  1817. toolbox: {
  1818. show : true,
  1819. feature : {
  1820. mark : {show: true},
  1821. dataView : {show: true, readOnly: false},
  1822. restore : {show: true},
  1823. saveAsImage : {show: true}
  1824. }
  1825. },
  1826. legend: {
  1827. data : ['展现','点击','访问','咨询','订单']
  1828. },
  1829. series : [
  1830. {
  1831. name:'业务指标',
  1832. type:'gauge',
  1833. center: ['25%','50%'],
  1834. splitNumber: 10, // 分割段数,默认为5
  1835. axisLine: { // 坐标轴线
  1836. lineStyle: { // 属性lineStyle控制线条样式
  1837. color: [[0.2, '#228b22'],[0.8, '#48b'],[1, 'rgb(255, 80, 20)']],
  1838. width: 8
  1839. }
  1840. },
  1841. axisTick: { // 坐标轴小标记
  1842. splitNumber: 10, // 每份split细分多少段
  1843. length :12, // 属性length控制线长
  1844. lineStyle: { // 属性lineStyle控制线条样式
  1845. color: 'auto'
  1846. }
  1847. },
  1848. axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
  1849. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1850. color: 'auto'
  1851. }
  1852. },
  1853. splitLine: { // 分隔线
  1854. show: true, // 默认显示,属性show控制显示与否
  1855. length :30, // 属性length控制线长
  1856. lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
  1857. color: 'auto'
  1858. }
  1859. },
  1860. pointer : {
  1861. width : 5
  1862. },
  1863. title : {
  1864. show : true,
  1865. offsetCenter: [0, '-40%'], // x, y,单位px
  1866. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1867. fontWeight: 'bolder'
  1868. }
  1869. },
  1870. detail : {
  1871. formatter:'{value}%',
  1872. textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  1873. color: 'auto',
  1874. fontWeight: 'bolder'
  1875. }
  1876. },
  1877. data:[{value: 85, name: '完成率'}]
  1878. },
  1879. {
  1880. name:'预期',
  1881. type:'funnel',
  1882. x: '45%',
  1883. width: '45%',
  1884. itemStyle: {
  1885. normal: {
  1886. label: {
  1887. formatter: '{b}预期'
  1888. },
  1889. labelLine: {
  1890. show : false
  1891. }
  1892. },
  1893. emphasis: {
  1894. label: {
  1895. position:'inside',
  1896. formatter: '{b}预期 : {c}%'
  1897. }
  1898. }
  1899. },
  1900. data:[
  1901. {value:60, name:'访问'},
  1902. {value:40, name:'咨询'},
  1903. {value:20, name:'订单'},
  1904. {value:80, name:'点击'},
  1905. {value:100, name:'展现'}
  1906. ]
  1907. },
  1908. {
  1909. name:'实际',
  1910. type:'funnel',
  1911. x: '45%',
  1912. width: '45%',
  1913. maxSize: '80%',
  1914. itemStyle: {
  1915. normal: {
  1916. borderColor: '#fff',
  1917. borderWidth: 2,
  1918. label: {
  1919. position: 'inside',
  1920. formatter: '{c}%',
  1921. textStyle: {
  1922. color: '#fff'
  1923. }
  1924. }
  1925. },
  1926. emphasis: {
  1927. label: {
  1928. position:'inside',
  1929. formatter: '{b}实际 : {c}%'
  1930. }
  1931. }
  1932. },
  1933. data:[
  1934. {value:30, name:'访问'},
  1935. {value:10, name:'咨询'},
  1936. {value:5, name:'订单'},
  1937. {value:50, name:'点击'},
  1938. {value:80, name:'展现'}
  1939. ]
  1940. }
  1941. ]
  1942. },
  1943. mix1 : {
  1944. color: ['#ff7f50','#87cefa','#da70d6','#ff69b4','#ba55d3','#32cd32','#6495ed'],
  1945. tooltip : {
  1946. trigger: 'axis'
  1947. },
  1948. toolbox: {
  1949. show : true,
  1950. feature : {
  1951. mark : {show: true},
  1952. dataView : {show: true, readOnly: false},
  1953. magicType: {show: true, type : ['line', 'bar']},
  1954. restore : {show: true},
  1955. saveAsImage : {show: true}
  1956. }
  1957. },
  1958. calculable : true,
  1959. legend: {
  1960. x : 'left',
  1961. data:['蒸发量','降水量','平均温度','日蒸发量','夜蒸发量','日降水量','夜降水量']
  1962. },
  1963. xAxis : [
  1964. {
  1965. type : 'category',
  1966. data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
  1967. }
  1968. ],
  1969. yAxis : [
  1970. {
  1971. type : 'value',
  1972. axisLabel : {
  1973. formatter: '{value} ml'
  1974. },
  1975. splitArea : {show : true}
  1976. },
  1977. {
  1978. type : 'value',
  1979. axisLabel : {
  1980. formatter: '{value} °C'
  1981. },
  1982. splitLine : {show : false}
  1983. }
  1984. ],
  1985. series : [
  1986. {
  1987. name:'总和',
  1988. type:'pie',
  1989. tooltip : {
  1990. trigger: 'item',
  1991. formatter: '{a} <br/>{b} : {c} ({d}%)'
  1992. },
  1993. center: [230,130],
  1994. radius : [0, 50],
  1995. itemStyle : {
  1996. normal : {
  1997. labelLine : {
  1998. length : 20
  1999. }
  2000. }
  2001. },
  2002. data:[
  2003. {value:356.5, name:'日降水量'},
  2004. {value:220.4, name:'夜降水量'},
  2005. {value:59.0, name:'夜蒸发量'},
  2006. {value:440.5, name:'日蒸发量'}
  2007. ]
  2008. },
  2009. {
  2010. name:'蒸发量',
  2011. type:'bar',
  2012. data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
  2013. },
  2014. {
  2015. name:'降水量',
  2016. type:'bar',
  2017. data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
  2018. },
  2019. {
  2020. name:'平均温度',
  2021. type:'line',
  2022. yAxisIndex: 1,
  2023. data:[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
  2024. }
  2025. ]
  2026. },
  2027. mix2 : (function (){
  2028. var sData1 = (function () {
  2029. var d = [];
  2030. var len = 40;
  2031. var value;
  2032. while (len--) {
  2033. d.push([
  2034. Math.round(Math.random()*10) * (Math.round(Math.random()*10) > 5 ? 1 : -1),
  2035. Math.round(Math.random()*10) * (Math.round(Math.random()*10) > 5 ? 1 : -1),
  2036. Math.round(Math.random()*20)
  2037. ]);
  2038. }
  2039. return d;
  2040. })();
  2041. var sData2 = (function () {
  2042. var d = [];
  2043. var len = sData1.length;
  2044. for (var i = 0; i < len; i++) {
  2045. d.push([
  2046. sData1[i][0],
  2047. sData1[i][1],
  2048. Math.round(Math.random()*15)
  2049. ]);
  2050. }
  2051. return d;
  2052. })();
  2053. functionMap.mix2 = function (){
  2054. var xAxis = myChart.component.xAxis.getAxis(0);
  2055. var yAxis = myChart.component.yAxis.getAxis(0);
  2056. var len = sData1.length;
  2057. var option = myChart.getOption();
  2058. option.series = option.series.slice(0,2);
  2059. option.legend = {
  2060. data : ['系列1', '系列2']
  2061. };
  2062. while (len--) {
  2063. option.series.push({
  2064. type: 'pie',
  2065. itemStyle : {
  2066. normal : {
  2067. label : {
  2068. show : false
  2069. },
  2070. labelLine : {
  2071. show : false
  2072. }
  2073. }
  2074. },
  2075. //radius : [(sData1[len][2] + sData2[len][2])/2.5, (sData1[len][2] + sData2[len][2])/2.5 + 15],
  2076. radius : (sData1[len][2] + sData2[len][2])/2.5 + 15,
  2077. center: [
  2078. xAxis.getCoord(sData1[len][0]),
  2079. yAxis.getCoord(sData1[len][1])
  2080. ],
  2081. data: [
  2082. {name: '系列1', value: sData1[len][2]},
  2083. {name: '系列2', value: sData2[len][2]}
  2084. ]
  2085. })
  2086. }
  2087. option.animation = true;
  2088. myChart.setOption(option);
  2089. }
  2090. return {
  2091. color : ['rgba(255, 69, 0, 0.5)', 'rgba(30, 144, 255, 0.5)'],
  2092. title : {
  2093. text: '饼图代替散点',
  2094. subtext : '混搭(随机数据)'
  2095. },
  2096. tooltip : {
  2097. trigger: 'item',
  2098. formatter: "{b} : {c} ({d}%)"
  2099. },
  2100. toolbox: {
  2101. show : true,
  2102. feature : {
  2103. mark : {show: true},
  2104. dataView : {show: true, readOnly: false},
  2105. restore : {show: true},
  2106. saveAsImage : {show: true}
  2107. }
  2108. },
  2109. xAxis : [
  2110. {
  2111. type : 'value',
  2112. splitNumber: 2,
  2113. splitLine : {lineStyle:{color:'#48b',width:2}},
  2114. splitArea: {show:true},
  2115. axisLine : {show:false}
  2116. }
  2117. ],
  2118. yAxis : [
  2119. {
  2120. type : 'value',
  2121. splitNumber: 2,
  2122. splitLine : {lineStyle:{color:'#48b',width:2}},
  2123. splitArea : {show : true},
  2124. axisLine : {show:false}
  2125. }
  2126. ],
  2127. animation: false,
  2128. series : [
  2129. {
  2130. type:'scatter',
  2131. symbol: 'none',
  2132. data: sData1
  2133. },
  2134. {
  2135. type:'scatter',
  2136. symbol: 'none',
  2137. data: sData2
  2138. }
  2139. ]
  2140. };
  2141. })(),
  2142. mix3 : {
  2143. title : {
  2144. text: '2011全国GDP(亿元)',
  2145. subtext: '数据来自国家统计局'
  2146. },
  2147. tooltip : {
  2148. trigger: 'item'
  2149. },
  2150. legend: {
  2151. x:'right',
  2152. selectedMode:false,
  2153. data:['北京','上海','广东']
  2154. },
  2155. dataRange: {
  2156. orient: 'horizontal',
  2157. min: 0,
  2158. max: 55000,
  2159. text:['高','低'], // 文本,默认为数值文本
  2160. splitNumber:0
  2161. },
  2162. toolbox: {
  2163. show : true,
  2164. orient: 'vertical',
  2165. x:'right',
  2166. y:'center',
  2167. feature : {
  2168. mark : {show: true},
  2169. dataView : {show: true, readOnly: false}
  2170. }
  2171. },
  2172. series : [
  2173. {
  2174. name: '2011全国GDP分布',
  2175. type: 'map',
  2176. mapType: 'china',
  2177. mapLocation: {
  2178. x: 'left'
  2179. },
  2180. selectedMode : 'multiple',
  2181. itemStyle:{
  2182. normal:{label:{show:true}},
  2183. emphasis:{label:{show:true}}
  2184. },
  2185. data:[
  2186. {name:'西藏', value:605.83},
  2187. {name:'青海', value:1670.44},
  2188. {name:'宁夏', value:2102.21},
  2189. {name:'海南', value:2522.66},
  2190. {name:'甘肃', value:5020.37},
  2191. {name:'贵州', value:5701.84},
  2192. {name:'新疆', value:6610.05},
  2193. {name:'云南', value:8893.12},
  2194. {name:'重庆', value:10011.37},
  2195. {name:'吉林', value:10568.83},
  2196. {name:'山西', value:11237.55},
  2197. {name:'天津', value:11307.28},
  2198. {name:'江西', value:11702.82},
  2199. {name:'广西', value:11720.87},
  2200. {name:'陕西', value:12512.3},
  2201. {name:'黑龙江', value:12582},
  2202. {name:'内蒙古', value:14359.88},
  2203. {name:'安徽', value:15300.65},
  2204. {name:'北京', value:16251.93, selected:true},
  2205. {name:'福建', value:17560.18},
  2206. {name:'上海', value:19195.69, selected:true},
  2207. {name:'湖北', value:19632.26},
  2208. {name:'湖南', value:19669.56},
  2209. {name:'四川', value:21026.68},
  2210. {name:'辽宁', value:22226.7},
  2211. {name:'河北', value:24515.76},
  2212. {name:'河南', value:26931.03},
  2213. {name:'浙江', value:32318.85},
  2214. {name:'山东', value:45361.85},
  2215. {name:'江苏', value:49110.27},
  2216. {name:'广东', value:53210.28, selected:true}
  2217. ]
  2218. },
  2219. {
  2220. name:'2011全国GDP对比',
  2221. type:'pie',
  2222. roseType : 'area',
  2223. tooltip: {
  2224. trigger: 'item',
  2225. formatter: "{a} <br/>{b} : {c} ({d}%)"
  2226. },
  2227. center: [700, 225],
  2228. radius: [30, 120],
  2229. data:[
  2230. {name: '北京', value: 16251.93},
  2231. {name: '上海', value: 19195.69},
  2232. {name: '广东', value: 53210.28}
  2233. ]
  2234. }
  2235. ],
  2236. animation: (function () {
  2237. functionMap.mix3 = function () {
  2238. var ecConfig = require('echarts/config');
  2239. myChart.on(ecConfig.EVENT.MAP_SELECTED, function (param){
  2240. var selected = param.selected;
  2241. var option = optionMap.mix3;
  2242. var mapSeries = option.series[0];
  2243. var data = [];
  2244. var legendData = [];
  2245. var name;
  2246. for (var p = 0, len = mapSeries.data.length; p < len; p++) {
  2247. name = mapSeries.data[p].name;
  2248. mapSeries.data[p].selected = selected[name];
  2249. if (selected[name]) {
  2250. data.push({
  2251. name: name,
  2252. value: mapSeries.data[p].value
  2253. });
  2254. legendData.push(name);
  2255. }
  2256. }
  2257. option.legend.data = legendData;
  2258. option.series[1].data = data;
  2259. myChart.setOption(option, true);
  2260. })
  2261. }
  2262. return false;
  2263. })()
  2264. },
  2265. lasagna : (function () {
  2266. functionMap.lasagna = function () {
  2267. myChart.setOption({
  2268. tooltip : {
  2269. trigger: 'item',
  2270. formatter: "{a} <br/>{b} : {c} ({d}%)"
  2271. },
  2272. legend: {
  2273. orient : 'vertical',
  2274. x : 'left',
  2275. data:['Chrome','Firefox','Safari','IE9+','IE8-']
  2276. },
  2277. toolbox: {
  2278. show : true,
  2279. feature : {
  2280. mark : {show: true},
  2281. dataView : {show: true, readOnly: false},
  2282. restore : {show: true},
  2283. saveAsImage : {show: true}
  2284. }
  2285. },
  2286. series : (function (){
  2287. var series = [];
  2288. for (var i = 0; i < 30; i++) {
  2289. series.push({
  2290. name:'浏览器(数据纯属虚构)',
  2291. type:'pie',
  2292. itemStyle : {normal : {
  2293. label : {show : i > 28},
  2294. labelLine : {show : i > 28, length:20}
  2295. }},
  2296. radius : [i * 4 + 40, i * 4 + 43],
  2297. data:[
  2298. {value: i * 128 + 80, name:'Chrome'},
  2299. {value: i * 64 + 160, name:'Firefox'},
  2300. {value: i * 32 + 320, name:'Safari'},
  2301. {value: i * 16 + 640, name:'IE9+'},
  2302. {value: i * 8 + 1280, name:'IE8-'}
  2303. ]
  2304. })
  2305. }
  2306. series[0].markPoint = {
  2307. symbol:'emptyCircle',
  2308. symbolSize:series[0].radius[0],
  2309. effect:{show:true,scaleSize:13,color:'rgba(250,225,50,0.8)',shadowBlur:10,period:30},
  2310. data:[{x:'50%',y:'50%'}]
  2311. };
  2312. return series;
  2313. })(),
  2314. calculable : (function (){
  2315. setTimeout(function (){
  2316. if (!myChart) {
  2317. return;
  2318. }
  2319. var _ZR = myChart.getZrender();
  2320. var TextShape = require('zrender/shape/Text');
  2321. // 补充千层饼
  2322. _ZR.addShape(new TextShape({
  2323. style : {
  2324. x : _ZR.getWidth() / 2,
  2325. y : _ZR.getHeight() / 2,
  2326. color: '#666',
  2327. text : '恶梦的过去',
  2328. textAlign : 'center'
  2329. }
  2330. }));
  2331. _ZR.addShape(new TextShape({
  2332. style : {
  2333. x : _ZR.getWidth() / 2 + 200,
  2334. y : _ZR.getHeight() / 2,
  2335. brushType:'fill',
  2336. color: 'orange',
  2337. text : '美好的未来',
  2338. textAlign : 'left',
  2339. textFont:'normal 20px 微软雅黑'
  2340. }
  2341. }));
  2342. _ZR.refresh();
  2343. }, 2000);
  2344. return false;
  2345. })()
  2346. }, true);
  2347. }
  2348. functionMap.wormhole = function() {
  2349. myChart.clear();
  2350. myChart.getZrender().clear();
  2351. myChart.setOption({
  2352. color : (function(){
  2353. var zrColor = require('zrender/tool/color');
  2354. return zrColor.getStepColors('yellow', 'red', 28);
  2355. })(),
  2356. title : {
  2357. text: '浏览器占比变化',
  2358. subtext: '纯属虚构',
  2359. x:'right',
  2360. y:'bottom'
  2361. },
  2362. tooltip : {
  2363. trigger: 'item',
  2364. backgroundColor : 'rgba(0,0,250,0.2)'
  2365. },
  2366. legend: {
  2367. // orient : 'vertical',
  2368. //x : 'center',
  2369. data: function(){
  2370. var list = [];
  2371. for (var i = 1; i <=28; i++) {
  2372. list.push(i + 2000);
  2373. }
  2374. return list;
  2375. }()
  2376. },
  2377. toolbox: {
  2378. show : true,
  2379. orient : 'vertical',
  2380. y:'center',
  2381. feature : {
  2382. mark : {show: true},
  2383. dataView : {show: true, readOnly: false},
  2384. restore : {show: true},
  2385. saveAsImage : {show: true}
  2386. }
  2387. },
  2388. polar : [
  2389. {
  2390. indicator : [
  2391. { text: 'IE8-', max: 400},
  2392. { text: 'IE9+', max: 400},
  2393. { text: 'Safari', max: 400},
  2394. { text: 'Firefox', max: 400},
  2395. { text: 'Chrome', max: 400}
  2396. ],
  2397. center : ['50%', 240],
  2398. radius : 150
  2399. }
  2400. ],
  2401. calculable : false,
  2402. series : (function(){
  2403. var series = [];
  2404. for (var i = 1; i <= 28; i++) {
  2405. series.push({
  2406. name:'浏览器(数据纯属虚构)',
  2407. type:'radar',
  2408. symbol:'none',
  2409. itemStyle: {
  2410. normal: {
  2411. lineStyle: {
  2412. width:1
  2413. }
  2414. },
  2415. emphasis : {
  2416. areaStyle: {color:'rgba(0,250,0,0.3)'}
  2417. }
  2418. },
  2419. data:[
  2420. {
  2421. value:[
  2422. (40 - i) * 10,
  2423. (38 - i) * 4 + 60,
  2424. i * 5 + 10,
  2425. i * 9,
  2426. i * i /2
  2427. ],
  2428. name:i + 2000
  2429. }
  2430. ]
  2431. })
  2432. }
  2433. return series;
  2434. })()
  2435. }, true);
  2436. }
  2437. return {};
  2438. })(),
  2439. effect1 : (function() {
  2440. var effect = {
  2441. show: true,
  2442. scaleSize: 1,//require('zrender/tool/env').canvasSupported ? 1 : 2,
  2443. period: 30, // 运动周期,无单位,值越大越慢
  2444. color: '#fff',
  2445. shadowColor: 'rgba(220,220,220,0.4)',
  2446. shadowBlur : 5
  2447. };
  2448. function itemStyle(idx) {
  2449. return {
  2450. normal: {
  2451. color:'#fff',
  2452. borderWidth:1,
  2453. borderColor:['rgba(30,144,255,1)','lime'][idx],
  2454. lineStyle: {
  2455. //shadowColor : ['rgba(30,144,255,1)','lime'][idx], //默认透明
  2456. //shadowBlur: 10,
  2457. //shadowOffsetX: 0,
  2458. //shadowOffsetY: 0,
  2459. type: 'solid'
  2460. }
  2461. }
  2462. }
  2463. };
  2464. functionMap.effect1 = function() {
  2465. myChart.setOption({
  2466. backgroundColor: 'rgba(0,0,0,0)',
  2467. color: ['rgba(30,144,255,1)','lime'],
  2468. title : {
  2469. text: '中国铁路运输主干线',
  2470. subtext:'数据来自维基百科',
  2471. sublink: 'http://zh.wikipedia.org/wiki/%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD%E9%93%81%E8%B7%AF%E8%BF%90%E8%BE%93',
  2472. x:'center',
  2473. textStyle : {
  2474. color: '#fff'
  2475. }
  2476. },
  2477. tooltip : {
  2478. trigger: 'item',
  2479. formatter: function(v) {
  2480. return v[1].replace(':', ' > ');
  2481. }
  2482. },
  2483. legend: {
  2484. orient: 'vertical',
  2485. x:'left',
  2486. selectedMode:'single',
  2487. data:['八纵通道', '八横通道'],
  2488. textStyle : {
  2489. color: '#fff'
  2490. }
  2491. },
  2492. toolbox: {
  2493. show : true,
  2494. orient : 'vertical',
  2495. x: 'right',
  2496. y: 'center',
  2497. feature : {
  2498. mark : {show: true},
  2499. dataView : {show: true, readOnly: false},
  2500. restore : {show: true},
  2501. saveAsImage : {show: true}
  2502. }
  2503. },
  2504. series : [
  2505. {
  2506. name: '八纵通道',
  2507. type: 'map',
  2508. roam: true,
  2509. hoverable: false,
  2510. mapType: 'china',
  2511. itemStyle:{
  2512. normal:{
  2513. borderColor:'rgba(100,149,237,1)',
  2514. borderWidth:0.5,
  2515. areaStyle:{
  2516. color: '#333'
  2517. }
  2518. }
  2519. },
  2520. data:[],
  2521. markLine : {
  2522. symbol: ['circle', 'circle'],
  2523. symbolSize : 1,
  2524. effect : effect,
  2525. itemStyle : itemStyle(0),
  2526. smooth:true,
  2527. data : [
  2528. [{name:'北京'}, {name:'哈尔滨'}],
  2529. [{name:'哈尔滨'}, {name:'满洲里'}],
  2530. [{name:'沈阳'}, {name:'大连'}],
  2531. [{name:'大连'}, {name:'烟台'}],
  2532. [{name:'烟台'}, {name:'青岛'}],
  2533. [{name:'青岛'}, {name:'淮安'}],
  2534. [{name:'淮安'}, {name:'上海'}],
  2535. [{name:'上海'}, {name:'杭州'}],
  2536. [{name:'杭州'}, {name:'宁波'}],
  2537. [{name:'宁波'}, {name:'温州'}],
  2538. [{name:'温州'}, {name:'福州'}],
  2539. [{name:'福州'}, {name:'厦门'}],
  2540. [{name:'厦门'}, {name:'广州'}],
  2541. [{name:'广州'}, {name:'湛江'}],
  2542. [{name:'北京'}, {name:'天津'}],
  2543. [{name:'天津'}, {name:'济南'}],
  2544. [{name:'济南'}, {name:'南京'}],
  2545. [{name:'南京'}, {name:'上海'}],
  2546. [{name:'北京'}, {name:'南昌'}],
  2547. [{name:'南昌'}, {name:'深圳'}],
  2548. [{name:'深圳'}, {name:'九龙红磡'}],
  2549. [{name:'北京'}, {name:'郑州'}],
  2550. [{name:'郑州'}, {name:'武汉'}],
  2551. [{name:'武汉'}, {name:'广州'}],
  2552. [{name:'大同'}, {name:'太原'}],
  2553. [{name:'太原'}, {name:'焦作'}],
  2554. [{name:'焦作'}, {name:'洛阳'}],
  2555. [{name:'洛阳'}, {name:'柳州'}],
  2556. [{name:'柳州'}, {name:'湛江'}],
  2557. [{name:'包头'}, {name:'西安'}],
  2558. [{name:'西安'}, {name:'重庆'}],
  2559. [{name:'重庆'}, {name:'贵阳'}],
  2560. [{name:'贵阳'}, {name:'柳州'}],
  2561. [{name:'柳州'}, {name:'南宁'}],
  2562. [{name:'兰州'}, {name:'成都'}],
  2563. [{name:'成都'}, {name:'昆明'}]
  2564. ]
  2565. }
  2566. },
  2567. {
  2568. name: '八横通道',
  2569. type: 'map',
  2570. mapType: 'china',
  2571. data:[],
  2572. markLine : {
  2573. symbol: ['circle', 'circle'],
  2574. symbolSize : 1,
  2575. effect : effect,
  2576. itemStyle : itemStyle(1),
  2577. smooth:true,
  2578. data : [
  2579. [{name:'北京'}, {name:'兰州'}],
  2580. [{name:'兰州'}, {name:'拉萨'}],
  2581. [{name:'大同'}, {name:'秦皇岛'}],
  2582. [{name:'神木'}, {name:'黄骅'}],
  2583. [{name:'太原'}, {name:'德州'}],
  2584. [{name:'德州'}, {name:'龙口'}],
  2585. [{name:'龙口'}, {name:'烟台'}],
  2586. [{name:'太原'}, {name:'德州'}],
  2587. [{name:'德州'}, {name:'济南'}],
  2588. [{name:'济南'}, {name:'青岛'}],
  2589. [{name:'长治'}, {name:'邯郸'}],
  2590. [{name:'邯郸'}, {name:'济南'}],
  2591. [{name:'济南'}, {name:'青岛'}],
  2592. [{name:'瓦塘'}, {name:'临汾'}],
  2593. [{name:'临汾'}, {name:'长治'}],
  2594. [{name:'长治'}, {name:'汤阴'}],
  2595. [{name:'汤阴'}, {name:'台前'}],
  2596. [{name:'台前'}, {name:'兖州'}],
  2597. [{name:'兖州'}, {name:'日照'}],
  2598. [{name:'侯马'}, {name:'月山'}],
  2599. [{name:'月山'}, {name:'新乡'}],
  2600. [{name:'新乡'}, {name:'兖州'}],
  2601. [{name:'兖州'}, {name:'日照'}],
  2602. [{name:'连云港'}, {name:'郑州'}],
  2603. [{name:'郑州'}, {name:'兰州'}],
  2604. [{name:'兰州'}, {name:'乌鲁木齐'}],
  2605. [{name:'乌鲁木齐'}, {name:'阿拉山口'}],
  2606. [{name:'西安'}, {name:'南阳'}],
  2607. [{name:'南阳'}, {name:'信阳'}],
  2608. [{name:'信阳'}, {name:'合肥'}],
  2609. [{name:'合肥'}, {name:'南京'}],
  2610. [{name:'南京'}, {name:'启东'}],
  2611. [{name:'重庆'}, {name:'武汉'}],
  2612. [{name:'武汉'}, {name:'九江'}],
  2613. [{name:'九江'}, {name:'铜陵'}],
  2614. [{name:'铜陵'}, {name:'南京'}],
  2615. [{name:'南京'}, {name:'上海'}],
  2616. [{name:'上海'}, {name:'怀化'}],
  2617. [{name:'怀化'}, {name:'重庆'}],
  2618. [{name:'重庆'}, {name:'成都'}],
  2619. [{name:'成都'}, {name:'贵阳'}],
  2620. [{name:'贵阳'}, {name:'昆明'}],
  2621. [{name:'昆明'}, {name:'南宁'}],
  2622. [{name:'南宁'}, {name:'黎塘'}],
  2623. [{name:'黎塘'}, {name:'湛江'}]
  2624. ]
  2625. },
  2626. geoCoord: {
  2627. '阿拉山口':[82.5757,45.1706],
  2628. '包头':[109.8403,40.6574],
  2629. '北京':[116.4075,39.9040],
  2630. '成都':[104.0665,30.5723],
  2631. '大连':[121.6147,38.9140],
  2632. '大同':[113.3001,40.0768],
  2633. '德州':[116.3575,37.4341],
  2634. '福州':[119.2965,26.0745],
  2635. '广州':[113.2644,23.1292],
  2636. '贵阳':[106.6302,26.6477],
  2637. '哈尔滨':[126.5363,45.8023],
  2638. '邯郸':[114.5391,36.6256],
  2639. '杭州':[120.1551,30.2741],
  2640. '合肥':[117.2272,31.8206],
  2641. '侯马':[111.3720,35.6191],
  2642. '怀化':[109.9985,27.5550],
  2643. '淮安':[119.0153,33.6104],
  2644. '黄骅':[117.3300,38.3714],
  2645. '济南':[117.1205,36.6510],
  2646. '焦作':[113.2418,35.2159],
  2647. '九江':[116.0019,29.7051],
  2648. '九龙红磡':[114.1870,22.3076],
  2649. '昆明':[102.8329,24.8801],
  2650. '拉萨':[91.1409,29.6456],
  2651. '兰州':[103.8343,36.0611],
  2652. '黎塘':[109.1363,23.2066],
  2653. '连云港':[119.2216,34.5967],
  2654. '临汾':[111.5190,36.0880],
  2655. '柳州':[109.4160,24.3255],
  2656. '龙口':[120.4778,37.6461],
  2657. '洛阳':[112.4540,34.6197],
  2658. '满洲里':[117.3787,49.5978],
  2659. '南昌':[115.8581,28.6832],
  2660. '南京':[118.7969,32.0603],
  2661. '南宁':[108.3661,22.8172],
  2662. '南阳':[112.5283,32.9908],
  2663. '宁波':[121.5440,29.8683],
  2664. '启东':[121.6574,31.8082],
  2665. '秦皇岛':[119.6005,39.9354],
  2666. '青岛':[120.3826,36.0671],
  2667. '日照':[119.5269,35.4164],
  2668. '厦门':[118.0894,24.4798],
  2669. '上海':[121.4737,31.2304],
  2670. '深圳':[114.0579,22.5431],
  2671. '神木':[110.4871,38.8610],
  2672. '沈阳':[123.4315,41.8057],
  2673. '台前':[115.8717,35.9701],
  2674. '太原':[112.5489,37.8706],
  2675. '汤阴':[114.3572,35.9218],
  2676. '天津':[117.2010,39.0842],
  2677. '铜陵':[117.8121,30.9454],
  2678. '瓦塘':[109.7600,23.3161],
  2679. '温州':[120.6994,27.9943],
  2680. '乌鲁木齐':[87.6168,43.8256],
  2681. '武汉':[114.3054,30.5931],
  2682. '西安':[108.9402,34.3416],
  2683. '新乡':[113.9268,35.3030],
  2684. '信阳':[114.0913,32.1470],
  2685. '烟台':[121.4479,37.4638],
  2686. '兖州':[116.7838,35.5531],
  2687. '月山':[113.0550,35.2104],
  2688. '湛江':[110.3594,21.2707],
  2689. '长治':[113.1163,36.1954],
  2690. '郑州':[113.6254,34.7466],
  2691. '重庆':[106.5516,29.5630]
  2692. }
  2693. }
  2694. ]
  2695. }, true);
  2696. }
  2697. return {};
  2698. })(),
  2699. effect2 : {
  2700. backgroundColor: 'rgba(0,0,0,0)',
  2701. color: ['gold','aqua','lime'],
  2702. title : {
  2703. text: '模拟迁徙',
  2704. subtext:'数据纯属虚构',
  2705. x:'center',
  2706. textStyle : {
  2707. color: '#fff'
  2708. }
  2709. },
  2710. tooltip : {
  2711. trigger: 'item',
  2712. formatter: function(v) {
  2713. return v[1].replace(':', ' > ');
  2714. }
  2715. },
  2716. legend: {
  2717. orient: 'vertical',
  2718. x:'left',
  2719. data:['北京 Top10', '上海 Top10', '广州 Top10'],
  2720. selectedMode: 'single',
  2721. selected:{
  2722. '上海 Top10' : false,
  2723. '广州 Top10' : false
  2724. },
  2725. textStyle : {
  2726. color: '#fff'
  2727. }
  2728. },
  2729. toolbox: {
  2730. show : true,
  2731. orient : 'vertical',
  2732. x: 'right',
  2733. y: 'center',
  2734. feature : {
  2735. mark : {show: true},
  2736. dataView : {show: true, readOnly: false},
  2737. restore : {show: true},
  2738. saveAsImage : {show: true}
  2739. }
  2740. },
  2741. dataRange: {
  2742. min : 0,
  2743. max : 100,
  2744. calculable : true,
  2745. color: ['#ff3333', 'orange', 'yellow','lime','aqua'],
  2746. textStyle:{
  2747. color:'#fff'
  2748. }
  2749. },
  2750. series : [
  2751. {
  2752. name: '全国',
  2753. type: 'map',
  2754. roam: true,
  2755. hoverable: false,
  2756. mapType: 'china',
  2757. itemStyle:{
  2758. normal:{
  2759. borderColor:'rgba(100,149,237,1)',
  2760. borderWidth:0.5,
  2761. areaStyle:{
  2762. color: '#333'
  2763. }
  2764. }
  2765. },
  2766. data:[],
  2767. markLine : {
  2768. smooth:true,
  2769. symbol: ['none', 'circle'],
  2770. symbolSize : 1,
  2771. itemStyle : {
  2772. normal: {
  2773. color:'#fff',
  2774. borderWidth:1,
  2775. borderColor:'rgba(30,144,255,0.5)'
  2776. }
  2777. },
  2778. data : [
  2779. [{name:'北京'},{name:'包头'}],
  2780. [{name:'北京'},{name:'北海'}],
  2781. [{name:'北京'},{name:'广州'}],
  2782. [{name:'北京'},{name:'郑州'}],
  2783. [{name:'北京'},{name:'长春'}],
  2784. [{name:'北京'},{name:'长治'}],
  2785. [{name:'北京'},{name:'重庆'}],
  2786. [{name:'北京'},{name:'长沙'}],
  2787. [{name:'北京'},{name:'成都'}],
  2788. [{name:'北京'},{name:'常州'}],
  2789. [{name:'北京'},{name:'丹东'}],
  2790. [{name:'北京'},{name:'大连'}],
  2791. [{name:'北京'},{name:'东营'}],
  2792. [{name:'北京'},{name:'延安'}],
  2793. [{name:'北京'},{name:'福州'}],
  2794. [{name:'北京'},{name:'海口'}],
  2795. [{name:'北京'},{name:'呼和浩特'}],
  2796. [{name:'北京'},{name:'合肥'}],
  2797. [{name:'北京'},{name:'杭州'}],
  2798. [{name:'北京'},{name:'哈尔滨'}],
  2799. [{name:'北京'},{name:'舟山'}],
  2800. [{name:'北京'},{name:'银川'}],
  2801. [{name:'北京'},{name:'衢州'}],
  2802. [{name:'北京'},{name:'南昌'}],
  2803. [{name:'北京'},{name:'昆明'}],
  2804. [{name:'北京'},{name:'贵阳'}],
  2805. [{name:'北京'},{name:'兰州'}],
  2806. [{name:'北京'},{name:'拉萨'}],
  2807. [{name:'北京'},{name:'连云港'}],
  2808. [{name:'北京'},{name:'临沂'}],
  2809. [{name:'北京'},{name:'柳州'}],
  2810. [{name:'北京'},{name:'宁波'}],
  2811. [{name:'北京'},{name:'南京'}],
  2812. [{name:'北京'},{name:'南宁'}],
  2813. [{name:'北京'},{name:'南通'}],
  2814. [{name:'北京'},{name:'上海'}],
  2815. [{name:'北京'},{name:'沈阳'}],
  2816. [{name:'北京'},{name:'西安'}],
  2817. [{name:'北京'},{name:'汕头'}],
  2818. [{name:'北京'},{name:'深圳'}],
  2819. [{name:'北京'},{name:'青岛'}],
  2820. [{name:'北京'},{name:'济南'}],
  2821. [{name:'北京'},{name:'太原'}],
  2822. [{name:'北京'},{name:'乌鲁木齐'}],
  2823. [{name:'北京'},{name:'潍坊'}],
  2824. [{name:'北京'},{name:'威海'}],
  2825. [{name:'北京'},{name:'温州'}],
  2826. [{name:'北京'},{name:'武汉'}],
  2827. [{name:'北京'},{name:'无锡'}],
  2828. [{name:'北京'},{name:'厦门'}],
  2829. [{name:'北京'},{name:'西宁'}],
  2830. [{name:'北京'},{name:'徐州'}],
  2831. [{name:'北京'},{name:'烟台'}],
  2832. [{name:'北京'},{name:'盐城'}],
  2833. [{name:'北京'},{name:'珠海'}],
  2834. [{name:'上海'},{name:'包头'}],
  2835. [{name:'上海'},{name:'北海'}],
  2836. [{name:'上海'},{name:'广州'}],
  2837. [{name:'上海'},{name:'郑州'}],
  2838. [{name:'上海'},{name:'长春'}],
  2839. [{name:'上海'},{name:'重庆'}],
  2840. [{name:'上海'},{name:'长沙'}],
  2841. [{name:'上海'},{name:'成都'}],
  2842. [{name:'上海'},{name:'丹东'}],
  2843. [{name:'上海'},{name:'大连'}],
  2844. [{name:'上海'},{name:'福州'}],
  2845. [{name:'上海'},{name:'海口'}],
  2846. [{name:'上海'},{name:'呼和浩特'}],
  2847. [{name:'上海'},{name:'合肥'}],
  2848. [{name:'上海'},{name:'哈尔滨'}],
  2849. [{name:'上海'},{name:'舟山'}],
  2850. [{name:'上海'},{name:'银川'}],
  2851. [{name:'上海'},{name:'南昌'}],
  2852. [{name:'上海'},{name:'昆明'}],
  2853. [{name:'上海'},{name:'贵阳'}],
  2854. [{name:'上海'},{name:'兰州'}],
  2855. [{name:'上海'},{name:'拉萨'}],
  2856. [{name:'上海'},{name:'连云港'}],
  2857. [{name:'上海'},{name:'临沂'}],
  2858. [{name:'上海'},{name:'柳州'}],
  2859. [{name:'上海'},{name:'宁波'}],
  2860. [{name:'上海'},{name:'南宁'}],
  2861. [{name:'上海'},{name:'北京'}],
  2862. [{name:'上海'},{name:'沈阳'}],
  2863. [{name:'上海'},{name:'秦皇岛'}],
  2864. [{name:'上海'},{name:'西安'}],
  2865. [{name:'上海'},{name:'石家庄'}],
  2866. [{name:'上海'},{name:'汕头'}],
  2867. [{name:'上海'},{name:'深圳'}],
  2868. [{name:'上海'},{name:'青岛'}],
  2869. [{name:'上海'},{name:'济南'}],
  2870. [{name:'上海'},{name:'天津'}],
  2871. [{name:'上海'},{name:'太原'}],
  2872. [{name:'上海'},{name:'乌鲁木齐'}],
  2873. [{name:'上海'},{name:'潍坊'}],
  2874. [{name:'上海'},{name:'威海'}],
  2875. [{name:'上海'},{name:'温州'}],
  2876. [{name:'上海'},{name:'武汉'}],
  2877. [{name:'上海'},{name:'厦门'}],
  2878. [{name:'上海'},{name:'西宁'}],
  2879. [{name:'上海'},{name:'徐州'}],
  2880. [{name:'上海'},{name:'烟台'}],
  2881. [{name:'上海'},{name:'珠海'}],
  2882. [{name:'广州'},{name:'北海'}],
  2883. [{name:'广州'},{name:'郑州'}],
  2884. [{name:'广州'},{name:'长春'}],
  2885. [{name:'广州'},{name:'重庆'}],
  2886. [{name:'广州'},{name:'长沙'}],
  2887. [{name:'广州'},{name:'成都'}],
  2888. [{name:'广州'},{name:'常州'}],
  2889. [{name:'广州'},{name:'大连'}],
  2890. [{name:'广州'},{name:'福州'}],
  2891. [{name:'广州'},{name:'海口'}],
  2892. [{name:'广州'},{name:'呼和浩特'}],
  2893. [{name:'广州'},{name:'合肥'}],
  2894. [{name:'广州'},{name:'杭州'}],
  2895. [{name:'广州'},{name:'哈尔滨'}],
  2896. [{name:'广州'},{name:'舟山'}],
  2897. [{name:'广州'},{name:'银川'}],
  2898. [{name:'广州'},{name:'南昌'}],
  2899. [{name:'广州'},{name:'昆明'}],
  2900. [{name:'广州'},{name:'贵阳'}],
  2901. [{name:'广州'},{name:'兰州'}],
  2902. [{name:'广州'},{name:'拉萨'}],
  2903. [{name:'广州'},{name:'连云港'}],
  2904. [{name:'广州'},{name:'临沂'}],
  2905. [{name:'广州'},{name:'柳州'}],
  2906. [{name:'广州'},{name:'宁波'}],
  2907. [{name:'广州'},{name:'南京'}],
  2908. [{name:'广州'},{name:'南宁'}],
  2909. [{name:'广州'},{name:'南通'}],
  2910. [{name:'广州'},{name:'北京'}],
  2911. [{name:'广州'},{name:'上海'}],
  2912. [{name:'广州'},{name:'沈阳'}],
  2913. [{name:'广州'},{name:'西安'}],
  2914. [{name:'广州'},{name:'石家庄'}],
  2915. [{name:'广州'},{name:'汕头'}],
  2916. [{name:'广州'},{name:'青岛'}],
  2917. [{name:'广州'},{name:'济南'}],
  2918. [{name:'广州'},{name:'天津'}],
  2919. [{name:'广州'},{name:'太原'}],
  2920. [{name:'广州'},{name:'乌鲁木齐'}],
  2921. [{name:'广州'},{name:'温州'}],
  2922. [{name:'广州'},{name:'武汉'}],
  2923. [{name:'广州'},{name:'无锡'}],
  2924. [{name:'广州'},{name:'厦门'}],
  2925. [{name:'广州'},{name:'西宁'}],
  2926. [{name:'广州'},{name:'徐州'}],
  2927. [{name:'广州'},{name:'烟台'}],
  2928. [{name:'广州'},{name:'盐城'}]
  2929. ]
  2930. },
  2931. geoCoord: {
  2932. '上海': [121.4648,31.2891],
  2933. '东莞': [113.8953,22.901],
  2934. '东营': [118.7073,37.5513],
  2935. '中山': [113.4229,22.478],
  2936. '临汾': [111.4783,36.1615],
  2937. '临沂': [118.3118,35.2936],
  2938. '丹东': [124.541,40.4242],
  2939. '丽水': [119.5642,28.1854],
  2940. '乌鲁木齐': [87.9236,43.5883],
  2941. '佛山': [112.8955,23.1097],
  2942. '保定': [115.0488,39.0948],
  2943. '兰州': [103.5901,36.3043],
  2944. '包头': [110.3467,41.4899],
  2945. '北京': [116.4551,40.2539],
  2946. '北海': [109.314,21.6211],
  2947. '南京': [118.8062,31.9208],
  2948. '南宁': [108.479,23.1152],
  2949. '南昌': [116.0046,28.6633],
  2950. '南通': [121.1023,32.1625],
  2951. '厦门': [118.1689,24.6478],
  2952. '台州': [121.1353,28.6688],
  2953. '合肥': [117.29,32.0581],
  2954. '呼和浩特': [111.4124,40.4901],
  2955. '咸阳': [108.4131,34.8706],
  2956. '哈尔滨': [127.9688,45.368],
  2957. '唐山': [118.4766,39.6826],
  2958. '嘉兴': [120.9155,30.6354],
  2959. '大同': [113.7854,39.8035],
  2960. '大连': [122.2229,39.4409],
  2961. '天津': [117.4219,39.4189],
  2962. '太原': [112.3352,37.9413],
  2963. '威海': [121.9482,37.1393],
  2964. '宁波': [121.5967,29.6466],
  2965. '宝鸡': [107.1826,34.3433],
  2966. '宿迁': [118.5535,33.7775],
  2967. '常州': [119.4543,31.5582],
  2968. '广州': [113.5107,23.2196],
  2969. '廊坊': [116.521,39.0509],
  2970. '延安': [109.1052,36.4252],
  2971. '张家口': [115.1477,40.8527],
  2972. '徐州': [117.5208,34.3268],
  2973. '德州': [116.6858,37.2107],
  2974. '惠州': [114.6204,23.1647],
  2975. '成都': [103.9526,30.7617],
  2976. '扬州': [119.4653,32.8162],
  2977. '承德': [117.5757,41.4075],
  2978. '拉萨': [91.1865,30.1465],
  2979. '无锡': [120.3442,31.5527],
  2980. '日照': [119.2786,35.5023],
  2981. '昆明': [102.9199,25.4663],
  2982. '杭州': [119.5313,29.8773],
  2983. '枣庄': [117.323,34.8926],
  2984. '柳州': [109.3799,24.9774],
  2985. '株洲': [113.5327,27.0319],
  2986. '武汉': [114.3896,30.6628],
  2987. '汕头': [117.1692,23.3405],
  2988. '江门': [112.6318,22.1484],
  2989. '沈阳': [123.1238,42.1216],
  2990. '沧州': [116.8286,38.2104],
  2991. '河源': [114.917,23.9722],
  2992. '泉州': [118.3228,25.1147],
  2993. '泰安': [117.0264,36.0516],
  2994. '泰州': [120.0586,32.5525],
  2995. '济南': [117.1582,36.8701],
  2996. '济宁': [116.8286,35.3375],
  2997. '海口': [110.3893,19.8516],
  2998. '淄博': [118.0371,36.6064],
  2999. '淮安': [118.927,33.4039],
  3000. '深圳': [114.5435,22.5439],
  3001. '清远': [112.9175,24.3292],
  3002. '温州': [120.498,27.8119],
  3003. '渭南': [109.7864,35.0299],
  3004. '湖州': [119.8608,30.7782],
  3005. '湘潭': [112.5439,27.7075],
  3006. '滨州': [117.8174,37.4963],
  3007. '潍坊': [119.0918,36.524],
  3008. '烟台': [120.7397,37.5128],
  3009. '玉溪': [101.9312,23.8898],
  3010. '珠海': [113.7305,22.1155],
  3011. '盐城': [120.2234,33.5577],
  3012. '盘锦': [121.9482,41.0449],
  3013. '石家庄': [114.4995,38.1006],
  3014. '福州': [119.4543,25.9222],
  3015. '秦皇岛': [119.2126,40.0232],
  3016. '绍兴': [120.564,29.7565],
  3017. '聊城': [115.9167,36.4032],
  3018. '肇庆': [112.1265,23.5822],
  3019. '舟山': [122.2559,30.2234],
  3020. '苏州': [120.6519,31.3989],
  3021. '莱芜': [117.6526,36.2714],
  3022. '菏泽': [115.6201,35.2057],
  3023. '营口': [122.4316,40.4297],
  3024. '葫芦岛': [120.1575,40.578],
  3025. '衡水': [115.8838,37.7161],
  3026. '衢州': [118.6853,28.8666],
  3027. '西宁': [101.4038,36.8207],
  3028. '西安': [109.1162,34.2004],
  3029. '贵阳': [106.6992,26.7682],
  3030. '连云港': [119.1248,34.552],
  3031. '邢台': [114.8071,37.2821],
  3032. '邯郸': [114.4775,36.535],
  3033. '郑州': [113.4668,34.6234],
  3034. '鄂尔多斯': [108.9734,39.2487],
  3035. '重庆': [107.7539,30.1904],
  3036. '金华': [120.0037,29.1028],
  3037. '铜川': [109.0393,35.1947],
  3038. '银川': [106.3586,38.1775],
  3039. '镇江': [119.4763,31.9702],
  3040. '长春': [125.8154,44.2584],
  3041. '长沙': [113.0823,28.2568],
  3042. '长治': [112.8625,36.4746],
  3043. '阳泉': [113.4778,38.0951],
  3044. '青岛': [120.4651,36.3373],
  3045. '韶关': [113.7964,24.7028]
  3046. }
  3047. },
  3048. {
  3049. name: '北京 Top10',
  3050. type: 'map',
  3051. mapType: 'china',
  3052. data:[],
  3053. markLine : {
  3054. smooth:true,
  3055. effect : {
  3056. show: true,
  3057. scaleSize: 1,
  3058. period: 30,
  3059. color: '#fff',
  3060. shadowBlur: 10
  3061. },
  3062. itemStyle : {
  3063. normal: {
  3064. borderWidth:1,
  3065. lineStyle: {
  3066. type: 'solid',
  3067. shadowBlur: 10
  3068. }
  3069. }
  3070. },
  3071. data : [
  3072. [{name:'北京'}, {name:'上海',value:95}],
  3073. [{name:'北京'}, {name:'广州',value:90}],
  3074. [{name:'北京'}, {name:'大连',value:80}],
  3075. [{name:'北京'}, {name:'南宁',value:70}],
  3076. [{name:'北京'}, {name:'南昌',value:60}],
  3077. [{name:'北京'}, {name:'拉萨',value:50}],
  3078. [{name:'北京'}, {name:'长春',value:40}],
  3079. [{name:'北京'}, {name:'包头',value:30}],
  3080. [{name:'北京'}, {name:'重庆',value:20}],
  3081. [{name:'北京'}, {name:'常州',value:10}]
  3082. ]
  3083. },
  3084. markPoint : {
  3085. symbol:'emptyCircle',
  3086. symbolSize : function(v){
  3087. return 10 + v/10
  3088. },
  3089. effect : {
  3090. show: true,
  3091. shadowBlur : 0
  3092. },
  3093. itemStyle:{
  3094. normal:{
  3095. label:{show:false}
  3096. }
  3097. },
  3098. data : [
  3099. {name:'上海',value:95},
  3100. {name:'广州',value:90},
  3101. {name:'大连',value:80},
  3102. {name:'南宁',value:70},
  3103. {name:'南昌',value:60},
  3104. {name:'拉萨',value:50},
  3105. {name:'长春',value:40},
  3106. {name:'包头',value:30},
  3107. {name:'重庆',value:20},
  3108. {name:'常州',value:10}
  3109. ]
  3110. }
  3111. },
  3112. {
  3113. name: '上海 Top10',
  3114. type: 'map',
  3115. mapType: 'china',
  3116. data:[],
  3117. markLine : {
  3118. smooth:true,
  3119. effect : {
  3120. show: true,
  3121. scaleSize: 1,
  3122. period: 30,
  3123. color: '#fff',
  3124. shadowBlur: 10
  3125. },
  3126. itemStyle : {
  3127. normal: {
  3128. borderWidth:1,
  3129. lineStyle: {
  3130. type: 'solid',
  3131. shadowBlur: 10
  3132. }
  3133. }
  3134. },
  3135. data : [
  3136. [{name:'上海'},{name:'包头',value:95}],
  3137. [{name:'上海'},{name:'昆明',value:90}],
  3138. [{name:'上海'},{name:'广州',value:80}],
  3139. [{name:'上海'},{name:'郑州',value:70}],
  3140. [{name:'上海'},{name:'长春',value:60}],
  3141. [{name:'上海'},{name:'重庆',value:50}],
  3142. [{name:'上海'},{name:'长沙',value:40}],
  3143. [{name:'上海'},{name:'北京',value:30}],
  3144. [{name:'上海'},{name:'丹东',value:20}],
  3145. [{name:'上海'},{name:'大连',value:10}]
  3146. ]
  3147. },
  3148. markPoint : {
  3149. symbol:'emptyCircle',
  3150. symbolSize : function(v){
  3151. return 10 + v/10
  3152. },
  3153. effect : {
  3154. show: true,
  3155. shadowBlur : 0
  3156. },
  3157. itemStyle:{
  3158. normal:{
  3159. label:{show:false}
  3160. }
  3161. },
  3162. data : [
  3163. {name:'包头',value:95},
  3164. {name:'昆明',value:90},
  3165. {name:'广州',value:80},
  3166. {name:'郑州',value:70},
  3167. {name:'长春',value:60},
  3168. {name:'重庆',value:50},
  3169. {name:'长沙',value:40},
  3170. {name:'北京',value:30},
  3171. {name:'丹东',value:20},
  3172. {name:'大连',value:10}
  3173. ]
  3174. }
  3175. },
  3176. {
  3177. name: '广州 Top10',
  3178. type: 'map',
  3179. mapType: 'china',
  3180. data:[],
  3181. markLine : {
  3182. smooth:true,
  3183. effect : {
  3184. show: true,
  3185. scaleSize: 1,
  3186. period: 30,
  3187. color: '#fff',
  3188. shadowBlur: 10
  3189. },
  3190. itemStyle : {
  3191. normal: {
  3192. borderWidth:1,
  3193. lineStyle: {
  3194. type: 'solid',
  3195. shadowBlur: 10
  3196. }
  3197. }
  3198. },
  3199. data : [
  3200. [{name:'广州'},{name:'福州',value:95}],
  3201. [{name:'广州'},{name:'太原',value:90}],
  3202. [{name:'广州'},{name:'长春',value:80}],
  3203. [{name:'广州'},{name:'重庆',value:70}],
  3204. [{name:'广州'},{name:'西安',value:60}],
  3205. [{name:'广州'},{name:'成都',value:50}],
  3206. [{name:'广州'},{name:'常州',value:40}],
  3207. [{name:'广州'},{name:'北京',value:30}],
  3208. [{name:'广州'},{name:'北海',value:20}],
  3209. [{name:'广州'},{name:'海口',value:10}]
  3210. ]
  3211. },
  3212. markPoint : {
  3213. symbol:'emptyCircle',
  3214. symbolSize : function(v){
  3215. return 10 + v/10
  3216. },
  3217. effect : {
  3218. show: true,
  3219. shadowBlur : 0
  3220. },
  3221. itemStyle:{
  3222. normal:{
  3223. label:{show:false}
  3224. }
  3225. },
  3226. data : [
  3227. {name:'福州',value:95},
  3228. {name:'太原',value:90},
  3229. {name:'长春',value:80},
  3230. {name:'重庆',value:70},
  3231. {name:'西安',value:60},
  3232. {name:'成都',value:50},
  3233. {name:'常州',value:40},
  3234. {name:'北京',value:30},
  3235. {name:'北海',value:20},
  3236. {name:'海口',value:10}
  3237. ]
  3238. }
  3239. }
  3240. ]
  3241. },
  3242. effect3 : (function(){
  3243. var placeList = [
  3244. {name:'海门', geoCoord:[121.15, 31.89]},
  3245. {name:'鄂尔多斯', geoCoord:[109.781327, 39.608266]},
  3246. {name:'招远', geoCoord:[120.38, 37.35]},
  3247. {name:'舟山', geoCoord:[122.207216, 29.985295]},
  3248. {name:'齐齐哈尔', geoCoord:[123.97, 47.33]},
  3249. {name:'盐城', geoCoord:[120.13, 33.38]},
  3250. {name:'赤峰', geoCoord:[118.87, 42.28]},
  3251. {name:'青岛', geoCoord:[120.33, 36.07]},
  3252. {name:'乳山', geoCoord:[121.52, 36.89]},
  3253. {name:'金昌', geoCoord:[102.188043, 38.520089]},
  3254. {name:'泉州', geoCoord:[118.58, 24.93]},
  3255. {name:'莱西', geoCoord:[120.53, 36.86]},
  3256. {name:'日照', geoCoord:[119.46, 35.42]},
  3257. {name:'胶南', geoCoord:[119.97, 35.88]},
  3258. {name:'南通', geoCoord:[121.05, 32.08]},
  3259. {name:'拉萨', geoCoord:[91.11, 29.97]},
  3260. {name:'云浮', geoCoord:[112.02, 22.93]},
  3261. {name:'梅州', geoCoord:[116.1, 24.55]},
  3262. {name:'文登', geoCoord:[122.05, 37.2]},
  3263. {name:'上海', geoCoord:[121.48, 31.22]},
  3264. {name:'攀枝花', geoCoord:[101.718637, 26.582347]},
  3265. {name:'威海', geoCoord:[122.1, 37.5]},
  3266. {name:'承德', geoCoord:[117.93, 40.97]},
  3267. {name:'厦门', geoCoord:[118.1, 24.46]},
  3268. {name:'汕尾', geoCoord:[115.375279, 22.786211]},
  3269. {name:'潮州', geoCoord:[116.63, 23.68]},
  3270. {name:'丹东', geoCoord:[124.37, 40.13]},
  3271. {name:'太仓', geoCoord:[121.1, 31.45]},
  3272. {name:'曲靖', geoCoord:[103.79, 25.51]},
  3273. {name:'烟台', geoCoord:[121.39, 37.52]},
  3274. {name:'福州', geoCoord:[119.3, 26.08]},
  3275. {name:'瓦房店', geoCoord:[121.979603, 39.627114]},
  3276. {name:'即墨', geoCoord:[120.45, 36.38]},
  3277. {name:'抚顺', geoCoord:[123.97, 41.97]},
  3278. {name:'玉溪', geoCoord:[102.52, 24.35]},
  3279. {name:'张家口', geoCoord:[114.87, 40.82]},
  3280. {name:'阳泉', geoCoord:[113.57, 37.85]},
  3281. {name:'莱州', geoCoord:[119.942327, 37.177017]},
  3282. {name:'湖州', geoCoord:[120.1, 30.86]},
  3283. {name:'汕头', geoCoord:[116.69, 23.39]},
  3284. {name:'昆山', geoCoord:[120.95, 31.39]},
  3285. {name:'宁波', geoCoord:[121.56, 29.86]},
  3286. {name:'湛江', geoCoord:[110.359377, 21.270708]},
  3287. {name:'揭阳', geoCoord:[116.35, 23.55]},
  3288. {name:'荣成', geoCoord:[122.41, 37.16]},
  3289. {name:'连云港', geoCoord:[119.16, 34.59]},
  3290. {name:'葫芦岛', geoCoord:[120.836932, 40.711052]},
  3291. {name:'常熟', geoCoord:[120.74, 31.64]},
  3292. {name:'东莞', geoCoord:[113.75, 23.04]},
  3293. {name:'河源', geoCoord:[114.68, 23.73]},
  3294. {name:'淮安', geoCoord:[119.15, 33.5]},
  3295. {name:'泰州', geoCoord:[119.9, 32.49]},
  3296. {name:'南宁', geoCoord:[108.33, 22.84]},
  3297. {name:'营口', geoCoord:[122.18, 40.65]},
  3298. {name:'惠州', geoCoord:[114.4, 23.09]},
  3299. {name:'江阴', geoCoord:[120.26, 31.91]},
  3300. {name:'蓬莱', geoCoord:[120.75, 37.8]},
  3301. {name:'韶关', geoCoord:[113.62, 24.84]},
  3302. {name:'嘉峪关', geoCoord:[98.289152, 39.77313]},
  3303. {name:'广州', geoCoord:[113.23, 23.16]},
  3304. {name:'延安', geoCoord:[109.47, 36.6]},
  3305. {name:'太原', geoCoord:[112.53, 37.87]},
  3306. {name:'清远', geoCoord:[113.01, 23.7]},
  3307. {name:'中山', geoCoord:[113.38, 22.52]},
  3308. {name:'昆明', geoCoord:[102.73, 25.04]},
  3309. {name:'寿光', geoCoord:[118.73, 36.86]},
  3310. {name:'盘锦', geoCoord:[122.070714, 41.119997]},
  3311. {name:'长治', geoCoord:[113.08, 36.18]},
  3312. {name:'深圳', geoCoord:[114.07, 22.62]},
  3313. {name:'珠海', geoCoord:[113.52, 22.3]},
  3314. {name:'宿迁', geoCoord:[118.3, 33.96]},
  3315. {name:'咸阳', geoCoord:[108.72, 34.36]},
  3316. {name:'铜川', geoCoord:[109.11, 35.09]},
  3317. {name:'平度', geoCoord:[119.97, 36.77]},
  3318. {name:'佛山', geoCoord:[113.11, 23.05]},
  3319. {name:'海口', geoCoord:[110.35, 20.02]},
  3320. {name:'江门', geoCoord:[113.06, 22.61]},
  3321. {name:'章丘', geoCoord:[117.53, 36.72]},
  3322. {name:'肇庆', geoCoord:[112.44, 23.05]},
  3323. {name:'大连', geoCoord:[121.62, 38.92]},
  3324. {name:'临汾', geoCoord:[111.5, 36.08]},
  3325. {name:'吴江', geoCoord:[120.63, 31.16]},
  3326. {name:'石嘴山', geoCoord:[106.39, 39.04]},
  3327. {name:'沈阳', geoCoord:[123.38, 41.8]},
  3328. {name:'苏州', geoCoord:[120.62, 31.32]},
  3329. {name:'茂名', geoCoord:[110.88, 21.68]},
  3330. {name:'嘉兴', geoCoord:[120.76, 30.77]},
  3331. {name:'长春', geoCoord:[125.35, 43.88]},
  3332. {name:'胶州', geoCoord:[120.03336, 36.264622]},
  3333. {name:'银川', geoCoord:[106.27, 38.47]},
  3334. {name:'张家港', geoCoord:[120.555821, 31.875428]},
  3335. {name:'三门峡', geoCoord:[111.19, 34.76]},
  3336. {name:'锦州', geoCoord:[121.15, 41.13]},
  3337. {name:'南昌', geoCoord:[115.89, 28.68]},
  3338. {name:'柳州', geoCoord:[109.4, 24.33]},
  3339. {name:'三亚', geoCoord:[109.511909, 18.252847]},
  3340. {name:'自贡', geoCoord:[104.778442, 29.33903]},
  3341. {name:'吉林', geoCoord:[126.57, 43.87]},
  3342. {name:'阳江', geoCoord:[111.95, 21.85]},
  3343. {name:'泸州', geoCoord:[105.39, 28.91]},
  3344. {name:'西宁', geoCoord:[101.74, 36.56]},
  3345. {name:'宜宾', geoCoord:[104.56, 29.77]},
  3346. {name:'呼和浩特', geoCoord:[111.65, 40.82]},
  3347. {name:'成都', geoCoord:[104.06, 30.67]},
  3348. {name:'大同', geoCoord:[113.3, 40.12]},
  3349. {name:'镇江', geoCoord:[119.44, 32.2]},
  3350. {name:'桂林', geoCoord:[110.28, 25.29]},
  3351. {name:'张家界', geoCoord:[110.479191, 29.117096]},
  3352. {name:'宜兴', geoCoord:[119.82, 31.36]},
  3353. {name:'北海', geoCoord:[109.12, 21.49]},
  3354. {name:'西安', geoCoord:[108.95, 34.27]},
  3355. {name:'金坛', geoCoord:[119.56, 31.74]},
  3356. {name:'东营', geoCoord:[118.49, 37.46]},
  3357. {name:'牡丹江', geoCoord:[129.58, 44.6]},
  3358. {name:'遵义', geoCoord:[106.9, 27.7]},
  3359. {name:'绍兴', geoCoord:[120.58, 30.01]},
  3360. {name:'扬州', geoCoord:[119.42, 32.39]},
  3361. {name:'常州', geoCoord:[119.95, 31.79]},
  3362. {name:'潍坊', geoCoord:[119.1, 36.62]},
  3363. {name:'重庆', geoCoord:[106.54, 29.59]},
  3364. {name:'台州', geoCoord:[121.420757, 28.656386]},
  3365. {name:'南京', geoCoord:[118.78, 32.04]},
  3366. {name:'滨州', geoCoord:[118.03, 37.36]},
  3367. {name:'贵阳', geoCoord:[106.71, 26.57]},
  3368. {name:'无锡', geoCoord:[120.29, 31.59]},
  3369. {name:'本溪', geoCoord:[123.73, 41.3]},
  3370. {name:'克拉玛依', geoCoord:[84.77, 45.59]},
  3371. {name:'渭南', geoCoord:[109.5, 34.52]},
  3372. {name:'马鞍山', geoCoord:[118.48, 31.56]},
  3373. {name:'宝鸡', geoCoord:[107.15, 34.38]},
  3374. {name:'焦作', geoCoord:[113.21, 35.24]},
  3375. {name:'句容', geoCoord:[119.16, 31.95]},
  3376. {name:'北京', geoCoord:[116.46, 39.92]},
  3377. {name:'徐州', geoCoord:[117.2, 34.26]},
  3378. {name:'衡水', geoCoord:[115.72, 37.72]},
  3379. {name:'包头', geoCoord:[110, 40.58]},
  3380. {name:'绵阳', geoCoord:[104.73, 31.48]},
  3381. {name:'乌鲁木齐', geoCoord:[87.68, 43.77]},
  3382. {name:'枣庄', geoCoord:[117.57, 34.86]},
  3383. {name:'杭州', geoCoord:[120.19, 30.26]},
  3384. {name:'淄博', geoCoord:[118.05, 36.78]},
  3385. {name:'鞍山', geoCoord:[122.85, 41.12]},
  3386. {name:'溧阳', geoCoord:[119.48, 31.43]},
  3387. {name:'库尔勒', geoCoord:[86.06, 41.68]},
  3388. {name:'安阳', geoCoord:[114.35, 36.1]},
  3389. {name:'开封', geoCoord:[114.35, 34.79]},
  3390. {name:'济南', geoCoord:[117, 36.65]},
  3391. {name:'德阳', geoCoord:[104.37, 31.13]},
  3392. {name:'温州', geoCoord:[120.65, 28.01]},
  3393. {name:'九江', geoCoord:[115.97, 29.71]},
  3394. {name:'邯郸', geoCoord:[114.47, 36.6]},
  3395. {name:'临安', geoCoord:[119.72, 30.23]},
  3396. {name:'兰州', geoCoord:[103.73, 36.03]},
  3397. {name:'沧州', geoCoord:[116.83, 38.33]},
  3398. {name:'临沂', geoCoord:[118.35, 35.05]},
  3399. {name:'南充', geoCoord:[106.110698, 30.837793]},
  3400. {name:'天津', geoCoord:[117.2, 39.13]},
  3401. {name:'富阳', geoCoord:[119.95, 30.07]},
  3402. {name:'泰安', geoCoord:[117.13, 36.18]},
  3403. {name:'诸暨', geoCoord:[120.23, 29.71]},
  3404. {name:'郑州', geoCoord:[113.65, 34.76]},
  3405. {name:'哈尔滨', geoCoord:[126.63, 45.75]},
  3406. {name:'聊城', geoCoord:[115.97, 36.45]},
  3407. {name:'芜湖', geoCoord:[118.38, 31.33]},
  3408. {name:'唐山', geoCoord:[118.02, 39.63]},
  3409. {name:'平顶山', geoCoord:[113.29, 33.75]},
  3410. {name:'邢台', geoCoord:[114.48, 37.05]},
  3411. {name:'德州', geoCoord:[116.29, 37.45]},
  3412. {name:'济宁', geoCoord:[116.59, 35.38]},
  3413. {name:'荆州', geoCoord:[112.239741, 30.335165]},
  3414. {name:'宜昌', geoCoord:[111.3, 30.7]},
  3415. {name:'义乌', geoCoord:[120.06, 29.32]},
  3416. {name:'丽水', geoCoord:[119.92, 28.45]},
  3417. {name:'洛阳', geoCoord:[112.44, 34.7]},
  3418. {name:'秦皇岛', geoCoord:[119.57, 39.95]},
  3419. {name:'株洲', geoCoord:[113.16, 27.83]},
  3420. {name:'石家庄', geoCoord:[114.48, 38.03]},
  3421. {name:'莱芜', geoCoord:[117.67, 36.19]},
  3422. {name:'常德', geoCoord:[111.69, 29.05]},
  3423. {name:'保定', geoCoord:[115.48, 38.85]},
  3424. {name:'湘潭', geoCoord:[112.91, 27.87]},
  3425. {name:'金华', geoCoord:[119.64, 29.12]},
  3426. {name:'岳阳', geoCoord:[113.09, 29.37]},
  3427. {name:'长沙', geoCoord:[113, 28.21]},
  3428. {name:'衢州', geoCoord:[118.88, 28.97]},
  3429. {name:'廊坊', geoCoord:[116.7, 39.53]},
  3430. {name:'菏泽', geoCoord:[115.480656, 35.23375]},
  3431. {name:'合肥', geoCoord:[117.27, 31.86]},
  3432. {name:'武汉', geoCoord:[114.31, 30.52]},
  3433. {name:'大庆', geoCoord:[125.03, 46.58]}
  3434. ]
  3435. return {
  3436. backgroundColor: 'rgba(0,0,0,0)',
  3437. color: [
  3438. 'rgba(255, 255, 255, 0.8)',
  3439. 'rgba(14, 241, 242, 0.8)',
  3440. 'rgba(37, 140, 249, 0.8)'
  3441. ],
  3442. title : {
  3443. text: '百度人气',
  3444. link: 'http://renqi.baidu.com',
  3445. subtext: '纯属虚构',
  3446. x: 'center',
  3447. textStyle : {
  3448. color: '#fff'
  3449. }
  3450. },
  3451. legend: {
  3452. orient: 'vertical',
  3453. x:'left',
  3454. data:['强','中','弱'],
  3455. textStyle : {
  3456. color: '#fff'
  3457. }
  3458. },
  3459. toolbox: {
  3460. show : true,
  3461. orient : 'vertical',
  3462. x: 'right',
  3463. y: 'center',
  3464. feature : {
  3465. mark : {show: true},
  3466. dataView : {show: true, readOnly: false},
  3467. restore : {show: true},
  3468. saveAsImage : {show: true}
  3469. }
  3470. },
  3471. series : [
  3472. {
  3473. name: '弱',
  3474. type: 'map',
  3475. mapType: 'china',
  3476. itemStyle:{
  3477. normal:{
  3478. borderColor:'rgba(100,149,237,1)',
  3479. borderWidth:0.5,
  3480. areaStyle:{
  3481. color: '#333'
  3482. }
  3483. }
  3484. },
  3485. data : [],
  3486. markPoint : {
  3487. symbolSize: 2,
  3488. large: true,
  3489. effect : {
  3490. show: true
  3491. },
  3492. data : (function(){
  3493. var data = [];
  3494. var len = 3000;
  3495. var geoCoord
  3496. while(len--) {
  3497. geoCoord = placeList[len % placeList.length].geoCoord;
  3498. data.push({
  3499. name : placeList[len % placeList.length].name + len,
  3500. value : 10,
  3501. geoCoord : [
  3502. geoCoord[0] + Math.random() * 5 * -1,
  3503. geoCoord[1] + Math.random() * 3 * -1
  3504. ]
  3505. })
  3506. }
  3507. return data;
  3508. })()
  3509. }
  3510. },
  3511. {
  3512. name: '中',
  3513. type: 'map',
  3514. mapType: 'china',
  3515. data : [],
  3516. markPoint : {
  3517. symbolSize: 3,
  3518. large: true,
  3519. effect : {
  3520. show: true
  3521. },
  3522. data : (function(){
  3523. var data = [];
  3524. var len = 1000;
  3525. var geoCoord
  3526. while(len--) {
  3527. geoCoord = placeList[len % placeList.length].geoCoord;
  3528. data.push({
  3529. name : placeList[len % placeList.length].name + len,
  3530. value : 50,
  3531. geoCoord : [
  3532. geoCoord[0] + Math.random() * 3 * -1,
  3533. geoCoord[1] + Math.random() * 3 * -1
  3534. ]
  3535. })
  3536. }
  3537. return data;
  3538. })()
  3539. }
  3540. },
  3541. {
  3542. name: '强',
  3543. type: 'map',
  3544. mapType: 'china',
  3545. hoverable: false,
  3546. roam:true,
  3547. data : [],
  3548. markPoint : {
  3549. symbol : 'diamond',
  3550. symbolSize: 6,
  3551. large: true,
  3552. effect : {
  3553. show: true
  3554. },
  3555. data : (function(){
  3556. var data = [];
  3557. var len = placeList.length;
  3558. while(len--) {
  3559. data.push({
  3560. name : placeList[len].name,
  3561. value : 90,
  3562. geoCoord : placeList[len].geoCoord
  3563. })
  3564. }
  3565. return data;
  3566. })()
  3567. }
  3568. }
  3569. ]
  3570. };
  3571. })(),
  3572. adddddd : {}
  3573. }
  3574. if (document.location.href.indexOf('local') == -1) {
  3575. var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
  3576. document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fb78830c9a5dad062d08b90b2bc0cf5da' type='text/javascript'%3E%3C/script%3E"));
  3577. }