data.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /**
  2. * 公共参数设置
  3. */
  4. var options = function() {
  5. return {
  6. url: 'xxxx',
  7. toolbox: {
  8. show: true,
  9. iconStyle: {
  10. borderColor: "rgba(255,255,255,.8)",
  11. },
  12. feature: {
  13. magicType: {
  14. type: ['line', 'bar']
  15. },
  16. }
  17. },
  18. yAxis: {
  19. nameTextStyle: {
  20. color: "rgba(255,255,255,.6)",
  21. },
  22. splitLine: {
  23. show: false
  24. },
  25. axisLine: { //坐标轴线
  26. show: true,
  27. lineStyle: {
  28. color: "rgba(255,255,255,.1 )",
  29. width: 2,
  30. type: "solid"
  31. },
  32. },
  33. splitNumber: 3,
  34. axisLabel: {
  35. //formatter: '{value} %',
  36. show: true,
  37. textStyle: {
  38. color: "rgba(255,255,255,.6)",
  39. fontSize: '13',
  40. },
  41. }
  42. },
  43. lineStyle: {
  44. normal: {
  45. color: '#23abca',
  46. width: 2
  47. }
  48. },
  49. symbolSize: 5,
  50. areaStyle: {
  51. normal: {
  52. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  53. offset: 0,
  54. color: '#23abcabd'
  55. }, {
  56. offset: 0.8,
  57. color: 'rgba(0, 216, 135, 0.1)'
  58. }], false),
  59. shadowColor: 'rgba(0, 0, 0, 0.1)',
  60. }
  61. },
  62. itemStyle: {
  63. normal: {
  64. color: 'white',
  65. borderColor: 'rgba(221, 220, 107, .1)',
  66. borderWidth: 12,
  67. lineStyle: {
  68. width: 5
  69. }
  70. }
  71. }
  72. }
  73. }
  74. var t = null;
  75. t = setTimeout(time, 1000);
  76. function time() {
  77. clearTimeout(t);
  78. dt = new Date();
  79. var y = dt.getFullYear();
  80. var mt = dt.getMonth() + 1;
  81. var day = dt.getDate();
  82. var h = dt.getHours();
  83. var m = dt.getMinutes();
  84. var s = dt.getSeconds();
  85. document.getElementById("showTime").innerHTML = y + "年" + mt + "月" + day + "-" + h + "时" + m + "分" + s + "秒";
  86. t = setTimeout(time, 1000);
  87. }