信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import ChartBar from '../../../src/chart/bar/ChartBar46/ChartBar46';
  2. import ToolTip from "../../../src/chart/commonOptions/tooltip";
  3. let bar = new ChartBar(document.getElementsByClassName('c1')[0], {});
  4. let option = {
  5. color: ['#61dfff','#142D33'],
  6. bg:{
  7. backgroundColor:'#000713'
  8. },
  9. tooltip: ToolTip.option,
  10. grid: {
  11. left:'18%',
  12. top:'20%',
  13. right:'18%',
  14. bottom:'18%',
  15. containLabel: false
  16. },
  17. shape:{
  18. maxNum:150,
  19. borderColor: '#1d4970',
  20. itemHeight: 10,
  21. smallRectColor: '#9ac6fa',
  22. textBorderColor:'#4d6e95',
  23. borderLineColor:'#61dfff',
  24. textLeft:{
  25. color: '#d6deff',
  26. fontSize: 12
  27. },
  28. title:{
  29. color: '#61dfff',
  30. fontSize: 16
  31. }
  32. },
  33. series: [
  34. {
  35. data:[
  36. {name:"市司法局",value:90},
  37. {name:"市审视局",value:120},
  38. {name:"市人防办",value:80},
  39. {name:"市档案馆",value:48},
  40. // {name:"市水务局",value:20}
  41. ]
  42. }
  43. ]
  44. };
  45. // bar.setOption(data)
  46. // window.addEventListener('resize', () => {
  47. // bar.resize();
  48. // });
  49. let dom2 = document.getElementsByClassName('c2')[0];
  50. // dom2.onclick=e=>{
  51. // console.log(222)
  52. // bar.resize();
  53. // }
  54. setTimeout(()=>{
  55. // console.log(555);
  56. // bar.setOption(option)
  57. },5000)