import Chart from "../../../src/chart/line/ChartLine10/ChartLine10";
import Title from "../../../src/chart/commonOptions/title";
import Grid from "../../../src/chart/commonOptions/grid";
// import bar15 from "./ChartBar15_1eba2";

const consoleWarn = window.console.warn;
window.console.warn = function() {
    const string = arguments[0];
    const filterStrings = [
        'is not power of two',
        'image is too big',
        'marked for update',
        'can\'t invert matrix'
    ];
    // filter warnings containing above strings
    const shouldBeFiltered = filterStrings.some(string => (
        arguments[0].includes('THREE') && arguments[0].includes(string)
    ));
    if (shouldBeFiltered) {
        // console.log("find",arguments[0])

        // log it to console without second argument, which contains reference to `image`
        // consoleWarn.call(null, arguments[0]);
    } else {
        // pass other warnings without changes
        consoleWarn.apply(null, arguments);
    }
};
// let bar =new bar15(document.querySelector(".c1"),{})
let line=new Chart(document.querySelector(".c1"),{});

window.addEventListener("resize",function () {
    // console.log("???")
    line.resize()
})
// setTimeout(()=>{
//
//     line.setOption( {
//         color: ['#c6b146', '#ffffff', '#4169e1', '#ffc000', '#0000ff', '#ff7200', '#00ffff', '#ffe79e'],
//         title: Title.option(''),
//         bg: {
//             backgroundColor: '#2b2729'
//         },
//         grid: Grid.option,
//         tooltip: {
//             bgStyle: {
//                 backgroundColor: '#080404',
//                 // borderColor:'#ffffff',
//                 // borderWidth:1,
//             },
//             offsetX: 30,
//             angleR: 5
//             // nameColor:'#ffda2a',
//             // valueColor:'#ffda2a'
//         },
//         legend: {
//             itemHeight: 10,
//             itemWidth: 10,
//             itemAngelR: 20,
//             left: '22%',
//             top: '8%'
//         },
//         xAxis: {
//             type: "category",
// //		title: '日期',
//             nameTextStyle: {
//                 fontSize: 12,
//                 color: '#cccccc',
//             },
//             namePosition: 'end',
//             data: ["一月", "二月", "三月", "四月", "五月"],
//             boundaryGap: false,
//             //		scale: true,
//             axisLine: {
//                 show: true,
//                 lineStyle: {
//                     color: 'rgba(255,255,255,0.5)',
//                     width: 4,
//                     type: 'solid'
//                 }
//             },
//             axisTick: {
//                 show: true,
//                 alignWithLabel: true,
//                 length: 2,
//                 lineStyle: {
//                     width: 1,
//                     color: '#fffe00'
//                 }
//             },
//             // splitLine: {
//             //     show: true,
//             //     lineStyle: {
//             //         color: 'rgba(255,255,255,0.3)',
//             //         width: 1,
//             //         type: 'solid'
//             //     }
//             // },
//             axisLabel: {
//                 show: true,
//                 textStyle: {
//                     color: '#857c59',
//                     textRotation: 0
//                 }
//             }
//         },
//         yAxis: {
//             type: 'value',
//             title: '单位',
//             nameTextStyle: {
//                 fontSize: 12,
//                 color: '#777777',
//             },
//             namePosition: 'end',
//             scale: true,
//             axisLine: {
//                 show: false,
//                 lineStyle: {
//                     color: '#234e82',
//                     width: 2,
//                     type: 'solid'
//                 }
//             },
//             axisTick: {
//                 show: false,
//                 alignWithLabel: false,
//                 length: 2,
//                 lineStyle: {
//                     width: 1,
//                     color: '#fffe00'
//                 }
//             },
//             splitLine: {
//                 show: false,
//                 lineStyle: {
//                     color: '#293f5f',
//                     width: 1,
//                     type: 'solid'
//                 }
//             },
//
//             axisLabel: {
//                 show: true,
//                 textStyle: {
//                     color: '#777777'
//                 }
//             }
//
//         },
//         shape: {
//             label: {
//                 show: false,
//                 textStyle: {
//                     fontSize: 12,
//                     fontWeight: 'normal',
//                     color: ''
//                 }
//             },
//
//             lineStyle: {
//                 width: 2,
//                 smooth: 0.3,
//
//             },
//             lineShadow: {
//                 shadowColor: '#000000',
//                 shadowOffsetX: 0,
//                 shadowOffsetY: 0,
//                 shadowBlur: 0
//             },
//             iconType: 'circle',
//             circleSize: 5,
//         },
//         series: [
//             {
//                 name: '类别1',
//                 data: [0,0,0,0,0],
//             }, {
//                 name: '类别2',
//
//                 data:[0,0,0,0,0],
//             }
//         ]
//     })
// },3000);