pictorial-repeat.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873
  1. <!DOCTYPE>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <script src="lib/esl.js"></script>
  6. <script src="lib/config.js"></script>
  7. <script src="lib/jquery.min.js"></script>
  8. <script src="lib/facePrint.js"></script>
  9. <script src="data/symbols.js"></script>
  10. <meta name="viewport" content="width=device-width, initial-scale=1" />
  11. <link rel="stylesheet" href="lib/reset.css">
  12. </head>
  13. <body>
  14. <style>
  15. .chart {
  16. position: relative;
  17. height: 500px;
  18. max-width: 1000px;
  19. margin: 0 auto;
  20. }
  21. h2 {
  22. text-align: center;
  23. font-size: 16px;
  24. line-height: 30px;
  25. font-weight: normal;
  26. background: #dde;
  27. }
  28. </style>
  29. <h2>vertical | no clip | symbol w/h ratio and margin '40%!'</h2>
  30. <div class="chart" id="main1"></div>
  31. <h2>vertical | no clip | symbol w/h ratio and margin '40%' (notice 0 value)</h2>
  32. <div class="chart" id="main1.x"></div>
  33. <h2>vertical | clip | fixed repeatTimes</h2>
  34. <div class="chart" id="main1.1"></div>
  35. <h2>dataURI | symbolSize responsive (<strong>TRY RESIZE</strong>)</h2>
  36. <div class="chart" id="symbolSize"></div>
  37. <h2>horizontal | clip | positive | rotate</h2>
  38. <div class="chart" id="main2"></div>
  39. <h2>horizontal | clip | negative and positive symbolBoundingData | no animation</h2>
  40. <div class="chart" id="main3"></div>
  41. <h2>negative symbolMargin | symbolPosition (check whether overflow)</h2>
  42. <div class="chart" id="main4"></div>
  43. <h2>repeat strategy | dynamic data | axisPointer.type 'none' label show</h2>
  44. <div class="chart" id="dynamic-data"></div>
  45. <script>
  46. function makeChart(id, option, cb) {
  47. require([
  48. 'echarts'
  49. // 'echarts/chart/pictorialBar',
  50. // 'echarts/chart/bar',
  51. // 'echarts/chart/scatter',
  52. // 'echarts/component/grid',
  53. // 'echarts/component/markLine',
  54. // 'echarts/component/legend',
  55. // 'echarts/component/tooltip',
  56. // 'echarts/component/dataZoom'
  57. ], function (echarts) {
  58. var main = document.getElementById(id);
  59. if (main) {
  60. var chartMain = document.createElement('div');
  61. chartMain.style.cssText = 'height:100%';
  62. main.appendChild(chartMain);
  63. var chart = echarts.init(chartMain);
  64. chart.setOption(option);
  65. window.addEventListener('resize', chart.resize);
  66. cb && cb(echarts, chart);
  67. }
  68. });
  69. }
  70. </script>
  71. <script>
  72. makeChart('main1', {
  73. legend: {
  74. data: ['data', 'data2', 'bg', 'original bar', 'original bg'],
  75. selected: {
  76. 'original bar': false,
  77. 'original bg': false
  78. }
  79. },
  80. tooltip: {
  81. },
  82. yAxis: {
  83. data: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
  84. axisTick: {show: false}
  85. },
  86. xAxis: {
  87. splitLine: {show: false}
  88. },
  89. // animationDuration: 2000,
  90. // animationDurationUpdate: 2000,
  91. series: [{
  92. name: 'data',
  93. type: 'pictorialBar',
  94. cursor: 'move',
  95. label: {
  96. normal: {
  97. show: true,
  98. position: 'outside',
  99. offset: [40, 0]
  100. }
  101. },
  102. symbol: pathSymbols.plane,
  103. symbolRepeat: true,
  104. symbolMargin: '40%!',
  105. symbolSize: ['100%', '80%'],
  106. z: 10,
  107. data: [12, 60, 54, '-', 23, -16, 0, 25]
  108. }, {
  109. name: 'data2',
  110. type: 'pictorialBar',
  111. symbol: pathSymbols.plane,
  112. barGap: '20%',
  113. symbolRepeat: true,
  114. symbolMargin: '40%!',
  115. symbolSize: ['100%', '80%'],
  116. z: 10,
  117. data: [33, 1, 41, -18, 23, -56, 0, 15]
  118. }, {
  119. name: 'original bar',
  120. type: 'bar',
  121. color: ['rgba(0,0,0,0.5)'],
  122. data: [12, 60, 54, '-', 23, -16, 0, 25]
  123. }, {
  124. name: 'original bg',
  125. type: 'bar',
  126. color: ['rgba(0,0,0,0.5)'],
  127. data: [60, 60, 60, '-', 60, -30, 60, 60]
  128. }]
  129. });
  130. </script>
  131. <script>
  132. makeChart('main1.x', {
  133. legend: {
  134. data: ['data', 'data2', 'bg', 'original bar', 'original bg'],
  135. selected: {
  136. 'original bar': false,
  137. 'original bg': false
  138. }
  139. },
  140. tooltip: {
  141. },
  142. yAxis: {
  143. data: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
  144. axisTick: {show: false}
  145. },
  146. xAxis: {
  147. splitLine: {show: false}
  148. },
  149. // animationDuration: 2000,
  150. // animationDurationUpdate: 2000,
  151. series: [{
  152. name: 'data',
  153. type: 'pictorialBar',
  154. label: {
  155. normal: {
  156. show: true,
  157. position: 'outside',
  158. offset: [40, 0]
  159. }
  160. },
  161. symbol: pathSymbols.plane,
  162. symbolRepeat: true,
  163. symbolMargin: '40%',
  164. symbolSize: ['100%', '80%'],
  165. z: 10,
  166. data: [12, 60, 54, '-', 23, -16, 0, 25]
  167. }, {
  168. name: 'data2',
  169. type: 'pictorialBar',
  170. symbol: pathSymbols.plane,
  171. barGap: '20%',
  172. symbolRepeat: true,
  173. symbolMargin: '40%',
  174. symbolSize: ['100%', '80%'],
  175. z: 10,
  176. data: [33, 1, 41, -18, 23, -56, 0, 15]
  177. }, {
  178. name: 'original bar',
  179. type: 'bar',
  180. color: ['rgba(0,0,0,0.5)'],
  181. data: [12, 60, 54, '-', 23, -16, 0, 25]
  182. }, {
  183. name: 'original bg',
  184. type: 'bar',
  185. color: ['rgba(0,0,0,0.5)'],
  186. data: [60, 60, 60, '-', 60, -30, 60, 60]
  187. }]
  188. });
  189. </script>
  190. <script>
  191. makeChart('main1.1', {
  192. legend: {
  193. data: ['data'],
  194. selected: {
  195. 'original bar': false,
  196. 'original bg': false
  197. }
  198. },
  199. tooltip: {
  200. },
  201. yAxis: {
  202. data: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
  203. axisTick: {show: false},
  204. axisLine: {show: false}
  205. },
  206. xAxis: {
  207. splitLine: {show: false},
  208. axisTick: {show: false},
  209. axisLabel: {show: false},
  210. axisLine: {show: false}
  211. },
  212. // animationDuration: 2000,
  213. // animationDurationUpdate: 2000,
  214. series: [{
  215. name: 'data',
  216. type: 'pictorialBar',
  217. symbol: pathSymbols.pentagram,
  218. symbolRepeat: 5,
  219. itemStyle: {
  220. normal: {
  221. color: '#ddd'
  222. }
  223. },
  224. animation: false,
  225. silent: true,
  226. data: [12, 60, 54, 25, 23, 16, 1, 25],
  227. z: -1
  228. }, {
  229. name: 'data',
  230. type: 'pictorialBar',
  231. symbol: pathSymbols.pentagram,
  232. symbolRepeat: 5,
  233. symbolClip: true,
  234. z: 10,
  235. data: [12, 60, 54, 25, 23, 16, 1, 25]
  236. }]
  237. });
  238. </script>
  239. <script>
  240. makeChart('symbolSize', {
  241. color: ['#e54035'],
  242. xAxis: {
  243. splitLine: {show: false},
  244. axisTick: {show: false},
  245. axisLine: {show: false},
  246. axisLabel: {show: false}
  247. },
  248. yAxis: {
  249. data: ['a', 'b', 'c'],
  250. axisTick: {show: false},
  251. axisLine: {show: false},
  252. axisLabel: {show: false}
  253. },
  254. grid: {
  255. height: 80
  256. },
  257. series: [{
  258. name: 'glyph',
  259. type: 'pictorialBar',
  260. symbol: imageSymbols.spirit,
  261. symbolRepeat: 10,
  262. symbolSize: [20, 20],
  263. data: [100, 100, 100]
  264. }, {
  265. name: 'glyph',
  266. type: 'pictorialBar',
  267. symbol: 'rect',
  268. symbolSize: ['20%', 24],
  269. symbolPosition: 'center',
  270. itemStyle: {
  271. normal: {
  272. color: '#e54035'
  273. }
  274. },
  275. label: {
  276. normal: {
  277. show: true,
  278. formatter: '16 亿',
  279. textStyle: {
  280. color: '#fff',
  281. fontSize: 18,
  282. fontFamily: 'Arial',
  283. fontWeight: 'bold'
  284. }
  285. }
  286. },
  287. data: ['-', 100, '-'],
  288. z: 100
  289. }]
  290. });
  291. </script>
  292. <script>
  293. makeChart('main2', {
  294. legend: {
  295. data: ['data', 'original bar', 'original bg'],
  296. selected: {
  297. 'original bar': false,
  298. 'original bg': false
  299. }
  300. },
  301. tooltip: {
  302. // trigger: 'axis',
  303. // axisPointer: {
  304. // type: 'line'
  305. // }
  306. },
  307. xAxis: {
  308. data: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
  309. axisTick: {show: false}
  310. },
  311. yAxis: {
  312. splitLine: {show: false}
  313. },
  314. series: [{
  315. name: 'data',
  316. type: 'pictorialBar',
  317. symbol: pathSymbols.pumpkin,
  318. symbolRotate: 30,
  319. itemStyle: {
  320. normal: {
  321. color: '#ddd'
  322. }
  323. },
  324. label: {
  325. normal: {
  326. show: true,
  327. position: 'outside',
  328. textStyle: {
  329. color: '#c23531',
  330. fontSize: 20
  331. }
  332. }
  333. },
  334. silent: true,
  335. symbolRepeat: 'fixed',
  336. animation: false,
  337. symbolBoundingData: 60,
  338. data: [12, 60, 54, '-', 23, 2, 0, 25]
  339. }, {
  340. name: 'data',
  341. type: 'pictorialBar',
  342. symbol: pathSymbols.pumpkin,
  343. symbolRotate: 30,
  344. symbolRepeat: true,
  345. symbolClip: true,
  346. symbolBoundingData: 60,
  347. z: 10,
  348. data: [12, 60, 54, '-', 23, -2, 0, 25]
  349. }, {
  350. name: 'original bar',
  351. type: 'bar',
  352. color: ['rgba(0,0,0,0.5)'],
  353. data: [12, 60, 54, '-', 23, -2, 0, 25]
  354. }, {
  355. name: 'original bg',
  356. type: 'bar',
  357. color: ['rgba(0,0,0,0.5)'],
  358. data: [60, 60, 60, '-', 60, 60, 60, 60]
  359. }]
  360. });
  361. </script>
  362. <script>
  363. makeChart('main3', {
  364. animation: false,
  365. legend: {
  366. data: ['data', 'bg', 'original bar', 'original bg'],
  367. selected: {
  368. 'original bar': false,
  369. 'original bg': false
  370. }
  371. },
  372. tooltip: {
  373. // trigger: 'axis',
  374. // axisPointer: {
  375. // type: 'line'
  376. // }
  377. },
  378. xAxis: {
  379. data: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],
  380. axisTick: {show: false},
  381. position: 'top'
  382. },
  383. yAxis: {
  384. splitLine: {show: false}
  385. },
  386. series: [{
  387. name: 'bg',
  388. type: 'pictorialBar',
  389. symbol: pathSymbols.pumpkin,
  390. itemStyle: {
  391. normal: {
  392. color: '#ddd'
  393. }
  394. },
  395. label: {
  396. normal: {
  397. show: true,
  398. position: 'outside',
  399. textStyle: {
  400. color: '#c23531',
  401. fontSize: 20
  402. }
  403. }
  404. },
  405. silent: true,
  406. symbolRepeat: 'fixed',
  407. symbolClip: false,
  408. symbolBoundingData: 40,
  409. symbolRotate: 30,
  410. z: -1,
  411. data: [-12, -60, 34, '-', 23, -2, 0, -25]
  412. }, {
  413. name: 'bg',
  414. type: 'pictorialBar',
  415. symbol: pathSymbols.pumpkin,
  416. itemStyle: {
  417. normal: {
  418. color: '#ddd'
  419. }
  420. },
  421. label: {
  422. normal: {
  423. show: true,
  424. position: 'outside',
  425. textStyle: {
  426. color: '#c23531',
  427. fontSize: 20
  428. }
  429. }
  430. },
  431. silent: true,
  432. symbolRepeat: 'fixed',
  433. symbolClip: false,
  434. symbolBoundingData: -60,
  435. symbolRotate: 30,
  436. z: -1,
  437. data: [-12, -60, 34, '-', 23, -2, 0, -25]
  438. }, {
  439. name: 'data',
  440. type: 'pictorialBar',
  441. itemStyle: {
  442. emphasis: {
  443. color: 'blue'
  444. }
  445. },
  446. symbol: pathSymbols.pumpkin,
  447. symbolRepeat: true,
  448. symbolClip: true,
  449. symbolRotate: 30,
  450. symbolBoundingData: [-60, 40],
  451. data: [-12, -60, 34, '-', 23, -2, 0, -25]
  452. }, {
  453. name: 'original bar',
  454. type: 'bar',
  455. color: ['rgba(0,0,0,0.5)'],
  456. data: [-12, -60, 34, '-', 23, -2, 0, -25]
  457. }, {
  458. name: 'original bg',
  459. type: 'bar',
  460. color: ['rgba(0,0,0,0.5)'],
  461. data: [-60, -60, 40, '-', 40, -60, -60, -60]
  462. }]
  463. });
  464. </script>
  465. <script>
  466. makeChart('main4', {
  467. color: ['#bb0004', 'orange'],
  468. xAxis: {
  469. data: [],
  470. axisTick: {show: false},
  471. axisLabel: {show: false}
  472. },
  473. yAxis: {
  474. splitLine: {show: false},
  475. axisTick: {show: false},
  476. axisLine: {show: false},
  477. axisLabel: {show: false}
  478. },
  479. grid: {
  480. bottom: 100
  481. },
  482. animationEasing: 'elasticOut',
  483. series: [{
  484. name: 'all',
  485. type: 'pictorialBar',
  486. barCategoryGap: '40%',
  487. label: {
  488. normal: {
  489. show: true,
  490. position: 'outside'
  491. }
  492. },
  493. itemStyle: {
  494. normal: {
  495. borderColor: 'rgba(0,0,0,0.5)',
  496. borderWidth: 6
  497. }
  498. },
  499. symbol: 'circle',
  500. data: [{
  501. value: 29000,
  502. symbolBoundingData: 29000,
  503. symbolRepeat: true,
  504. label: {normal: {formatter: 'start'}}
  505. }, {
  506. value: 29000,
  507. symbolBoundingData: 29000,
  508. symbolRepeat: true,
  509. symbolSize: ['80%', '20%'],
  510. label: {normal: {formatter: 'start'}}
  511. }, {
  512. value: 29000,
  513. symbolBoundingData: 29000,
  514. symbolRepeat: true,
  515. symbolMargin: 10,
  516. label: {normal: {formatter: 'start'}}
  517. }, {
  518. value: 29000,
  519. symbolBoundingData: 29000,
  520. symbolRepeat: true,
  521. symbolMargin: 30,
  522. symbolSize: ['100%', 160],
  523. label: {normal: {formatter: 'start'}}
  524. }, {
  525. value: 29000,
  526. symbolBoundingData: 29000,
  527. symbolRepeat: true,
  528. symbolMargin: 30,
  529. symbolSize: ['100%', 160],
  530. symbolPosition: 'center',
  531. label: {normal: {formatter: 'center'}}
  532. }, {
  533. value: 29000,
  534. symbolBoundingData: 29000,
  535. symbolRepeat: true,
  536. symbolMargin: 30,
  537. symbolSize: ['100%', 160],
  538. symbolPosition: 'end',
  539. label: {normal: {formatter: 'end'}}
  540. }, {
  541. value: 29000,
  542. symbolBoundingData: 29000,
  543. symbolRepeat: true,
  544. symbolSize: ['80%', '120%'],
  545. symbolMargin: '-30%',
  546. label: {normal: {formatter: 'start'}}
  547. }, {
  548. value: 29000,
  549. symbolBoundingData: 29000,
  550. symbolRepeat: true,
  551. symbolSize: ['80%', '120%'],
  552. symbolMargin: '-30%',
  553. symbolPosition: 'center',
  554. label: {normal: {formatter: 'center'}}
  555. }, {
  556. value: 29000,
  557. symbolBoundingData: 29000,
  558. symbolRepeat: true,
  559. symbolRotate: 80,
  560. symbolSize: ['80%', '120%'],
  561. symbolMargin: '-30%',
  562. symbolPosition: 'end',
  563. label: {normal: {formatter: 'end'}}
  564. }, {
  565. value: 19000,
  566. symbolPosition: 'start',
  567. label: {normal: {formatter: 'start'}}
  568. }, {
  569. value: 19000,
  570. symbolSize: ['60%', '20%'],
  571. symbolPosition: 'start',
  572. label: {normal: {formatter: 'start'}}
  573. }, {
  574. value: 19000,
  575. symbolSize: ['60%', '20%'],
  576. symbolPosition: 'center',
  577. label: {normal: {formatter: 'center'}}
  578. }, {
  579. value: 19000,
  580. symbolSize: ['60%', '20%'],
  581. symbolPosition: 'end',
  582. label: {normal: {formatter: 'end'}}
  583. }, {
  584. value: 19000,
  585. symbolSize: ['60%', '150%'],
  586. symbolPosition: 'start',
  587. label: {normal: {formatter: 'start'}}
  588. }, {
  589. value: 19000,
  590. symbolSize: ['60%', '150%'],
  591. symbolPosition: 'center',
  592. label: {normal: {formatter: 'center'}}
  593. }, {
  594. value: 19000,
  595. symbolSize: ['60%', '150%'],
  596. symbolPosition: 'end',
  597. label: {normal: {formatter: 'end'}}
  598. }, {
  599. value: 190,
  600. symbolPosition: 'end',
  601. label: {normal: {formatter: 'min'}}
  602. }],
  603. z: 10
  604. }, {
  605. name: 'shadow2',
  606. type: 'bar',
  607. data: [29000, 29000, 29000, 29000, 29000, 29000, 29000, 29000, 29000, 19000, 19000, 19000, 19000, 19000, 19000, 19000, 19]
  608. }]
  609. });
  610. </script>
  611. <script>
  612. var startData = 13000;
  613. var maxData = 18000;
  614. var minData = 5000;
  615. makeChart('dynamic-data', {
  616. backgroundColor: '#0f375f',
  617. tooltip: {
  618. trigger: 'axis',
  619. axisPointer: {
  620. type: 'none',
  621. label: {show: true}
  622. }
  623. },
  624. legend: {
  625. data: ['all'],
  626. textStyle: {color: '#ddd'}
  627. },
  628. grid: {
  629. bottom: 100
  630. },
  631. xAxis: [{
  632. data: [
  633. 'standard',
  634. 'fix symbol margin\n(not accurate)\n(but more comparable)',
  635. 'use symbolBoundingData\nauto repeat times\n(accurate)\n(but symbolMargin not fixed)',
  636. 'use symbolBoundingData\nfix repeat times\n(accurate)\n(but less responsive)'
  637. ],
  638. axisTick: {show: false},
  639. axisLine: {
  640. lineStyle: {
  641. color: '#ddd'
  642. }
  643. },
  644. axisLabel: {
  645. margin: 20,
  646. interval: 0,
  647. textStyle: {
  648. color: '#ddd',
  649. fontSize: 14
  650. }
  651. }
  652. }],
  653. yAxis: {
  654. splitLine: {show: false},
  655. axisTick: {
  656. lineStyle: {
  657. color: '#ddd'
  658. }
  659. },
  660. axisLine: {
  661. lineStyle: {
  662. color: '#ddd'
  663. }
  664. },
  665. axisLabel: {
  666. textStyle: {
  667. color: '#ddd'
  668. }
  669. }
  670. },
  671. animationEasing: 'cubicOut',
  672. animationDuration: 100,
  673. animationDurationUpdate: 2000,
  674. series: [{
  675. type: 'pictorialBar',
  676. name: 'all',
  677. id: 'paper',
  678. hoverAnimation: true,
  679. label: {
  680. normal: {
  681. show: true,
  682. position: 'top',
  683. formatter: '{c} km',
  684. textStyle: {
  685. fontSize: 16,
  686. color: '#e54035'
  687. }
  688. }
  689. },
  690. symbol: imageSymbols.paper,
  691. symbolSize: ['70%', 50],
  692. symbolMargin: '-25%',
  693. data: [{
  694. value: maxData,
  695. symbolRepeat: true
  696. }, {
  697. value: startData,
  698. symbolRepeat: true
  699. }, {
  700. value: startData,
  701. symbolBoundingData: startData,
  702. symbolRepeat: true
  703. }, {
  704. value: startData,
  705. symbolBoundingData: startData,
  706. symbolRepeat: 20
  707. }],
  708. markLine: {
  709. symbol: ['none', 'none'],
  710. label: {
  711. normal: {show: false}
  712. },
  713. lineStyle: {
  714. normal: {
  715. color: '#e54035'
  716. }
  717. },
  718. data: [{
  719. yAxis: startData
  720. }]
  721. }
  722. }, {
  723. name: 'all',
  724. type: 'pictorialBar',
  725. symbol: 'circle',
  726. itemStyle: {
  727. normal: {
  728. color: '#185491'
  729. }
  730. },
  731. silent: true,
  732. symbolSize: ['150%', 50],
  733. symbolOffset: [0, 20],
  734. z: -10,
  735. data: [1, 1, 1, 1]
  736. }]
  737. }, function (echarts, chart) {
  738. setInterval(function () {
  739. var dynamicData = Math.round(Math.random() * (maxData - minData) + minData);
  740. chart.setOption({
  741. series: [{
  742. id: 'paper',
  743. data: [{
  744. value: maxData,
  745. symbolRepeat: true
  746. }, {
  747. value: dynamicData,
  748. symbolRepeat: true
  749. }, {
  750. value: dynamicData,
  751. symbolBoundingData: dynamicData,
  752. symbolRepeat: true
  753. }, {
  754. value: dynamicData,
  755. symbolBoundingData: dynamicData,
  756. symbolRepeat: 20
  757. }],
  758. markLine: {
  759. data: [{
  760. yAxis: dynamicData
  761. }]
  762. }
  763. }]
  764. });
  765. }, 3000);
  766. });
  767. </script>
  768. </body>
  769. </html>