(function () {
'use strict';
var myChart = echarts.init(document.getElementById('data-content-line'));
var option = {
xAxis: {
type: 'category',
data: ['2010.03.01', '2010.03.01', '2010.03.01', '2010.03.01', '2010.03.01', '2010.03.01', '2010.03.01','2010.03.01','2010.03.01','2010.03.01','2010.03.01','2010.03.01'],
axisLabel: {
rotate: 40,
fontSize: 10
},
axisLine: {
lineStyle: {
color: '#fff'
}
},
axisTick:{
inside:true
}
},
yAxis: {
type: 'value',
axisLine: {
lineStyle: {
color: '#fff'
}
},
name:'℃',
nameTextStyle:{
color:'#52d2ff',
fontSize:20
},
scale:true,
axisTick:{
inside:true
}
},
series: [{
data: [27.5, 30, 32.5, 26, 25, 30,26.5, 30.5, 26.8, 35, 29.7, 30],
type: 'line',
smooth: true,
lineStyle:{
color:'#4ab188',
},
areaStyle:{
color:{
x: 0,
y: 0,
x2:0,
y2: 1,
colorStops: [{
offset: 0, color: '#4ab188'
}, {
offset: 0.5, color: '#085099'
}, {
offset: 1, color: 'rgba(8,80,153,0.05)'
}],
global: false
}
},
itemStyle:{
color:'#4ab188'
}
}]
};
myChart.setOption(option);
window.addEventListener('resize', function () {
myChart.resize();
})
})()