信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

index.js 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. import ChartBar from '../../../src/chart/bar/ChartBar38/ChartBar38.js';
  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. let bar = new ChartBar(document.getElementsByClassName('c1')[0], {});
  6. window.addEventListener('resize', () => {
  7. bar.resize();
  8. });
  9. // setTimeout(()=>{
  10. // console.log(3000);
  11. // bar.setOption(defaultOption);
  12. // },3000)
  13. // const defaultOption = {
  14. // type: "p1",
  15. // title:Title.option(''),
  16. // grid:Grid.option,
  17. // tooltip: {
  18. // textColor:'#ffba00',
  19. // bgStyle:{
  20. // backgroundColor:'rgba(6,27,58,0.9)',
  21. // borderColor:'#00aeff',
  22. // borderWidth:1
  23. // },
  24. // offsetX: 30,
  25. // offsetY: 0
  26. // },
  27. // legend: Legend.option,
  28. // bg:{
  29. // backgroundColor:'#000713'
  30. // },
  31. // color: ['#009533' , '#00deff', '#dceeff', '#00aeff'],
  32. // xAxis: {
  33. // type: "category",
  34. // title:'年份',
  35. // axisTick: {
  36. // show:false,
  37. // alignWithLabel: false,
  38. // interval: 'auto',
  39. // lineStyle:{
  40. // color: '#00eaff',
  41. // width: 1
  42. // },
  43. // length:5
  44. // },
  45. // axisLine:{
  46. // show:true,
  47. // lineStyle:{
  48. // color:'#0081ff',
  49. // width:2,
  50. // }
  51. // },
  52. // axisLabel:{
  53. // show:true,
  54. // textStyle:{
  55. // color:'#567ab4'
  56. // }
  57. // },
  58. // splitLine:{
  59. // show:false,
  60. // lineStyle:{
  61. // color:'#0081ff',
  62. // width:1,
  63. // }
  64. // },
  65. // data: ['1h', '2h', '3h', '4h', '5h', '6h', '7h', '8h', '9h', '10h'],
  66. // },
  67. // yAxis: {
  68. // type: 'value',
  69. // title:'预计到达货量',
  70. // title2:'',
  71. // nameTextStyle: {
  72. // fontSize: 30,
  73. // color: '#88c5ff',
  74. // },
  75. // axisLabel:{
  76. // // textAlign:'left'
  77. // textStyle:{
  78. // color:'#567ab4',
  79. // textRotation1:0,//第二y轴文字旋转
  80. // }
  81. // },
  82. // axisLine:{
  83. // show:true,
  84. // lineStyle:{
  85. // color:'#0081ff',
  86. // width:1,
  87. // }
  88. // },
  89. // splitLine:{
  90. // show:false,
  91. // lineStyle:{
  92. // color:'#0081ff',
  93. // width:1,
  94. // }
  95. // },
  96. // axisTick: {
  97. // show:true,
  98. // alignWithLabel: true,
  99. // lineStyle:{
  100. // color: '#00eaff',
  101. // width: 1
  102. // },
  103. // interval: 'auto'
  104. // },
  105. // },
  106. // shape:{
  107. // barGap: '30%',
  108. // barCategoryGap: '40%',
  109. // lineStyle:{
  110. // width:2,
  111. // smooth: 0.3,
  112. // },
  113. // bgRect:{
  114. // lineColor: '#25282B',
  115. // color: '#000713',
  116. // hoverColor: '#ffba00'
  117. // }
  118. // },
  119. // series: [{
  120. // name: '预测货量',
  121. // type:'bar',
  122. // data: [20,900,300,450,470,310,270,580,710,650],
  123. // },
  124. // {
  125. // name: '实际货量',
  126. // type: 'bar',
  127. // data: [220,300,250,220,362,270,180,490,660,750]
  128. // },
  129. // {
  130. // name:'预测累计',
  131. // type:'line',
  132. // data:[800,600,400,380,220,180,360,290,480,770]
  133. // },
  134. // {
  135. // name:'实际累计',
  136. // type:'line',
  137. // data:[750,650,450,400,320,660,480,310,580,710],
  138. // },
  139. // ]
  140. // };