信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. import ChartDigit11 from '../../../src/chart/digit/ChartDigit11/ChartDigit11.js';
  2. let chart=new ChartDigit11(document.getElementsByClassName('c1')[0],{});
  3. window.addEventListener('resize',()=>{
  4. chart.resize();
  5. });
  6. let option = {
  7. title:{},
  8. bg:{
  9. backgroundColor:"#000000"
  10. },
  11. grid:{
  12. left: "10%",
  13. right: "10%",
  14. top: "5%",
  15. bottom: "5%"
  16. },
  17. shape:{
  18. dis: 30, //风车距离
  19. box:{
  20. height: 70,
  21. margin: 20, //box间隙
  22. boxPadding: 10,//box内边距
  23. },
  24. title:{
  25. color: '#bdbdbd',
  26. fontSize: 14,
  27. fontWeight: 'normal',
  28. },
  29. content:{
  30. color: '#4e4e4e',
  31. fontSize: 14,
  32. fontWeight: 'normal',
  33. },
  34. splitLine:{
  35. color: '#4d4d4d',
  36. width: 2
  37. },
  38. line:{ //上下边线
  39. color: '#616161',
  40. width: 2
  41. },
  42. fontStyle:{
  43. color: '#ffffff',
  44. fontSize: 12,
  45. fontWeight: 'normal',
  46. }
  47. },
  48. series: [{
  49. date: '2013',
  50. title:'万博思图',
  51. content: '万博思图作为数据可视化。。。'
  52. },
  53. {
  54. date: '2014',
  55. title:'万博思图',
  56. content: '万博思图作为数据可视化。。。'
  57. },
  58. {
  59. date: '2015',
  60. title:'万博思图',
  61. content: '万博思图作为数据可视化。。。'
  62. },
  63. {
  64. date: '2016',
  65. title:'万博思图',
  66. content: '万博思图作为数据可视化。。。'
  67. }
  68. ],
  69. color: ['#9a37da','#3c8bef','#3cefe4','#3cef9d','#eec933','#d97b36','#ff4e4e']
  70. };
  71. let option2 = {
  72. title:{},
  73. bg:{
  74. backgroundColor:"#000000"
  75. },
  76. grid:{
  77. left: "10%",
  78. right: "10%",
  79. top: "5%",
  80. bottom: "5%"
  81. },
  82. shape:{
  83. dis: 30, //风车距离
  84. box:{
  85. height: 70,
  86. margin: 20, //box间隙
  87. boxPadding: 10,//box内边距
  88. },
  89. title:{
  90. color: '#bdbdbd',
  91. fontSize: 14,
  92. fontWeight: 'normal',
  93. },
  94. content:{
  95. color: '#4e4e4e',
  96. fontSize: 14,
  97. fontWeight: 'normal',
  98. },
  99. splitLine:{
  100. color: '#4d4d4d',
  101. width: 2
  102. },
  103. line:{ //上下边线
  104. color: '#616161',
  105. width: 2
  106. },
  107. fontStyle:{
  108. color: '#ffffff',
  109. fontSize: 12,
  110. fontWeight: 'normal',
  111. }
  112. },
  113. series: [{
  114. date: '2013',
  115. title:'万博思图',
  116. content: '万博思图作为数据可视化。。。'
  117. },
  118. {
  119. date: '2014',
  120. title:'万博思图',
  121. content: '万博思图作为数据可视化。。。'
  122. },
  123. {
  124. date: '2015',
  125. title:'万博思图',
  126. content: '万博思图作为数据可视化。。。'
  127. },
  128. {
  129. date: '2016',
  130. title:'万博思图',
  131. content: '万博思图作为数据可视化。。。'
  132. },
  133. {
  134. date: '2017',
  135. title:'万博思图',
  136. content: '万博思图作为数据可视化。。。'
  137. },
  138. {
  139. date: '2018',
  140. title:'万博思图',
  141. content: '万博思图作为数据可视化。。。'
  142. },
  143. {
  144. date: '2019',
  145. title:'万博思图',
  146. content: '万博思图作为数据可视化。。。'
  147. },
  148. {
  149. date: '2014',
  150. title:'万博思图',
  151. content: '万博思图作为数据可视化。。。'
  152. },
  153. {
  154. date: '2015',
  155. title:'万博思图',
  156. content: '万博思图作为数据可视化。。。'
  157. },
  158. {
  159. date: '2016',
  160. title:'万博思图',
  161. content: '万博思图作为数据可视化。。。'
  162. },
  163. {
  164. date: '2017',
  165. title:'万博思图',
  166. content: '万博思图作为数据可视化。。。'
  167. },
  168. ],
  169. color: ['#9a37da','#3c8bef','#3cefe4','#3cef9d','#eec933','#d97b36','#ff4e4e']
  170. };
  171. setTimeout(() => {
  172. chart.setOption(option)
  173. }, 2000);
  174. setTimeout(() => {
  175. chart.setOption(option2)
  176. }, 4000);