信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import ChartDigit14 from '../../../src/chart/digit/ChartDigit14/ChartDigit14.js';
  2. let chart=new ChartDigit14(document.getElementsByClassName('c1')[0],{});
  3. window.addEventListener('resize',()=>{
  4. chart.resize();
  5. });
  6. window.addEventListener('elementClick', (a, b) => {
  7. console.log('触发', a.detail)
  8. });
  9. let option = {
  10. title:{},
  11. bg:{
  12. backgroundColor:"#000"
  13. },
  14. grid:{
  15. left: "30%",
  16. right: "20%",
  17. top: "45%",
  18. bottom: "50%"
  19. },
  20. tooltip: {
  21. bgStyle: {
  22. backgroundColor: '#00deff',
  23. textColor: '#fff',
  24. },
  25. },
  26. shape:{
  27. timeRange:{
  28. start:'2001',
  29. end: '2015',
  30. },
  31. num: 7,
  32. splitLine:{
  33. color1: '#00deff',
  34. color2: '#00deff',
  35. color3: '#fff',
  36. width: 1
  37. },
  38. slider:{
  39. color: '#00deff',
  40. fillColor:'rgba(0,222,255,0.2)',
  41. width: 1
  42. },
  43. label:{
  44. color: '#ffffff',
  45. fontSize: 14,
  46. fontWeight: 'normal',
  47. },
  48. input:{
  49. top: '10%', //修改百分比
  50. left: '10%',
  51. width: 65,
  52. height: 20,
  53. fontSize: 14,
  54. color: '#00deff',
  55. outlineColor: '#00deff'
  56. }
  57. },
  58. // series: [2001,2020],
  59. color: ['#9a37da','#3c8bef','#3cefe4','#3cef9d','#eec933','#d97b36','#ff4e4e']
  60. };
  61. // setTimeout(() => {
  62. // chart.setOption(option)
  63. // }, 2000);