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

index.js 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import Chart from "../../../src/chart/line/ChartLine9/ChartLine9";
  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 line=new Chart(document.querySelector(".c1"),{});
  27. window.addEventListener("resize",function () {
  28. // console.log("???")
  29. line.resize()
  30. })
  31. // setTimeout(()=>{
  32. // line.setOption({
  33. // color: ['#0a73dc', '#04a2ae', '#424a95', '#2a7ebe', '#113b85', '#a2f9ff', '#01a0c8', '#5879c0', '#74e9f2', '#126087', '#99b5da'],
  34. // bg: {
  35. // backgroundColor: "#000000"
  36. // },
  37. // legend: {
  38. // show: true,
  39. // left: "70%",
  40. // top: '5%',
  41. // orient: 'horizontal',
  42. // itemWidth: 8,
  43. // itemHeight: 8,
  44. // borderRadius: 0,
  45. // textStyle: {
  46. // fontSize: 14,
  47. // color: "#ffffff"
  48. // }
  49. // },
  50. // tooltip: {
  51. // show: true,
  52. // paddingW: 10,
  53. // paddingH: 10,
  54. // itemGap: 2,
  55. // //距目标的偏移值
  56. // offsetX: 15,
  57. // offsetY: 0,
  58. // titleFontSize: 14,
  59. // titleColor: '#ffff00',
  60. // itemFontSize: 12,
  61. // itemColor: "#ffffff",
  62. // borderColor: '#cccccc',
  63. // borderWidth: 1,
  64. // backgroundColor: 'rgba(0,0,0,0.4)',
  65. // },
  66. // grid: {
  67. // left: "30%",
  68. // right: "20",
  69. // top: "30%",
  70. // bottom: "20%"
  71. // },
  72. // yAxis: {
  73. // type:"value",
  74. // splitNumber:5,
  75. // textStyle: {
  76. // fontSize: 12,
  77. // color: "#ffffff",
  78. // shadowBlur: 0,
  79. // shadowColor: "#ffffff"
  80. // }
  81. // },
  82. // xAxis: {
  83. // type:"category",
  84. // textStyle: {
  85. // fontSize: 14,
  86. // color: "#ffffff",
  87. // shadowBlur: 0,
  88. // shadowColor: "#ffffff"
  89. // },
  90. // data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"],
  91. // },
  92. // series: [{
  93. // name: '一期销量',
  94. // data: [20, 20, 36, 10, 10, 40]
  95. // },
  96. // {
  97. // name: '二期销量',
  98. // data: [14, 10, 26, 20, 30, 30]
  99. // },
  100. // {
  101. // name: '三期销量',
  102. // data: [15, 20, 15, 10, 10, 20]
  103. // }
  104. // ],
  105. // })
  106. // },3000);