0


今日分享开源酷炫大数据可视化大屏html模板

前言

虽然目前已有很多开源在线制作可视化大屏项目
但有时候为了项目赶工期上线,直接利用现成的可视化大屏html模板,配合开源低代码平台Microi吾码的接口引擎,半小时以内就能做一个成品

先上图

在这里插入图片描述

代码也非常简单,利用Microi吾码接口引擎,分分钟套好

  1. <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metahttp-equiv="X-UA-Compatible"content="ie=edge"><title>数据中心可视化平台模板</title><linkrel="stylesheet"href="css/index.css"><linkrel="stylesheet"href="css/reset.css"></head><body><divid="particles-js"class="main"><divclass="main_con"><divclass="main_top"><divclass="main_top_left"><divclass="main_top_left_top"><imgsrc="./images/main_top_left.png"/><divclass="main_top_left_top_title">公开数据展示</div><divclass="main_top_left_top_con"><divclass="main_top_left_top_con_list"><spanclass="main_top_left_c_l_n main_top_left_c_l_n1">0</span><p>党务公开</p></div><divclass="main_top_left_top_con_list"><spanclass="main_top_left_c_l_n main_top_left_c_l_n2">0</span><p>政务公开</p></div><divclass="main_top_left_top_con_list"><spanclass="main_top_left_c_l_n main_top_left_c_l_n3">0</span><p>财务公开</p></div><divclass="main_top_left_top_con_left"><divclass="main_top_left_t_c_l_left"><spanclass="main_top_left_c_l_n main_top_left_c_l_n4">0</span><p>村务公开</p></div><divclass="main_top_left_t_c_l_right"><spanclass="main_top_left_c_l_n main_top_left_c_l_n5">0</span><p>居务公开</p></div></div><divclass="main_top_left_top_con_right main_top_left_top_con_right2"><divclass="main_top_left_t_c_r_left"><spanclass="main_top_left_c_l_n">0</span><p>占位公开</p></div><divclass="main_top_left_t_c_r_right"><spanclass="main_top_left_c_l_n">0</span><p>占位公开</p></div></div></div></div><divclass="main_top_left_top main_top_left_bottom"><imgsrc="./images/main_top_left.png"/><divclass="main_top_left_top_title">信息员添加数据展示</div><divid="baseId"class="main_top_left_top_con"></div></div></div><divclass="main_top_middle"><divclass="main_top_middle_top_title"><imgclass="title_bg"src="./images/title_bg.png">
  2. 大数据中心可视化平台模板
  3. <aclass="title_web"href=""target="blank">管理系统</a><aclass="title_admin"href=""target="blank">web网页</a></div><divclass="main_top_middle_num_title">公开数量</div><divclass="main_top_middle_num"><!-- <div class="main_top_middle_num_list">
  4. <img src="./images/center_num.png">
  5. <p class="main_top_middle_num_list6">0</p>
  6. </div> --><divclass="main_top_middle_num_list"><imgsrc="./images/center_num.png"><pclass="main_top_middle_num_list5">0</p></div><divclass="main_top_middle_num_list"><imgsrc="./images/center_num.png"><pclass="main_top_middle_num_list4">0</p></div><divclass="main_top_middle_num_list"><imgsrc="./images/center_num.png"><pclass="main_top_middle_num_list3">0</p></div><divclass="main_top_middle_num_list"><imgsrc="./images/center_num.png"><pclass="main_top_middle_num_list2">0</p></div><divclass="main_top_middle_num_list"><imgsrc="./images/center_num.png"><pclass="main_top_middle_num_list1">0</p></div></div><divclass="main_top_middle_bottom"><divclass="main_top_middle_bottom_echarts"><imgsrc="./images/main_top_bottom.png"><divclass="main_top_echarts_con"><divclass="main_top_echarts_con_title">公开数量占比</div><divid="threeTasksId"class="main_top_echarts_pie"></div></div></div><divclass="main_top_middle_bottom_echarts main_top_middle_bottom_echarts_right"><imgsrc="./images/main_top_bottom.png"><divclass="main_top_echarts_con"><divclass="main_top_echarts_con_title">公开数量占比</div><divid="publicityId"class="main_top_echarts_pie"></div></div></div></div></div><divclass="main_top_left main_top_right"><divclass="main_top_left_top"><imgsrc="./images/main_top_left.png"/><divclass="main_top_left_top_title">数据展示</div><divclass="main_top_left_top_con"><divclass="main_top_left_top_con_left"><spanclass="daysData">0</span><p>今日公开</p></div><divclass="main_top_left_top_con_right"><spanclass="weekData">0</span><p>本周公开</p></div><divclass="main_top_left_top_con_list"><spanclass="monthData">0</span><p>本月公开</p></div><divclass="main_top_left_top_con_list"><spanclass="someThing">0</span><p>办事指南</p></div><divclass="main_top_left_top_con_list"><spanclass="policyData">0</span><p>政策解读</p></div></div></div><divclass="main_top_left_top main_top_left_bottom"><imgsrc="./images/main_top_left.png"/><divclass="main_top_left_top_title">数量类型占比</div><divid="questionId"class="main_top_left_top_con"></div></div></div></div><divclass="main_middle"><divclass="main_middle_list"><imgsrc="./images/main_middle.png"><divclass="main_list_title main_list_title1">X镇</div><spanclass="main_list_title_num main_list_title_num1">0</span></div><divclass="main_middle_list"><imgsrc="./images/main_middle.png"><divclass="main_list_title main_list_title2"></div><spanclass="main_list_title_num main_list_title_num2">0</span></div><divclass="main_middle_list"><imgsrc="./images/main_middle.png"><divclass="main_list_title main_list_title3"></div><spanclass="main_list_title_num main_list_title_num3">0</span></div><divclass="main_middle_list"><imgsrc="./images/main_middle.png"><divclass="main_list_title main_list_title4"></div><spanclass="main_list_title_num main_list_title_num4">0</span></div><divclass="main_middle_list"><imgsrc="./images/main_middle.png"><divclass="main_list_title main_list_title5"></div><spanclass="main_list_title_num main_list_title_num5">0</span></div></div><divclass="main_bottom"><divclass="main_bottom_top"><divclass="main_bottom_top_list"><imgsrc="./images/main_bottopm_top1.png"><divclass="main_bottom_t_l_title">指南</div><divclass="main_bottom_t_l_con"><divclass="main_bottom_t_l_main"><ul><li><divclass="main_bottom_t_l_main_list"><divclass="main_bottom_t_list_title main_bottom_t_list_title1">大数据中心可视化平台模板</div><divclass="main_bottom_t_list_time main_bottom_t_list_time1">2020/08/19</div></div></li><li><divclass="main_bottom_t_l_main_list"><divclass="main_bottom_t_list_title main_bottom_t_list_title2">大数据中心可视化平台模板</div><divclass="main_bottom_t_list_time main_bottom_t_list_time2">2020/08/19</div></div></li><li><divclass="main_bottom_t_l_main_list"><divclass="main_bottom_t_list_title main_bottom_t_list_title3">大数据中心可视化平台模板</div><divclass="main_bottom_t_list_time main_bottom_t_list_time3">2020/08/19</div></div></li><li><divclass="main_bottom_t_l_main_list"><divclass="main_bottom_t_list_title main_bottom_t_list_title4">大数据中心可视化平台模板</div><divclass="main_bottom_t_list_time main_bottom_t_list_time4">2020/08/19</div></div></li></ul></div></div></div><divclass="main_bottom_top_list"><imgsrc="./images/main_bottopm_top2.png"><divclass="main_bottom_t_l_title">公开占比</div><divid="departmentId"class="main_bottom_t_l_chart"></div></div><divclass="main_bottom_top_list"><imgsrc="./images/main_bottopm_top1.png"><divclass="main_bottom_t_l_title">政策</div><divclass="main_bottom_t_l_con"><divclass="main_bottom_t_l_main2"><ul><li><divclass="main_bottom_t_l_main_list"><divclass="main_bottom_t_list_title main_bottom_polity_title1">大数据中心可视化平台模板</div><divclass="main_bottom_t_list_time main_bottom_polity_time1">2020/08/19</div></div></li><li><divclass="main_bottom_t_l_main_list"><divclass="main_bottom_t_list_title main_bottom_polity_title2">大数据中心可视化平台模板</div><divclass="main_bottom_t_list_time main_bottom_polity_time1">2020/08/19</div></div></li><li><divclass="main_bottom_t_l_main_list"><divclass="main_bottom_t_list_title main_bottom_polity_title3">大数据中心可视化平台模板</div><divclass="main_bottom_t_list_time main_bottom_polity_time1">2020/08/19</div></div></li><li><divclass="main_bottom_t_l_main_list"><divclass="main_bottom_t_list_title main_bottom_polity_title4">大数据中心可视化平台模板</div><divclass="main_bottom_t_list_time main_bottom_polity_time1">2020/08/19</div></div></li></ul></div></div></div></div><divclass="main_bottom_bottom"><divclass="main_bottom_b_left"><imgsrc="./images/main_bottom_bottom.png"><divclass="main_bottom_b_title">主要关注占比</div><divid="coverageId"class="main_bottom_b_con"></div></div><divclass="main_bottom_b_middle1"><imgsrc="./images/main_bootm_middle.png"><divclass="main_bottom_b_title">关注占比</div><divid="contentId"class="main_bottom_b_con main_bottom_b_con2"></div></div><divclass="main_bottom_b_middle2"><imgsrc="./images/main_bootm_middle.png"><divclass="main_bottom_b_title">发布量</div><divid="publicNumId"class="main_bottom_b_con main_bottom_b_con2"></div></div><divclass="main_bottom_b_right"><imgsrc="./images/main_bottom_bottom.png"><divclass="main_bottom_b_title">X公开数量</div><divid="yearsNumId"class="main_bottom_b_con"></div></div></div></div></div></div></body></html><scriptsrc="js/jquery.min.js"></script><scriptsrc="js/echarts.min.js"></script><scripttype="text/javascript"src="js/dataScoll.js"></script><scripttype="text/javascript"src="js/digitalScroll.js"></script><scripttype="text/javascript"src="js/jcarousellite.js"></script><scripttype="text/javascript"src="js/particles.min.js"></script><scripttype="text/javascript"src="js/app.js"></script><script>$(function(){functionapiFn(){this.hostname =""}
  7. apiFn.prototype ={Init:function(){this.findCount()this.otherDataFn()this.baseInfo()this.questionFn()this.publicityFn()this.threeTasksFn()this.departmentFn()this.guideFn()this.policyFn()this.coverageFn()this.yearsNumFn()this.contentFn()this.publicNumFn()setInterval(function(){numInit()},6000)},findCount:function(){},// 其他数据展示otherDataFn:function(){$(".daysData").addClass("counter-value").text("304")$(".weekData").addClass("counter-value").text("2044")$(".monthData").addClass("counter-value").text("909")$(".someThing").addClass("counter-value").text("980")$(".policyData").addClass("counter-value").text("200")},// 基础信息baseInfo:function(){var baseChart = echarts.init(document.getElementById('baseId'));var charts =[{name:"测试1", num:200},{name:"测试2", num:300},{name:"测试3", num:400},{name:"测试4", num:500},{name:"测试5", num:300},]var color =['rgba(100,255,249','rgba(100,255,249','rgba(100,255,249','rgba(100,255,249','rgba(100,255,249']let lineY =[]for(var i =0; i < charts.length; i++){var x = i
  8. if(x > color.length -1){
  9. x = color.length -1}var data ={
  10. name: charts[i].name,
  11. color: color[x]+')',
  12. value: charts[i].num,
  13. itemStyle:{
  14. normal:{
  15. show:true,
  16. color:newecharts.graphic.LinearGradient(0,0,1,0,[{
  17. offset:0,
  18. color: color[x]+', 0.3)'},{
  19. offset:1,
  20. color: color[x]+', 1)'}],false),
  21. barBorderRadius:10},
  22. emphasis:{
  23. shadowBlur:15,
  24. shadowColor:'rgba(0, 0, 0, 0.1)'}}}
  25. lineY.push(data)}var option={
  26. title:{
  27. show:false},
  28. grid:{// borderWidth: 1,
  29. top:'10%',
  30. left:'30%',
  31. right:'20%',
  32. bottom:'3%'},
  33. color: color,
  34. yAxis:[{
  35. type:'category',
  36. inverse:true,
  37. axisTick:{
  38. show:false},
  39. axisLine:{
  40. show:false},
  41. axisLabel:{
  42. show:false,
  43. inside:false},
  44. data: charts.name
  45. },{
  46. type:'category',
  47. inverse:true,
  48. axisLine:{
  49. show:false},
  50. axisTick:{
  51. show:false},
  52. axisLabel:{
  53. show:true,
  54. inside:false,
  55. textStyle:{
  56. color:'#38E1E1',
  57. fontSize:'8',},formatter:function(val,index){return`${charts[index].num}`}},
  58. splitArea:{
  59. show:false},
  60. splitLine:{
  61. show:false},
  62. data: charts
  63. }],
  64. xAxis:{// type: 'value',
  65. axisTick:{
  66. show:false},
  67. axisLine:{
  68. show:false},
  69. splitLine:{
  70. show:false},
  71. axisLabel:{
  72. show:false}},
  73. series:[{
  74. name:'',
  75. type:'bar',
  76. zlevel:2,
  77. barWidth:'5px',
  78. data: lineY,
  79. animationDuration:1500,
  80. label:{
  81. normal:{
  82. color:'white',
  83. show:true,
  84. position:[-65,-2],
  85. textStyle:{
  86. fontSize:8},formatter:function(a, b){return a.name
  87. }}}}],
  88. animationEasing:'cubicOut'}
  89. baseChart.setOption(option)setInterval(function(){
  90. baseChart.clear()
  91. baseChart.setOption(option)},40000)},// 问题反馈类型占比questionFn:function(){var numArr =[{name:'测试11', value:300},{name:'测试22', value:500},{name:'测试33', value:400},{name:'测试44', value:350},{name:'测试55', value:363},{name:'测试66', value:800},]// for(var i = 0; i < data.list.length; i++) {// numArr.push({name: data.list[i].name,value: data.list[i].num})// }var datas = numArr
  92. var questionChart = echarts.init(document.getElementById('questionId'));var option ={
  93. title:{
  94. left:'center'},
  95. tooltip:{
  96. trigger:'item',
  97. formatter:'{a} <br/>{b} : {c} ({d}%)'},
  98. color:['#2E8CFF','#FD9133','#37D2D4','#19CA88','#858FF8'],
  99. legend:{
  100. itemWidth:11,// 标志图形的长度
  101. itemHeight:11,// 标志图形的宽度
  102. orient:'vertical',// left: 'right',
  103. top:'15%',
  104. x:'50%',
  105. data: datas,
  106. textStyle:{//图例文字的样式
  107. color:'#fff',
  108. fontSize:8},},
  109. series:[{
  110. name:'问题反馈',
  111. type:'pie',
  112. radius:'75%',
  113. center:['20%','50%'],
  114. animationDuration:2500,
  115. data: datas,
  116. label:{
  117. normal:{
  118. position:'inner',
  119. show :false}}}]};
  120. questionChart.setOption(option)setInterval(function(){
  121. questionChart.clear()
  122. questionChart.setOption(option)},8000)},// 党务公开publicityFn:function(){var dataArr =[{name:'测试11', value:300},{name:'测试22', value:500},{name:'测试33', value:400},{name:'测试44', value:350},{name:'测试55', value:363},{name:'测试66', value:800},]// for(var i = 0; i < res.list.length; i++) {// dataArr.push({name: res.list[i].name, value: res.list[i].num})// }var publicitChart = echarts.init(document.getElementById('publicityId'));var data = dataArr
  123. var option ={
  124. color:['#38EB70','#F7E16C','#0EFCFF','#FD9133','#4D92F2'],
  125. tooltip:{
  126. trigger:'item',
  127. formatter:'{a} <br/>{b} : {c} ({d}%)'},
  128. legend:{
  129. itemWidth:12,// 标志图形的长度
  130. itemHeight:12,// 标志图形的宽度
  131. orient:'vertical',// left: 'right',
  132. top:'5%',
  133. bottom:'50%',
  134. x:'45%',
  135. textStyle:{
  136. color:'#fff',
  137. fontSize:8,},
  138. data: data,},
  139. series:[// 主要展示层的{
  140. radius:['70%','90%'],
  141. center:['25%','50%'],
  142. type:'pie',
  143. label:{
  144. normal:{
  145. position:'inner',
  146. show :false}},
  147. name:"公开数量",
  148. data: data,},// 边框的设置{
  149. radius:['50%','55%'],
  150. center:['25%','50%'],
  151. type:'pie',
  152. label:{
  153. normal:{
  154. show:false},
  155. emphasis:{
  156. show:false}},
  157. labelLine:{
  158. normal:{
  159. show:false},
  160. emphasis:{
  161. show:false}},
  162. animation:false,
  163. tooltip:{
  164. show:false},
  165. data:[{
  166. value:1,
  167. itemStyle:{
  168. color:"rgba(250,250,250,0.3)",},}],}]};
  169. publicitChart.setOption(option)setInterval(function(){
  170. publicitChart.clear()
  171. publicitChart.setOption(option)},6000)},// 三务公开数量threeTasksFn:function(){let names ="666666";if(6- names.length >0){for(g =0; g <6- names.length; g++){$(".main_top_middle_num_list"+(6- g)).text('0')}}for(var j =0; j < names.length; j++){$(".main_top_middle_num_list"+(names.length - j)).text(names.substr(j,1))}var dataArr =[{name:'测试11', value:300},{name:'测试22', value:500},{name:'测试33', value:400},{name:'测试44', value:350},{name:'测试55', value:363},{name:'测试66', value:800},]for(var i =1; i < dataArr.length; i++){$(".main_top_left_c_l_n"+i).addClass("counter-value").text(dataArr[i].value)}var threeTasksChart = echarts.init(document.getElementById('threeTasksId'));var data = dataArr
  172. var option ={
  173. color:['#38EB70','#2E8CFF','#0EFCFF','#858FF8','#FD9133','#F7E270'],
  174. tooltip :{
  175. trigger:'item',
  176. formatter:"{a} <br/>{b} : {c} ({d}%)"},
  177. legend:{
  178. itemWidth:15,// 标志图形的长度
  179. itemHeight:15,// 标志图形的宽度
  180. orient:'vertical',// left: 'right',
  181. top:'10%',
  182. bottom:'50%',
  183. x:'50%',
  184. textStyle:{
  185. color:'#fff',
  186. fontSize:8,},
  187. data: data
  188. },
  189. series :{
  190. name:'三务公开数量',
  191. type:'pie',
  192. animationDuration:1500,
  193. radius:['70%','90%'],
  194. center:['25%','50%'],
  195. roseType :'radius',
  196. label:{
  197. normal:{
  198. position:'inner',
  199. show :false}},
  200. data:data
  201. }};
  202. threeTasksChart.setOption(option)setInterval(function(){
  203. threeTasksChart.clear()
  204. threeTasksChart.setOption(option)},4000)},// 各部门苏木镇嘎查村公开占比departmentFn:function(){var dataArr =[{name:'测试11', value:300},{name:'测试22', value:500},{name:'测试33', value:400},{name:'测试44', value:350},{name:'测试55', value:363},]// 中间滚动数据展示for(var j =0; j < dataArr.length; j++){$(".main_list_title_num"+(j+1)).addClass("counter-value").text(dataArr[j].value)$(".main_list_title"+(j+1)).text(dataArr[j].name)}var departmentChart = echarts.init(document.getElementById('departmentId'));var data = dataArr
  205. var option ={
  206. color:['#FD9133','#47F6A2','#37D2D4','#3493FF'],
  207. tooltip :{
  208. trigger:'item',
  209. formatter:"{a} <br/>{b} : {c} ({d}%)"},
  210. legend:{
  211. itemWidth:15,// 标志图形的长度
  212. itemHeight:15,// 标志图形的宽度
  213. orient:'vertical',// left: 'right',
  214. top:'30%',
  215. bottom:'50%',
  216. x:'5%',
  217. textStyle:{
  218. color:'#fff',
  219. fontSize:8,},
  220. data: data,},
  221. series:[{
  222. name:'公开占比',
  223. type:'pie',
  224. radius:['50%','70%'],
  225. center:['78%','52%'],
  226. labelLine:{
  227. normal:{
  228. length:12,
  229. lineStyle:{
  230. type:'solid',
  231. color:'#0EFCFF'}}},
  232. label:{
  233. normal:{formatter:(params)=>{return params.name
  234. },
  235. borderWidth:0,
  236. borderRadius:4,
  237. padding:[0,0],
  238. height:20,
  239. fontSize:8,
  240. align:'center',
  241. color:'#0EFCFF',}},
  242. data: data
  243. },{
  244. color:'#0EFCFF',
  245. type:'pie',
  246. radius:['55','56'],
  247. center:['78%','52%'],
  248. data:[100],
  249. label:{
  250. show:false}},{
  251. type:'pie',
  252. radius:['25','26'],
  253. center:['78%','52%'],
  254. data:[100],
  255. label:{
  256. show:false}}]};
  257. departmentChart.setOption(option)setInterval(function(){
  258. departmentChart.clear()
  259. departmentChart.setOption(option)},12000)},// 办事指南guideFn:function(){$(".main_bottom_t_l_main").jCarouselLite({
  260. vertical:true,
  261. hoverPause:true,
  262. visible:4,
  263. auto:1000,
  264. speed:500});},// 政策解读policyFn:function(){$(".main_bottom_t_l_main2").jCarouselLite({
  265. vertical:true,
  266. hoverPause:true,
  267. visible:4,
  268. auto:1000,
  269. speed:500});},// 主要关注内容区域占比coverageFn:function(){var resArr =[{name:'测试11', value:300},{name:'测试22', value:500},{name:'测试33', value:400},{name:'测试44', value:350},{name:'测试55', value:363},{name:'测试66', value:800},]var indicatorArr =[]var numArr =[]for(var i =0; i < resArr.length; i++){
  270. indicatorArr.push({name: resArr[i].name,max:900})
  271. numArr.push(resArr[i].value)}var data =[{
  272. value: numArr,}]var coverageChart = echarts.init(document.getElementById('coverageId'));var option ={
  273. legend:{
  274. show:true,
  275. icon:"circle",
  276. bottom:30,
  277. center:0,
  278. itemWidth:14,
  279. itemHeight:14,
  280. itemGap:21,
  281. orient:"horizontal",
  282. data:['a','b'],
  283. textStyle:{
  284. fontSize:'70%',
  285. color:'#0EFCFF'},},
  286. radar:{// shape: 'circle',
  287. radius:'70%',
  288. triggerEvent:true,// type: 'default',
  289. name:{
  290. textStyle:{
  291. color:'#39DCF4',
  292. fontSize:'10',// borderRadius: 3,
  293. padding:[10,10]}},
  294. nameGap:'2',
  295. indicator: indicatorArr,
  296. splitArea:{
  297. areaStyle:{
  298. color:'rgba(255,255,255,0)'}},
  299. axisLine:{//指向外圈文本的分隔线样式
  300. lineStyle:{
  301. color:'rgba(255,255,255,.2)'}},
  302. splitLine:{
  303. lineStyle:{
  304. width:1,
  305. color:'rgba(255,255,255,.2)'}},},
  306. series:[{
  307. name:'X区域占比',
  308. type:'radar',
  309. animationDuration:2000,
  310. areaStyle:{
  311. normal:{
  312. color:{
  313. type:'linear',
  314. opacity:1,
  315. x:0,
  316. y:0,
  317. x2:0,
  318. y2:1,
  319. color:'#2EEFAD'}}},
  320. symbolSize:0,
  321. lineStyle:{
  322. normal:{// color: 'rgba(252,211,3, 1)',
  323. width:0}},
  324. data: data
  325. }]};
  326. coverageChart.setOption(option)setInterval(function(){
  327. coverageChart.clear()
  328. coverageChart.setOption(option)},10000)},// 本年公开数量yearsNumFn:function(){var resArr =[{name:'测试11', value:30},{name:'测试22', value:50},{name:'测试33', value:40},{name:'测试44', value:35},{name:'测试55', value:36},{name:'测试66', value:80},]var nameArr =[]var caiArr =[]var cunArr =[]var danArr =[]var junArr =[]var zhenArr =[]for(var i =0; i < resArr.length; i++){
  329. nameArr.push(resArr[i].name)
  330. caiArr.push(resArr[i].value)
  331. cunArr.push(resArr[i].value)
  332. danArr.push(resArr[i].value)
  333. junArr.push(resArr[i].value)
  334. zhenArr.push(resArr[i].value)}var yearsNumChart = echarts.init(document.getElementById('yearsNumId'));var spNum =5,_max=100;var y_data = nameArr.reverse();var _datamax =[100,100,100,100,100,100,100,100,100,100,100,100],
  335. _data1 = caiArr.reverse(),
  336. _data2 = cunArr.reverse(),
  337. _data3 = danArr.reverse();
  338. _data4 = junArr.reverse();
  339. _data5 = zhenArr.reverse();varfomatter_fn=function(v){return(v.value / _max *100).toFixed(0)}var _label ={
  340. normal:{
  341. show:true,
  342. position:'inside',
  343. formatter: fomatter_fn,
  344. textStyle:{
  345. color:'#fff',
  346. fontSize:8}}};var option ={
  347. grid:{
  348. containLabel:true,
  349. left:0,
  350. top:0,
  351. right:0,
  352. bottom:0},
  353. tooltip:{
  354. show:true,
  355. backgroundColor:'#fff',
  356. borderColor:'#ddd',
  357. borderWidth:1,
  358. textStyle:{
  359. color:'#3c3c3c',
  360. fontSize:16},
  361. extraCssText:'box-shadow: 0 0 5px rgba(0, 0, 0, 0.1)'},
  362. xAxis:{
  363. splitNumber: spNum,
  364. interval: _max / spNum,
  365. max: _max,
  366. axisLabel:{
  367. show:false,formatter:function(v){var _v =(v / _max *100).toFixed(0);return _v ==0? _v : _v +'%';}},
  368. axisLine:{
  369. show:false},
  370. axisTick:{
  371. show:false},
  372. splitLine:{
  373. show:false}},
  374. yAxis:[{
  375. data: y_data,
  376. axisLabel:{
  377. fontSize:8,
  378. color:'rgba(255,255,255,.7)'},
  379. axisLine:{
  380. show:false},
  381. axisTick:{
  382. show:false},
  383. splitLine:{
  384. show:false}},{
  385. show:false,
  386. data: y_data,
  387. axisLine:{
  388. show:false}}],
  389. series:[{
  390. type:'bar',
  391. name:'财务',
  392. stack:'2',
  393. label: _label,
  394. legendHoverLink:false,
  395. barWidth:7,
  396. itemStyle:{
  397. normal:{
  398. color:'#FD9133'},
  399. emphasis:{
  400. color:'#FD9133'}},
  401. data: _data1
  402. },{
  403. type:'bar',
  404. name:'村务',
  405. stack:'2',
  406. legendHoverLink:false,
  407. barWidth:20,
  408. label: _label,
  409. itemStyle:{
  410. normal:{
  411. color:'#2E8CFF'},
  412. emphasis:{
  413. color:'#2E8CFF'}},
  414. data: _data2
  415. },{
  416. type:'bar',
  417. stack:'2',
  418. name:'党务',
  419. legendHoverLink:false,
  420. barWidth:20,
  421. label: _label,
  422. itemStyle:{
  423. normal:{
  424. color:'#37D2D4'},
  425. emphasis:{
  426. color:'#37D2D4'}},
  427. data: _data3
  428. },{
  429. type:'bar',
  430. stack:'2',
  431. name:'居务',
  432. legendHoverLink:false,
  433. barWidth:20,
  434. label: _label,
  435. itemStyle:{
  436. normal:{
  437. color:'#19CA88'},
  438. emphasis:{
  439. color:'#19CA88'}},
  440. data: _data4
  441. },{
  442. type:'bar',
  443. stack:'2',
  444. name:'政务',
  445. legendHoverLink:false,
  446. barWidth:20,
  447. label: _label,
  448. itemStyle:{
  449. normal:{
  450. color:'#0EFCFF'},
  451. emphasis:{
  452. color:'#0EFCFF'}},
  453. data: _data5
  454. }]};
  455. yearsNumChart.setOption(option)setInterval(function(){
  456. yearsNumChart.clear()
  457. yearsNumChart.setOption(option)},120000)},// 关注内容区域占比contentFn:function(){var resArr =[{name:'测试11', value:30},{name:'测试22', value:50},{name:'测试55', value:33},{name:'测试66', value:80},]var nameArr =[]var caiArr =[]var cunArr =[]var danArr =[]var junArr =[]var zhenArr =[]for(var i =0; i < resArr.length; i++){
  458. nameArr.push(resArr[i].name)
  459. caiArr.push(resArr[i].value)
  460. cunArr.push(resArr[i].value)
  461. danArr.push(resArr[i].value)
  462. junArr.push(resArr[i].value)
  463. zhenArr.push(resArr[i].value)}var contentChart = echarts.init(document.getElementById('contentId'));var option ={
  464. tooltip:{
  465. trigger:'axis'},
  466. legend:{
  467. x:'35%',
  468. y:'0%',
  469. data:["财务","村务","党务","居务","政务"],
  470. textStyle:{
  471. color:"#fff",
  472. fontSize:8},
  473. itemWidth:10,
  474. itemHeight:10,},
  475. calculable:true,
  476. xAxis:[{
  477. type:'category',
  478. data: nameArr,
  479. axisLabel:{
  480. interval:0,
  481. textStyle:{
  482. fontSize:8,
  483. color:'rgba(255,255,255,.7)',}},"axisTick":{//y轴刻度线"show":false},"axisLine":{//y轴"show":false,},}],
  484. yAxis:[{
  485. type:'value',
  486. scale:true,
  487. name:'单位:%',
  488. nameTextStyle:{
  489. color:'rgba(255,255,255,.7)',
  490. fontSize:8},
  491. max:100,
  492. min:0,
  493. boundaryGap:[0.2,0.2],"axisTick":{//y轴刻度线"show":false},"axisLine":{//y轴"show":false,},
  494. axisLabel:{
  495. textStyle:{
  496. color:'rgba(255,255,255,.8)',
  497. fontSize:8// opacity: 0.1,}},
  498. splitLine:{//决定是否显示坐标中网格
  499. show:true,
  500. lineStyle:{
  501. color:['#fff'],
  502. opacity:0.2}},},{
  503. type:'value',
  504. scale:true,
  505. show:false,// name: "销量额(万元)",
  506. nameTextStyle:{
  507. color:'rgba(255,255,255,.2)',},
  508. max:1,
  509. min:0,
  510. boundaryGap:[0.2,0.2],"axisTick":{//y轴刻度线"show":false},"axisLine":{//y轴"show":false,},
  511. axisLabel:{
  512. textStyle:{
  513. color:'rgba(255,255,255,.2)',// opacity: 0.1,}},
  514. splitLine:{//决定是否显示坐标中网格
  515. show:true,
  516. lineStyle:{
  517. color:['#fff'],
  518. opacity:0.2}},}],
  519. color:['#0EFCFF','#FD9133'],
  520. grid:{
  521. left:'5%',
  522. right:'1%',
  523. top:'25%',
  524. bottom:'15%'// containLabel: true},
  525. series:[{
  526. barWidth:'10%',
  527. name:'财务',
  528. type:'bar',
  529. data: caiArr,},{
  530. animationDuration:2500,
  531. barWidth:'20%',
  532. name:'村务',
  533. type:'bar',
  534. data: cunArr,},{
  535. animationDuration:2500,
  536. barWidth:'20%',
  537. name:'党务',
  538. type:'bar',
  539. data: danArr,},{
  540. animationDuration:2500,
  541. barWidth:'20%',
  542. name:'居务',
  543. type:'bar',
  544. data: junArr,},{
  545. animationDuration:2500,
  546. barWidth:'20%',
  547. name:'政务',
  548. type:'bar',
  549. data: zhenArr,}]};
  550. contentChart.setOption(option)setInterval(function(){
  551. contentChart.clear()
  552. contentChart.setOption(option)},90000)},// 巡察publicNumFn:function(){var resArr =[{name:'测试11', value:300},{name:'测试22', value:500},{name:'测试33', value:400},{name:'测试44', value:350},{name:'测试55', value:363},{name:'测试66', value:800},]var xunArr =[]var jingArr =[]var dateArr =[]for(var i =0; i < resArr.length; i++){
  553. xunArr.push(resArr[i].value)
  554. jingArr.push(resArr[i].value)
  555. dateArr.push(resArr[i].name)}var publicNumChart = echarts.init(document.getElementById('publicNumId'));var option ={
  556. tooltip:{
  557. trigger:'axis'},
  558. legend:{
  559. x:'35%',
  560. y:'0%',
  561. data:['巡察','警示'],
  562. textStyle:{
  563. color:"#fff",
  564. fontSize:8},
  565. itemWidth:10,
  566. itemHeight:10,},
  567. calculable:true,
  568. xAxis:[{
  569. type:'category',
  570. data: dateArr,
  571. axisLabel:{
  572. interval:0,
  573. textStyle:{
  574. fontSize:8,
  575. color:'rgba(255,255,255,.7)',}},"axisTick":{//y轴刻度线"show":false},"axisLine":{//y轴"show":false,},}],
  576. yAxis:[{
  577. type:'value',
  578. scale:true,
  579. name:'单位:%',
  580. nameTextStyle:{
  581. color:'rgba(255,255,255,.7)',
  582. fontSize:8},
  583. max:1000,
  584. min:0,
  585. boundaryGap:[0.2,0.2],"axisTick":{//y轴刻度线"show":false},"axisLine":{//y轴"show":false,},
  586. axisLabel:{
  587. textStyle:{
  588. color:'rgba(255,255,255,.8)',
  589. fontSize:8// opacity: 0.1,}},
  590. splitLine:{//决定是否显示坐标中网格
  591. show:true,
  592. lineStyle:{
  593. color:['#fff'],
  594. opacity:0.2}},},{
  595. type:'value',
  596. scale:true,
  597. show:false,// name: "销量额(万元)",
  598. nameTextStyle:{
  599. color:'rgba(255,255,255,.2)',},
  600. max:1,
  601. min:0,
  602. boundaryGap:[0.2,0.2],"axisTick":{//y轴刻度线"show":false},"axisLine":{//y轴"show":false,},
  603. axisLabel:{
  604. textStyle:{
  605. color:'rgba(255,255,255,.2)',// opacity: 0.1,}},
  606. splitLine:{//决定是否显示坐标中网格
  607. show:true,
  608. lineStyle:{
  609. color:['#fff'],
  610. opacity:0.2}},}],
  611. color:['#2E8CFF','#38EB70'],
  612. grid:{
  613. left:'5%',
  614. right:'1%',
  615. top:'25%',
  616. bottom:'15%'// containLabel: true},
  617. series:[{
  618. animationDuration:2500,
  619. barWidth:'20%',
  620. name:'巡察',
  621. type:'bar',
  622. data: xunArr,},{
  623. barWidth:'20%',
  624. name:'警示',
  625. type:'bar',
  626. data: jingArr,}],
  627. animationEasing:'cubicOut'};
  628. publicNumChart.setOption(option)setInterval(function(){
  629. publicNumChart.clear()
  630. publicNumChart.setOption(option)},60000)}}var start =newapiFn()
  631. start.Init()})</script>

完整源码见资源绑定


本文转载自: https://blog.csdn.net/qq973702/article/details/143812634
版权归原作者 Microi吾码 所有, 如有侵权,请联系我们删除。

“今日分享开源酷炫大数据可视化大屏html模板”的评论:

还没有评论