信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

index.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import Chart from "../../../src/chart/bar/ChartBar16/ChartBar16";
  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. //
  34. // setTimeout(()=>{
  35. // bar.setCameraPosition(p);
  36. // },4000);