import ChartBar from '../../../src/chart/bar/ChartBar38/ChartBar38.js';
import Title from "../../../src/chart/commonOptions/title";
import Grid from "../../../src/chart/commonOptions/grid";
import Legend from "../../../src/chart/commonOptions/legend";

let bar = new ChartBar(document.getElementsByClassName('c1')[0], {});
window.addEventListener('resize', () => {
    bar.resize();
});

// setTimeout(()=>{
//     console.log(3000);
//     bar.setOption(defaultOption);
// },3000)

// const defaultOption = {
// 	type: "p1",
// 	title:Title.option(''),
// 	grid:Grid.option,
// 	tooltip: {
// 		textColor:'#ffba00',
// 		bgStyle:{
// 			backgroundColor:'rgba(6,27,58,0.9)',
// 			borderColor:'#00aeff',
// 			borderWidth:1
// 		},
// 		offsetX: 30,
// 		offsetY: 0
// 	},
// 	legend: Legend.option,
//     bg:{
//         backgroundColor:'#000713'
//     },
//     color: ['#009533' , '#00deff', '#dceeff', '#00aeff'],
// 	xAxis: {
// 		type: "category",
// 		title:'年份',
// 		axisTick: {
//         	show:false,
//             alignWithLabel: false,
// 			interval: 'auto',
// 			lineStyle:{
// 				color: '#00eaff',
// 				width: 1
// 			},
//             length:5
//         },
//         axisLine:{
//         	show:true,
//         	lineStyle:{
//         		color:'#0081ff',
//         		width:2,
//         	}
//         },
//         axisLabel:{
//      		show:true,
// 			textStyle:{
// 				color:'#567ab4'
// 			}
//         },
//         splitLine:{
//         	show:false,
//         	lineStyle:{
//         		color:'#0081ff',
// 				width:1,
//         	}
//         },
// 		data: ['1h', '2h', '3h', '4h', '5h', '6h', '7h', '8h', '9h', '10h'],
// 	},
// 	yAxis: {
// 		type: 'value',
// 		title:'预计到达货量',
// 		title2:'',
// 		nameTextStyle: {
// 			fontSize: 30,
// 			color: '#88c5ff',
// 		},
// 		axisLabel:{
// //			textAlign:'left'
// 			textStyle:{
// 				color:'#567ab4',
// 				textRotation1:0,//第二y轴文字旋转
// 			}
// 		},
// 		axisLine:{
//         	show:true,
//         	lineStyle:{
//         		color:'#0081ff',
//         		width:1,
//         	}
//         },
//         splitLine:{
//         	show:false,
//         	lineStyle:{
//         		color:'#0081ff',
// 				width:1,
//         	}
//         },
//         axisTick: {
//         	show:true,
// 			alignWithLabel: true,
// 			lineStyle:{
// 				color: '#00eaff',
// 				width: 1
// 			},
//             interval: 'auto'
//         },
// 	},
// 	shape:{
//         barGap: '30%',
// 		barCategoryGap: '40%',
//         lineStyle:{
//             width:2,
//             smooth: 0.3,
// 		},
// 		bgRect:{
// 			lineColor: '#25282B',
// 			color: '#000713',
// 			hoverColor: '#ffba00'
// 		}
// 	},
// 	series: [{
// 			name: '预测货量',
// 			type:'bar',
// 			data: [20,900,300,450,470,310,270,580,710,650],
// 		},
// 		{
// 			name: '实际货量',
// 			type: 'bar',
// 			data: [220,300,250,220,362,270,180,490,660,750]
// 		},
// 		{
// 			name:'预测累计',
// 			type:'line',
// 			data:[800,600,400,380,220,180,360,290,480,770]
// 		},
// 		{
// 			name:'实际累计',
// 			type:'line',
//             data:[750,650,450,400,320,660,480,310,580,710],
//         },

// 	]
// };