option[8] = {ide
// Make gradient line here visualMap: [{ show: false, type: 'continuous', seriesIndex: 0, dimension: 0, min: 0, max: xData.length - 1 }], title: [{ top: '', left: 'center', text: param.title }], dataZoom: [ // 主要是這一部分,他是折線圖的縮放功能的開啓 { startValue:startValue, // 起始位置 }, { type: 'inside', } ], tooltip: { trigger: 'axis', formatter: function(params){ var text_Unit =''; for(var i = 0;i < params.length;i++){ text_Unit += params[i].value + param.Unit + "</br>" } return params[0].name + "</br>" + text_Unit; } }, xAxis: [{ data: xData, gridIndex: 1, }], yAxis: [{ name: param.yName, splitLine: { show: false }, gridIndex: 1, }], grid: [{ bottom: '', }, { top: '20%', }], series: [{ type: 'line', showSymbol: false, data: data }]