showLineA(canvasId) {
canvasObj[canvasId] = new uCharts({
$this: _self,
canvasId: canvasId,
type: 'area',
fontSize: 11,
padding:[15,15,0,15],
legend:{
show:false,
padding:5,
lineHeight:11,
margin:5,
},
dataLabel: false,
dataPointShape: false,
background: '#FFFFFF',
pixelRatio: _self.pixelRatio,
categories: ['2012', '2013', '2014', '2015', '2016', '2017'],
series: [{
name: '成交量A',
data: [100, 80, 95, 150, 112, 132],
color: '#298AFB',
index:1,
},{
name: '成交量b',
data: [ 132, 112, 150, 95, 80,101],
color: '#ff0000',
index:0,
}],
animation: true,
enableScroll: true, //开启图表拖拽功能
xAxis: {
disableGrid: false,
type: 'grid',
gridType: 'dash',
itemCount: 5,
scrollShow: true,
scrollAlign: 'right',
boundaryGap:'justify',
//scrollBackgroundColor:'#F7F7FF',//可不填写,配合enableScroll图表拖拽功能使用,X轴滚动条背景颜色,默认为 #EFEBEF
//scrollColor:'#DEE7F7',//可不填写,配合enableScroll图表拖拽功能使用,X轴滚动条颜色,默认为 #A6A6A6
},
yAxis: {
//disabled:true
gridType: 'dash',
splitNumber: 8,
min: 10,
max: 180,
data:[{
position: 'left'
}, {
position: 'right'
}],
format: (val) => {
return val.toFixed(0) + '元'
} //如不写此方法,Y轴刻度默认保留两位小数
},
width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio,
extra: {
area:{
opacity:0.2,
addLine:true,
width:1,
gradient:true
}
},
});
},