echart 多Y轴显示

https://my.oschina.net/wangmengjun/bl

option = {
    tooltip:{
		trigger : 'axis'
	},
	grid : {
		right : '20%'
	},
	toolbox : {
		feature : {
			dataView : {
				show : false,
				readOnly : false
			},
			restore : {
				show : false
			},
			saveAsImage : {
				show : false
			}
		}
	},
    legend:{
		data : [ '设备新增数量','产品新增数量' ]
	},
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis:[
        {
				type : 'value',
				name : '设备新增数量',
				min : 0,
				max : 2000,
				position : 'left',
				axisLine : {
					lineStyle : {}
				},
				axisLabel : {
					formatter : '{value}'
				}
			}, {
				type : 'value',
				name : '产品新增数量',
				min : 0,
				max : 600,
				position : 'right',
				show:false,
				axisLine : {
					lineStyle : {}
				},
				axisLabel : {
					formatter : '{value}'
				}
			}    
    ],
    series: [{
        name : '设备新增数量',
        data: [820, 332, 901, 934, 1290, 1330, 1320],
        type: 'line',
        // smooth: true,
        showSymbol: false,
    },
    {
        name : '产品新增数量',
        data: [15, 37, 39, 57, 123, 170, 199],
        type: 'line',
        yAxisIndex : 1,
        // smooth: true,
        showSymbol: false,
    }
    ]
};

  

og/909546

posted @ 2021-02-23 11:06  几许风雨  阅读(509)  评论(0)    收藏  举报