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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. import Chart from "../../../src/chart/bar/ChartBar15/ChartBar15";
  2. // import bar15 from "./ChartBar15_1eba2";
  3. const consoleWarn = window.console.warn;
  4. window.console.warn = function() {
  5. const string = arguments[0];
  6. const filterStrings = [
  7. 'is not power of two',
  8. 'image is too big',
  9. 'marked for update',
  10. 'can\'t invert matrix'
  11. ];
  12. // filter warnings containing above strings
  13. const shouldBeFiltered = filterStrings.some(string => (
  14. arguments[0].includes('THREE') && arguments[0].includes(string)
  15. ));
  16. if (shouldBeFiltered) {
  17. // console.log("find",arguments[0])
  18. // log it to console without second argument, which contains reference to `image`
  19. // consoleWarn.call(null, arguments[0]);
  20. } else {
  21. // pass other warnings without changes
  22. consoleWarn.apply(null, arguments);
  23. }
  24. };
  25. // let bar =new bar15(document.querySelector(".c1"),{})
  26. let bar=new Chart(document.querySelector(".c1"),{});
  27. console.log(1111,bar)
  28. window.addEventListener("resize",function () {
  29. // console.log("???")
  30. bar.resize()
  31. })
  32. // let p;
  33. // setTimeout(()=>{
  34. // bar.setOption({
  35. // color: ['#0a73dc', '#04a2ae', '#424a95', '#2a7ebe', '#113b85', '#a2f9ff', '#01a0c8', '#5879c0', '#74e9f2', '#126087', '#99b5da'],
  36. // bg: {
  37. // backgroundColor: "#000000",
  38. // showBgPlane:true,
  39. // bgPlaneColor:'#ffffff',
  40. // borderColor:'#0000ff'
  41. // },
  42. // legend: {
  43. // show: true,
  44. // left: "70%",
  45. // top: '5%',
  46. // orient: 'horizontal',
  47. // itemWidth: 8,
  48. // itemHeight: 8,
  49. // borderRadius: 0,
  50. // textStyle: {
  51. // fontSize: 14,
  52. // color: "#ffffff"
  53. // }
  54. // },
  55. // tooltip: {
  56. // show: true,
  57. // paddingW:10,
  58. // paddingH: 10,
  59. // itemGap: 2,
  60. // //距目标的偏移值
  61. // offsetX: 15,
  62. // offsetY: 0,
  63. // titleFontSize:14,
  64. // titleColor: '#ff0000',
  65. // itemFontSize:12,
  66. // itemColor:"#ffffff",
  67. // borderColor: '#ccc',
  68. // borderWidth: 0,
  69. // backgroundColor: 'rgba(255,255,255,0)',
  70. //
  71. // },
  72. // grid: {
  73. // left: "40%",
  74. // right: "30",
  75. // top: "30%",
  76. // bottom: "40%"
  77. // },
  78. // valueAxis: {
  79. // textStyle: {
  80. // fontSize: 12,
  81. // color: "#ffffff",
  82. // shadowBlur: 10,
  83. // shadowColor: "#ffff00"
  84. // }
  85. // },
  86. // categoryAxis: {
  87. // textStyle: {
  88. // fontSize: 14,
  89. // color: "#ffffff",
  90. // shadowBlur: 0,
  91. // shadowColor: "#ffffff"
  92. // },
  93. // data: ["小米", "华为", "苹果", "三星"]
  94. // },
  95. // series: [{
  96. // name: "一季度销量",
  97. // data: [639539, 548671, 457822, 223133]
  98. // },
  99. // {
  100. // name: "二季度销量",
  101. // data: [581244, 563334, 512544, 496554]
  102. // }
  103. // ]
  104. // })
  105. // },4000);
  106. //
  107. // setTimeout(()=>{
  108. // bar.setCameraPosition(p);
  109. // },4000);