js.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1.  $(window).load(function(){
  2. $(".loading").fadeOut()
  3. })
  4. /****/
  5. /****/
  6. $(document).ready(function(){
  7. var whei=$(window).width()
  8. $("html").css({fontSize:whei/20})
  9. $(window).resize(function(){
  10. var whei=$(window).width()
  11. $("html").css({fontSize:whei/20})
  12. });
  13. });
  14. $(function () {
  15. echarts_1();
  16. echarts_2();
  17. echarts_3();
  18. function echarts_1() {
  19. var myChart = echarts.init(document.getElementById('echart1'));
  20. option = {
  21. tooltip: {
  22. trigger: 'axis',
  23. axisPointer: {
  24. lineStyle: {
  25. color: '#57617B'
  26. }
  27. },
  28. formatter: '{b}日 :<br/> 生产情况{c}'
  29. },
  30. grid: {
  31. left: '0',
  32. right: '20',
  33. top: '10',
  34. bottom: '0',
  35. containLabel: true
  36. },
  37. xAxis: [{
  38. type: 'category',
  39. boundaryGap: false,
  40. axisLine: {
  41. show: false,
  42. lineStyle: {
  43. color: 'rgba(255,255,255,.6)'
  44. }
  45. },
  46. data: ['10.2', '10.3', '10.4', '10.5', '10.6', '10.7']
  47. }],
  48. yAxis: [{
  49. axisLabel: {
  50. show: true,
  51. textStyle: {
  52. color: 'rgba(255,255,255,.6)'
  53. }
  54. },
  55. axisLine: {
  56. show: false,
  57. },
  58. splitLine: {
  59. lineStyle: {
  60. type:'dotted',
  61. color: 'rgba(255,255,255,.1)'
  62. }
  63. }
  64. }],
  65. series: [{
  66. name: '生产情况',
  67. type: 'line',
  68. smooth: true,
  69. symbol: 'circle',
  70. symbolSize: 5,
  71. showSymbol: false,
  72. lineStyle: {
  73. normal: {
  74. width: 2
  75. }
  76. },
  77. areaStyle: {
  78. normal: {
  79. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  80. offset: 0,
  81. color: 'rgba(98, 201, 141, 0.5)'
  82. }, {
  83. offset: 1,
  84. color: 'rgba(98, 201, 141, 0.1)'
  85. }], false),
  86. shadowColor: 'rgba(0, 0, 0, 0.1)',
  87. shadowBlur: 10
  88. }
  89. },
  90. itemStyle: {
  91. normal: {
  92. color: '#4cb9cf',
  93. borderColor: 'rgba(98, 201, 141,0.27)',
  94. borderWidth: 12
  95. }
  96. },
  97. data: [91, 60, 70, 54, 80, 40]
  98. }]
  99. };
  100. // 使用刚指定的配置项和数据显示图表。
  101. myChart.setOption(option);
  102. window.addEventListener("resize", function () {
  103. myChart.resize();
  104. });
  105. }
  106. function echarts_2() {
  107. // 基于准备好的dom,初始化echarts实例
  108. var myChart = echarts.init(document.getElementById('echart2'));
  109. option = {
  110. tooltip: {
  111. trigger: 'axis'
  112. },
  113. radar: {
  114. indicator: [{
  115. name: '开料',
  116. max: 100,
  117. num:60,
  118. }, {
  119. name: '仓库',
  120. max: 100,
  121. num:33,
  122. }, {
  123. name: '包装',
  124. max: 100,
  125. num:10,
  126. }, {
  127. name: '分拣',
  128. max: 100,
  129. num:50,
  130. }, {
  131. name: '排钻',
  132. max: 100,
  133. num:100,
  134. }, {
  135. name: '封边',
  136. max: 100,
  137. num:100,
  138. }],
  139. splitNumber: 4,
  140. nameGap: 0,
  141. axisLine: { //指向外圈文本的分隔线样式
  142. lineStyle: {
  143. color: '#2c353d'
  144. }
  145. },
  146. splitLine: {
  147. lineStyle: {
  148. color: ['#2c353d'],
  149. width: 1
  150. }
  151. },
  152. splitArea: {
  153. areaStyle: {
  154. color: ['transparent']
  155. }
  156. },
  157. name: {
  158. color: 'rgba(255,255,255,.8)',
  159. },
  160. },
  161. series: [{
  162. type: 'radar',
  163. tooltip: {
  164. trigger: 'item'
  165. },
  166. symbol: 'none',
  167. itemStyle: {
  168. normal: {
  169. color: '#096e32',
  170. borderColor: '#46ff91'
  171. }
  172. },
  173. areaStyle:{
  174. color:['#096e32'],
  175. opacity:0.4
  176. },
  177. data: [{
  178. value: [60, 33, 10, 50, 80, 100],
  179. }]
  180. },]
  181. };
  182. // 使用刚指定的配置项和数据显示图表。
  183. myChart.setOption(option);
  184. window.addEventListener("resize",function(){
  185. myChart.resize();
  186. });
  187. }
  188. function echarts_3() {
  189. var myChart = echarts.init(document.getElementById('echart3'));
  190. option = {
  191. tooltip: {
  192. trigger: 'axis',
  193. axisPointer: {
  194. lineStyle: {
  195. color: '#57617B'
  196. }
  197. },
  198. formatter: '{b}:<br/> 产量统计{c}'
  199. },
  200. grid: {
  201. left: '0',
  202. right: '20',
  203. top: '10',
  204. bottom: '0',
  205. containLabel: true
  206. },
  207. xAxis: [{
  208. type: 'category',
  209. boundaryGap: false,
  210. axisLine: {
  211. show: false,
  212. lineStyle: {
  213. color: 'rgba(255,255,255,.6)'
  214. }
  215. },
  216. data: ['1月', '2月', '3月', '4月', '5月', '6月']
  217. }],
  218. yAxis: [{
  219. axisLabel: {
  220. show: true,
  221. textStyle: {
  222. color: 'rgba(255,255,255,.6)'
  223. }
  224. },
  225. axisLine: {
  226. show: false,
  227. },
  228. splitLine: {
  229. lineStyle: {
  230. type:'dotted',
  231. color: 'rgba(255,255,255,.1)'
  232. }
  233. }
  234. }],
  235. series: [{
  236. name: '产量统计',
  237. type: 'line',
  238. //smooth: true,
  239. symbol: 'circle',
  240. symbolSize: 5,
  241. //showSymbol: false,
  242. lineStyle: {
  243. normal: {
  244. width: 2
  245. }
  246. },
  247. areaStyle: {
  248. normal: {
  249. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  250. offset: 0,
  251. color: 'rgba(98, 201, 141, 0.5)'
  252. }, {
  253. offset: 1,
  254. color: 'rgba(98, 201, 141, 0.1)'
  255. }], false),
  256. shadowColor: 'rgba(0, 0, 0, 0.1)',
  257. shadowBlur: 10
  258. }
  259. },
  260. itemStyle: {
  261. normal: {
  262. color: '#4cb9cf',
  263. borderColor: 'rgba(98, 201, 141,0.27)',
  264. borderWidth: 12
  265. }
  266. },
  267. data: [33, 80, 20, 60, 10, 91]
  268. }]
  269. };
  270. // 使用刚指定的配置项和数据显示图表。
  271. myChart.setOption(option);
  272. window.addEventListener("resize", function () {
  273. myChart.resize();
  274. });
  275. }
  276. })