信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. import ChartBar from '../../../src/chart/bar/ChartBar44/ChartBar44';
  2. import Title from "../../../src/chart/commonOptions/title";
  3. import Grid from "../../../src/chart/commonOptions/grid";
  4. import Legend from "../../../src/chart/commonOptions/legend";
  5. import Animation from "../../../src/chart/commonOptions/animation";
  6. let bar = new ChartBar(document.getElementsByClassName('c1')[0], {});
  7. window.addEventListener('resize', () => {
  8. bar.resize();
  9. });
  10. setTimeout(()=>{
  11. // bar.setOption(opt);
  12. },5000)
  13. let opt = {
  14. color: ["#ff0000", "#66ffff"],
  15. bg: {
  16. backgroundColor: '#161729'
  17. },
  18. grid: {
  19. left:'12%',
  20. top:'15%',
  21. right:'0%',
  22. bottom:'18%',
  23. containLabel: false
  24. },
  25. animation: Animation.option,
  26. tooltip: {
  27. bgStyle: {
  28. backgroundColor: '#ffff00',
  29. bgbor:"#ff7e00"
  30. },
  31. angleR: 0,
  32. dangerline: {
  33. show: false,
  34. dangerData: 2560000,
  35. color: '#f5196a'
  36. },
  37. tooltipText:{
  38. titleStyle:{
  39. fontSize:12
  40. },
  41. contentStyle:{
  42. fontSize:14
  43. },
  44. },
  45. titleColor:'#ffffff',
  46. contentColor:'#ffffff',
  47. titShowtxt:"分布数量"
  48. },
  49. legend: {
  50. show:false,
  51. left: "45%",
  52. top: '6%',
  53. itemHeight: 12,
  54. itemWidth: 12,
  55. itemAngelR: 20,
  56. textStyle: {
  57. fontSize: 16,
  58. color: '#50a7bd'
  59. }
  60. },
  61. xAxis: {
  62. type: "category",
  63. name: '年份',
  64. nameTextStyle: {
  65. fontSize: 12,
  66. color: '#cccccc',
  67. },
  68. namePosition: 'end',
  69. axisLine: {
  70. show: true,
  71. lineStyle: {
  72. color: 'rgba(90,142,207,0.4)',
  73. width: 1,
  74. type: 'solid'
  75. }
  76. },
  77. axisTick: {
  78. show: true,
  79. alignWithLabel: true,
  80. lineStyle: {
  81. color: '#fff',
  82. width: 1
  83. },
  84. length: 1
  85. },
  86. splitLine: {
  87. show: false,
  88. },
  89. axisLabel: {
  90. show: true,
  91. textStyle: {
  92. color: '#92a3c2'
  93. }
  94. },
  95. highLightColor: '#005eb8',
  96. data: [2008, 2009, 2010, 2011, 2012],
  97. },
  98. yAxis: {
  99. type: 'value',
  100. title: '',
  101. nameTextStyle: {
  102. color: '#66ffff',
  103. fontSize: 14
  104. },
  105. axisLine: {
  106. show: true,
  107. lineStyle: {
  108. color: 'rgba(90,142,207,0.4)',
  109. width: 1,
  110. type: 'solid'
  111. }
  112. },
  113. axisTick: {
  114. show: true,
  115. lineStyle: {
  116. color: '#fff',
  117. width: 1
  118. },
  119. length: 1,
  120. alignWithLabel: true
  121. },
  122. splitLine: {
  123. show: true,
  124. lineStyle: {
  125. color: 'rgba(90,142,207,0.4)',
  126. width: 1,
  127. type: 'solid'
  128. }
  129. },
  130. axisLabel: {
  131. textStyle: {
  132. color: '#92a3c2'
  133. }
  134. },
  135. },
  136. shape:{
  137. barGap: '50%',
  138. barCategoryGap: '50%',
  139. label: {
  140. textStyle: {
  141. fontSize: 10,
  142. fontWeight: 'normal',
  143. color: '#fff'
  144. }
  145. },
  146. hoverColor: '#FF7E00',
  147. },
  148. series: [{
  149. name: '行业1',
  150. data: [91,84, 60, 40, 21]
  151. }
  152. ]
  153. };