信通院-灾备 图表源码(在产品图表库基础上进行修改),开发逻辑和产品图表库一致
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.js 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. import Chart from "../../../src/chart/funnel/ChartFunnel2/ChartFunnel2";
  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. window.addEventListener("resize",function () {
  28. // console.log("???")
  29. bar.resize()
  30. });
  31. // setTimeout(()=>{
  32. // bar.setOption({
  33. // color: ['#0a73dc', '#04a2ae', '#424a95', '#2a7ebe', '#113b85', '#a2f9ff', '#01a0c8', '#5879c0', '#74e9f2', '#126087', '#99b5da'],
  34. // bg: {
  35. // backgroundColor: "#000000",
  36. // showBgPlane:true,
  37. // bgPlaneColor:'#ffffff',
  38. // borderColor:'#0000ff'
  39. // },
  40. // legend: {
  41. // show: true,
  42. // left: "80%",
  43. // top: '20%',
  44. // orient: 'vertical',
  45. // itemWidth: 8,
  46. // itemHeight: 8,
  47. // borderRadius: 0,
  48. // textStyle: {
  49. // fontSize: 14,
  50. // color: "#ffffff"
  51. // }
  52. // },
  53. // tooltip: {
  54. // show: true,
  55. // paddingW:12,
  56. // paddingH: 5,
  57. // itemGap: 2,
  58. // //距目标的偏移值
  59. // offsetX: 15,
  60. // offsetY: 0,
  61. // titleFontSize:16,
  62. // titleColor: '#ffffff',
  63. // itemFontSize:12,
  64. // itemColor:"#ffffff",
  65. // borderColor: '#fea511',
  66. // borderWidth: 1,
  67. // backgroundColor: 'rgba(0,0,0,0.2)',
  68. //
  69. // },
  70. // grid: {
  71. // left: "20%",
  72. // right: "30%",
  73. // top: "20%",
  74. // bottom: "20%"
  75. // },
  76. // funnel: {
  77. // left: '25%',
  78. // top: '10%',
  79. // width: '60%',
  80. // minSize: '0%',
  81. // maxSize: '100%',
  82. // sort: 'descending',
  83. // gap: 3,
  84. // changePercent:{
  85. // show:true,
  86. // lineColor:'#666666',
  87. // fontSize: 14,
  88. // textColor: '#eeeeee'
  89. // },
  90. // shape: {
  91. // faceColor:"#ffffff"
  92. //
  93. // }
  94. // },
  95. // // calculable: true,
  96. // series: [{
  97. // value: 60,
  98. // name: '访问'
  99. // }, {
  100. // value: 40,
  101. // name: '咨询'
  102. // }, {
  103. // value: 20,
  104. // name: '订单'
  105. // }, {
  106. // value: 80,
  107. // name: '点击'
  108. // }, {
  109. // value: 100,
  110. // name: '展现'
  111. // }]
  112. // })
  113. // },3000)