当前位置:   article > 正文

智能交通IoT大数据平台_arightboxbott

arightboxbott

最近,公司做一个项目“智能交通IoT大数据平台”,前端WEB界面酷炫的效果特分享给大家。

项目名称:智能交通IoT大数据平台

技术标签:Html5、Css、JavaScript、Echarts(世界地图、柱状图)

支持平台:PC端 浏览器

说明:通过Html5、Css、JavaScript、Echarts等前端技术展示酷炫的界面效果。

以下为代码:

  1. <!doctype html>
  2. <head>
  3. <meta charset="utf-8" />
  4. <title>智能交通IoT大数据平台</title>
  5. <style type="text/css">
  6. *{
  7. margin: 0;
  8. padding: 0;
  9. }
  10. body{
  11. width: 100%;
  12. height: 100%;
  13. }
  14. #box{
  15. width: 1200px;
  16. height: 980px;
  17. left:15%;
  18. top:5%;
  19. position: absolute;
  20. }
  21. </style>
  22. </head>
  23. <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
  24. <script src="js/echarts.min.js" charset="utf-8"></script>
  25. <script src="js/jquery-3.2.0.min.js" charset="utf-8"></script>
  26. <script src="beijing.js"></script>
  27. <body>
  28. <div class="wpbox">
  29. <div class="bnt">
  30. <div class="topbnt_left fl">
  31. <ul>
  32. </ul>
  33. </div>
  34. <h1 class="tith1 fl">智能交通IoT大数据平台</h1>
  35. <div class=" fr topbnt_right">
  36. <ul>
  37. </ul>
  38. </ul>
  39. </div>
  40. </div>
  41. <!-- bnt end -->
  42. <div class="left1">
  43. <div class="aleftboxttop pt1"><h2 class="tith2">设备数国家排名TOP5</h2>
  44. <div class="pvr fl liwp lpeftb2otcont1" style="height:70%;" >
  45. <ul>
  46. <li class="hot1">1</li>
  47. <li class="hot2">2</li>
  48. <li class="hot3">3</li>
  49. <li class="hot4">4</li>
  50. <li class="hot5">5</li>
  51. </ul>
  52. <div id="pleftbox2bott_cont"class="lpeftb2otcont" style="height:100%;"></div>
  53. </div>
  54. <!-- lefttoday_number end -->
  55. </div>
  56. <div class="aleftboxtmidd">
  57. <h2 class="tith2 pt2">设备数城市排名TOP5</h2>
  58. <div class="pvr fl liwp lpeftb2otcont1" style="height:70%;" >
  59. <ul>
  60. <li class="hot1">1</li>
  61. <li class="hot2">2</li>
  62. <li class="hot3">3</li>
  63. <li class="hot4">4</li>
  64. <li class="hot5">5</li>
  65. </ul>
  66. <div id="pleftbox2bott_cont2" class="lpeftb2otcont" style="height:100%;"></div>
  67. </div>
  68. </div>
  69. <div class="aleftboxtbott">
  70. <h2 class="tith2">故障分类</h2>
  71. <!-- <div class="lefttoday_tit height"><p class="fl">状态:已调节.æl,kmo</p><p class="fr">时间段:2018-06-10 至 2018-06-14</p></div> -->
  72. <div id="aleftboxtmidd" class="aleftboxtbott_cont2" ></div>
  73. </div>
  74. </div>
  75. <!-- left1 end -->
  76. <div class="mrbox">
  77. <div class="mrbox_topmidd" style="width: 69%;">
  78. <div class="amiddboxttop">
  79. <h2 class="tith2 pt1">全球分布图</h2>
  80. <div class="hot_map" id="topmap" >
  81. <p>总数:<span style="color:rgb(0,176,240)">10000</span> </p><p>在线:<span style="color:rgb(0,176,80)">9675</span> </p><p>离线:<span style="color:rgb(255,196,0)">53</span> </p><p>故障:<span style="color:red">32</span></p>
  82. </div>
  83. </div>
  84. </div>
  85. <!-- mrbox_top end -->
  86. <div class="mrbox_top_right">
  87. <div class="arightboxtop"><h2 class="tith2">消息通知</h2>
  88. <div class="lefttoday_tit"><p class="fl">消息通知内容</p><p class="fr">发生时间</p></div>
  89. <div class="left2_table">
  90. <ul>
  91. <li>
  92. <p class="fl"><b>LED显示屏电量不足</b><br>
  93. 中山路与人民路交叉口,<br>
  94. </p>
  95. <p class="fr pt17">2018-06-22 10:00</p>
  96. </li>
  97. <li class="bg">
  98. <p class="fl"><b>LED右转指示标致电路异常</b><br>
  99. 中山路与人民路交叉口。<br>
  100. </p>
  101. <p class="fr pt17">2018-06-22 10:00</p>
  102. </li>
  103. <li>
  104. <p class="fl"><b>LED右转指示标致断开网络</b><br>
  105. 中山路与人民路交叉口,<br>
  106. </p>
  107. <p class="fr pt17">2018-06-22 10:00</p>
  108. </li>
  109. <li class="bg">
  110. <p class="fl"><b>LED路程指示标致位置统称</b><br>
  111. 中山路与人民路交叉口,<br>
  112. </p>
  113. <p class="fr pt17">2018-06-22 10:00</p>
  114. </li>
  115. <li>
  116. <p class="fl"><b>LED路程指示标致振动异常</b><br>
  117. 中山路与人民路交叉口,<br>
  118. </p>
  119. <p class="fr pt17">2018-06-22 10:00</p>
  120. </li>
  121. <li class="bg">
  122. <p class="fl"><b>LED路程指示标致维修完成</b><br>
  123. 中山路与人民路交叉口,<br>
  124. </p>
  125. <p class="fr pt17">2018-06-22 10:00</p>
  126. <li>
  127. <p class="fl"><b>LED显示屏安装完成</b><br>
  128. 中山路与人民路交叉口,<br>
  129. </p>
  130. <p class="fr pt17">2018-06-22 10:00</p>
  131. </li>
  132. <li class="bg">
  133. <p class="fl"><b>LED路程指示标致安装完成</b><br>
  134. 中山路与人民路交叉口,<br>
  135. </p>
  136. <p class="fr pt17">2018-06-22 10:00</p>
  137. <li>
  138. <p class="fl"><b>LED显示屏安装完成</b><br>
  139. 中山路与人民路交叉口,<br>
  140. </p>
  141. <p class="fr pt17">2018-06-22 10:00</p>
  142. </li>
  143. <li class="bg">
  144. <p class="fl"><b>LED路程指示标致安装完成</b><br>
  145. 中山路与人民路交叉口,<br>
  146. </p>
  147. <p class="fr pt17">2018-06-22 10:00</p>
  148. <li>
  149. <p class="fl"><b>LED显示屏安装完成</b><br>
  150. 中山路与人民路交叉口,<br>
  151. </p>
  152. <p class="fr pt17">2018-06-22 10:00</p>
  153. </li>
  154. </ul>
  155. </div>
  156. </div>
  157. <div class="arightboxbott"><h2 class="tith2 ">设备信息</h2>
  158. <div id="aleftboxtmiddr" class="arightboxbottcont2">
  159. <table width="100%" height="100%" >
  160. <tr>
  161. <td>
  162. <p>设备编号:LED-902</p>
  163. <p>设备名称:右转指示灯</p>
  164. <p>类别:LED灯</p>
  165. <p>状态:电量不足</p>
  166. <p>电压:10V</p>
  167. <p>温度:12℃</p>
  168. <p>湿度:10%</p>
  169. <p>位置:中山路人民路交XXXXXXXXXXXXXXX叉口</p>
  170. <p>经纬度:22222,555555</p>
  171. </td>
  172. <td >
  173. <img src="./img/device.png"></img>
  174. </td>
  175. </tr>
  176. </table>
  177. </div>
  178. </div>
  179. </div>
  180. <!-- mrbox_top_right end -->
  181. </div>
  182. </div>
  183. </div>
  184. <div id="box" class="box">
  185. </div>
  186. <script src="js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
  187. <script src="js/echarts.min.js" type="text/javascript" charset="utf-8"></script>
  188. <script src="js/echarts-gl.js" type="text/javascript" charset="utf-8"></script>
  189. <script src="js/china.js" type="text/javascript" charset="utf-8"></script>
  190. <script src="js/world.js" type="text/javascript" charset="utf-8"></script>
  191. <script src="js/data-1499132667476-ry7ZXuu4Z.js" type="text/javascript" charset="utf-8"></script>
  192. <script type="text/javascript">
  193. var config = {
  194. color: '#750be8',
  195. levels: 1,
  196. intensity: 4,
  197. threshold: 0.01
  198. }
  199. var canvas = document.createElement('canvas');
  200. canvas.width = 2048;
  201. canvas.height = 1024;
  202. context = canvas.getContext("2d");
  203. context.lineWidth = 0.5;
  204. context.strokeStyle = config.color;
  205. context.fillStyle = config.color;
  206. context.shadowColor = config.color;
  207. $.when(
  208. $.getScript('./js/world-gl-map/d3-contour.js'),
  209. $.getScript('./js/world-gl-map/d3_geo.js'),
  210. $.getScript('./js/world-gl-map/d3_timer.js')
  211. ).done(function () {
  212. image('img/8.png').then(function(image) {
  213. var m = image.height,
  214. n = image.width,
  215. values = new Array(n * m),
  216. contours = d3.contours().size([n, m]).smooth(true),
  217. projection = d3.geoIdentity().scale(canvas.width / n),
  218. path = d3.geoPath(projection, context);
  219. // StackBlur.R(image, 5);
  220. for (var j = 0, k = 0; j < m; ++j) {
  221. for (var i = 0; i < n; ++i, ++k) {
  222. values[k] = image.data[(k << 2)] / 255;
  223. }
  224. }
  225. var opt = {
  226. image: canvas
  227. }
  228. var results = [];
  229. function update(threshold, levels) {
  230. context.clearRect(0, 0, canvas.width, canvas.height);
  231. var thresholds = [];
  232. for (var i = 0; i < levels; i++) {
  233. thresholds.push((threshold + 1 / levels * i) % 1);
  234. }
  235. results = contours.thresholds(thresholds)(values);
  236. redraw();
  237. }
  238. function redraw() {
  239. results.forEach(function (d, idx) {
  240. context.beginPath();
  241. path(d);
  242. context.globalAlpha = 1;
  243. context.stroke();
  244. if (idx > config.levels / 5 * 3) {
  245. context.globalAlpha = 0.01;
  246. context.fill();
  247. }
  248. });
  249. opt.onupdate();
  250. }
  251. d3.timer(function(t) {
  252. var threshold = (t % 10000) / 10000;
  253. update(threshold, 1);
  254. });
  255. initCharts(opt);
  256. update(config.threshold, config.levels);
  257. });
  258. function image(url) {
  259. return new Promise(function(resolve) {
  260. var image = new Image();
  261. image.src = url;
  262. image.onload = function() {
  263. var canvas = document.createElement("canvas");
  264. canvas.width = image.width / 8;
  265. canvas.height = image.height / 8;
  266. var context = canvas.getContext("2d");
  267. context.drawImage(image, 0, 0, canvas.width, canvas.height);
  268. resolve(context.getImageData(0, 0, canvas.width, canvas.height));
  269. };
  270. });
  271. }
  272. function initCharts(opt) {
  273. var myChart = echarts.init(document.getElementsByClassName("box")[0])
  274. let canvas2 = document.createElement('canvas');
  275. let mapChart = echarts.init(canvas2, null, {
  276. width: 2048,
  277. height: 1024
  278. });
  279. var contourChart = echarts.init(document.createElement('canvas'), null, {
  280. width: 2048,
  281. height: 1024
  282. });
  283. var img = new echarts.graphic.Image({
  284. style: {
  285. image: opt.image,
  286. x: -1,
  287. y: -1,
  288. width: opt.image.width + 2,
  289. height: opt.image.height + 2
  290. }
  291. });
  292. contourChart.getZr().add(img);
  293. opt.onupdate = function () {
  294. img.dirty();
  295. };
  296. mapChart.setOption({
  297. series: [{
  298. type: 'map',
  299. map: 'world',
  300. // 绘制完整尺寸的 echarts 实例
  301. top: 0,
  302. left: 0,
  303. right: 0,
  304. bottom: 0,
  305. boundingCoords: [
  306. [-180, 90],
  307. [180, -90]
  308. ]
  309. }]
  310. });
  311. var canvas1 = document.createElement('canvas');
  312. var mapChart1 = echarts.init(canvas1, null, {
  313. width: 2048,
  314. height: 1024
  315. });
  316. mapChart1.setOption({
  317. backgroundColor: 'transparent',
  318. series: [{
  319. type: 'map',
  320. map: 'china',
  321. left: 0,
  322. top: 0,
  323. right: 0,
  324. bottom: 0,
  325. // environment: '#000',
  326. boundingCoords: [
  327. [-180, 90],
  328. [180, -90]
  329. ],
  330. label: {
  331. normal: {
  332. show: false,
  333. fontSize: 4,
  334. lineHeigh: 4,
  335. color: '#000',
  336. }
  337. },
  338. itemStyle: {
  339. normal: {
  340. areaColor: 'transparent',
  341. borderWidth: 1,
  342. borderType: 'solid',
  343. borderColor: '#a85000'
  344. }
  345. },
  346. }]
  347. });
  348. var option = {
  349. title: {
  350. text: '点击地球获取该区域地图',
  351. textStyle: {
  352. color: '#fff'
  353. }
  354. },
  355. tooltip: {
  356. show: true
  357. },
  358. // visualMap: [{
  359. // // show: false,
  360. // type: 'continuous',
  361. // seriesIndex: 0,
  362. // text: ['scatter3D'],
  363. // textStyle: {
  364. // color: '#fff'
  365. // },
  366. // calculable: true,
  367. // max: 3000,
  368. // inRange: {
  369. // color: ['#87aa66', '#eba438', '#d94d4c']
  370. // }
  371. // }],
  372. globe: {
  373. // baseTexture: mapChart,
  374. environment:'none',//背景
  375. //environment:'img/charity_top.png',
  376. heightTexture: 'img/bathymetry_bw_composite_4k-back.jpg',
  377. baseTexture: 'img/8.png',
  378. shading: 'lambert',
  379. light: { // 光照阴影
  380. main: {
  381. color: 'blue', // 光照颜色
  382. intensity: 14.2, // 光照强度
  383. shadowQuality: 'ultra', //阴影亮度
  384. shadow: true, // 是否显示阴影
  385. alpha: 40,
  386. beta: -30
  387. },
  388. ambient: {
  389. intensity: 4.6
  390. }
  391. },
  392. viewControl: {
  393. alpha: 30,
  394. beta: 160,
  395. // targetCoord: [116.46, 39.92],
  396. autoRotate: true,
  397. autoRotateAfterStill: 10,
  398. distance: 240,
  399. autoRotateSpeed:4
  400. },
  401. postEffect: {//为画面添加高光,景深,环境光遮蔽(SSAO),调色等效果
  402. enable: true, //是否开启
  403. SSAO: {//环境光遮蔽
  404. radius: 1,//环境光遮蔽的采样半径。半径越大效果越自然
  405. intensity: 1,//环境光遮蔽的强度
  406. enable: true
  407. }
  408. },
  409. layers: [{
  410. type: 'blend',
  411. blendTo: 'emission',
  412. texture: contourChart,
  413. intensity: config.intensity
  414. }]
  415. },
  416. series: [{
  417. name: 'lines3D',
  418. type: 'lines3D',
  419. coordinateSystem: 'globe',
  420. effect: {
  421. show: true,
  422. period: 2,
  423. trailWidth: 3,
  424. trailLength: 0.5,
  425. trailOpacity: 1,
  426. trailColor: '#0087f4'
  427. },
  428. blendMode: 'lighter',
  429. lineStyle: {
  430. width: 1,
  431. color: '#0087f4',
  432. opacity: 0.2
  433. },
  434. data: [],
  435. // data: [{
  436. // from: 'A',
  437. // to: 'B',
  438. // coords: [
  439. // [-83.69501541554166, -75.76453333240994],
  440. // [105.18, 37.51]
  441. // ],
  442. // value:"2013.48"
  443. // }, {
  444. // from: 'A',
  445. // to: 'C',
  446. // coords: [
  447. // [118.377173, 31.337123],
  448. // [105.18, 37.51]
  449. // ],
  450. // value:"2013.48"
  451. // }],
  452. silent: false
  453. },{ //点
  454. name: '景区',
  455. // type: 'effectScatter',
  456. // coordinateSystem: 'bmap',
  457. type: 'scatter3D',
  458. blendMode: 'lighter',
  459. coordinateSystem: 'globe',
  460. showEffectOn: 'render',
  461. zlevel: 2,
  462. effectType:"ripple",
  463. symbolSize: 15,
  464. rippleEffect: {
  465. period: 4,
  466. scale: 4,
  467. brushType: 'fill'
  468. },
  469. // showEffectOn: 'hover',
  470. hoverAnimation: true,
  471. label: {
  472. normal: {
  473. show: true,
  474. position: 'right',
  475. // formatter: '{b}',
  476. formatter:function(params){
  477. if(params.dataIndex == 1){
  478. return '中国-无锡'
  479. }else if(params.dataIndex == 2){
  480. return '韩国'
  481. }else if(params.dataIndex == 3){
  482. return '印度'
  483. }else if(params.dataIndex == 4){
  484. return '日本'
  485. }else if(params.dataIndex == 5){
  486. return '台湾'
  487. }else if(params.dataIndex == 0){
  488. return '泰国'
  489. }else if(params.dataIndex == 6){
  490. return '缅甸'
  491. }
  492. },
  493. textStyle: {
  494. fontSize: 18,
  495. color: '#f5d909',
  496. fontWeight:'bold',
  497. // backgroundColor:'rgba(255,255,255,0.2)'
  498. backgroundColor:'transparent'
  499. }
  500. }
  501. },
  502. itemStyle: {
  503. normal: {
  504. color: 'rgb(29,183,255)'
  505. }
  506. },
  507. // data: [{
  508. // 'name': 'A',
  509. // 'value': [105.18, 37.51, 1500]
  510. // }, {
  511. // 'name': 'B',
  512. // 'value': [118.393252, 31.15576, 1500]
  513. // }, {
  514. // 'name': 'C',
  515. // 'value': [117.989662, 31.293115, 1500]
  516. // }]
  517. data:[
  518. [102.58, 15.01],
  519. [120.58, 32.01],
  520. [127.38, 35.8],
  521. [80.58, 21.01],
  522. [139.46, 35.42],
  523. [121.68, 24.50],
  524. [95.90, 20.31]
  525. ]
  526. }]
  527. }
  528. // 随机数据
  529. option.series[0].data = [
  530. {
  531. coords:[
  532. [102.58, 15.01],
  533. [120.58, 32.01]
  534. ],
  535. value: (Math.random() * 3000).toFixed(2)
  536. },
  537. {
  538. coords:[
  539. [123.38, 41.8],
  540. [120.58, 32.01]
  541. ],
  542. value: (Math.random() * 3000).toFixed(2)
  543. },
  544. {
  545. coords:[
  546. [127.38, 35.8],
  547. [120.58, 32.01]
  548. ],
  549. value: (Math.random() * 3000).toFixed(2)
  550. },
  551. {
  552. coords:[
  553. [139.46, 35.42],
  554. [120.58, 32.01]
  555. ],
  556. value: (Math.random() * 3000).toFixed(2)
  557. },
  558. {
  559. coords:[
  560. [121.68, 24.50],
  561. [120.58, 32.01]
  562. ],
  563. value: (Math.random() * 3000).toFixed(2)
  564. },
  565. {
  566. coords:[
  567. [102.90, 25.31],
  568. [120.58, 32.01]
  569. ],
  570. value: (Math.random() * 3000).toFixed(2)
  571. }
  572. ]
  573. for (let i = 0; i < 10; i++) {
  574. option.series[0].data = option.series[0].data.concat(rodamData())
  575. }
  576. function rodamData() {
  577. let name = '随机点' + Math.random().toFixed(5) * 100000
  578. // let longitude = Math.random() * 62 + 73
  579. let longitude = 118.58
  580. let longitude2 = Math.random() * 360 - 180
  581. // let latitude = Math.random() * 50 + 3.52
  582. let latitude = 32.01
  583. let latitude2 = Math.random() * 180 - 90
  584. return {
  585. coords: [
  586. [longitude2, latitude2],
  587. [longitude, latitude]
  588. ],
  589. value: (Math.random() * 3000).toFixed(2)
  590. }
  591. }
  592. myChart.setOption(option)
  593. //点击事件,根据点击某个省份计算出这个省份的数据
  594. myChart.on('click', function (params) {
  595. console.log(params);
  596. //逻辑控制
  597. alert(params);
  598. });
  599. }
  600. })
  601. </script>
  602. <script type="text/javascript">
  603. var myChart = echarts.init(document.getElementById('pleftbox2bott_cont'));
  604. option = {
  605. color:['#7ecef4'],
  606. backgroundColor: 'rgba(1,202,217,.2)',
  607. grid: {
  608. left:45,
  609. right:20,
  610. top:25,
  611. bottom:0,
  612. containLabel: true
  613. },
  614. xAxis: {
  615. type: 'value',
  616. axisLine:{
  617. lineStyle:{
  618. color:'rgba(255,255,255,0)'
  619. }
  620. },
  621. splitLine:{
  622. lineStyle:{
  623. color:'rgba(255,255,255,0)'
  624. }
  625. },
  626. axisLabel:{
  627. color:"rgba(255,255,255,0)"
  628. },
  629. boundaryGap: [0, 0.01]
  630. },
  631. yAxis: {
  632. type: 'category',
  633. axisLine:{
  634. lineStyle:{
  635. color:'rgba(255,255,255,.5)'
  636. }
  637. },
  638. splitLine:{
  639. lineStyle:{
  640. color:'rgba(255,255,255,.1)'
  641. }
  642. },
  643. axisLabel:{
  644. color:"rgba(255,255,255,.5)"
  645. },
  646. data: ['缅甸','印度','日本','泰国','中国']
  647. },
  648. series: [
  649. {
  650. name: '',
  651. type: 'bar',
  652. barWidth :20,
  653. itemStyle: {
  654. normal: {
  655. color: new echarts.graphic.LinearGradient(
  656. 1, 0, 0, 1,
  657. [
  658. {offset: 0, color: 'rgba(230,253,139,.7)'},
  659. {offset: 1, color: 'rgba(41,220,205,.7)'}
  660. ]
  661. )
  662. }
  663. },
  664. data: [18203, 23489, 29034, 104970, 131744]
  665. }
  666. ]
  667. };
  668. myChart.setOption(option);
  669. </script>
  670. <script type="text/javascript">
  671. var myChart = echarts.init(document.getElementById('pleftbox2bott_cont2'));
  672. option = {
  673. color:['#7ecef4'],
  674. backgroundColor: 'rgba(1,202,217,.2)',
  675. grid: {
  676. left:45,
  677. right:20,
  678. top:17,
  679. bottom:10,
  680. containLabel: true
  681. },
  682. xAxis: {
  683. type: 'value',
  684. axisLine:{
  685. lineStyle:{
  686. color:'rgba(255,255,255,0)'
  687. }
  688. },
  689. splitLine:{
  690. lineStyle:{
  691. color:'rgba(255,255,255,0)'
  692. }
  693. },
  694. axisLabel:{
  695. color:"rgba(255,255,255,0)"
  696. },
  697. boundaryGap: [0, 0.01]
  698. },
  699. yAxis: {
  700. type: 'category',
  701. axisLine:{
  702. lineStyle:{
  703. color:'rgba(255,255,255,.5)'
  704. }
  705. },
  706. splitLine:{
  707. lineStyle:{
  708. color:'rgba(255,255,255,.1)'
  709. }
  710. },
  711. axisLabel:{
  712. color:"rgba(255,255,255,.5)"
  713. },
  714. data: ['无锡','上海','杭州','苏州','南京']
  715. },
  716. series: [
  717. {
  718. name: '',
  719. type: 'bar',
  720. barWidth :20,
  721. itemStyle: {
  722. normal: {
  723. color: new echarts.graphic.LinearGradient(
  724. 1, 0, 0, 1,
  725. [
  726. {offset: 0, color: 'rgba(230,253,139,.7)'},
  727. {offset: 1, color: 'rgba(41,220,205,.7)'}
  728. ]
  729. )
  730. }
  731. },
  732. data: [18203, 23489, 29034, 104970, 131744]
  733. }
  734. ]
  735. };
  736. myChart.setOption(option);
  737. </script>
  738. <script type="text/javascript">
  739. var myChart = echarts.init(document.getElementById('aleftboxtmidd'));
  740. option = {
  741. color:['#d2d17c','#00b7ee', '#5578cf', '#5ebbeb', '#d16ad8','#f8e19a', '#00b7ee', '#81dabe','#5fc5ce'],
  742. backgroundColor: 'rgba(1,202,217,.2)',
  743. grid: {
  744. left:60,
  745. right:60,
  746. top:20,
  747. bottom:0,
  748. containLabel: true
  749. },
  750. legend: {
  751. left: 10,
  752. top: 5,
  753. textStyle:{
  754. fontSize:10,
  755. color:'rgba(255,255,255,.6)'
  756. },
  757. data: ['电量不足','位置偏移','振动异常','电路异常','设备离线']
  758. },
  759. calculable : true,
  760. series : [
  761. {
  762. name:'面积模式',
  763. type:'pie',
  764. radius : [20, 70],
  765. center : ['50%', '55%'],
  766. roseType : 'area',
  767. data:[
  768. {value:187650, name:'电量不足'},
  769. {value:145896, name:'位置偏移'},
  770. {value:148920, name:'振动异常'},
  771. {value:148920, name:'电路异常'},
  772. {value:148920, name:'设备离线'},
  773. ]
  774. }
  775. ]
  776. };
  777. myChart.setOption(option);
  778. </script>
  779. </body>
  780. </html>

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/58394
推荐阅读
相关标签
  

闽ICP备14008679号