var rainfallValue = [20, 120, 200, 130, 120, 170, 190, 241, 122, 112, 101, 21]; option = { tooltip: { trigger: 'axis' }, legend: { data: ['降雨量'] }, xAxis: [{ type: 'category', data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] }], yAxis: [{ type: 'value', name: '水量', min: 0, max: 250, interval: 50, axisLabel: { formatter: '{value}' } }], series: [{ name: '降雨量', type: 'line', label: { normal: { show: true, position: 'top', formatter: function (d) { if ((Math.max.apply(null, rainfallValue) == d.value) || Math.min.apply(null, rainfallValue) == d.value) { return " "; } else { return d.value; } } } }, data: rainfallValue, itemStyle: { normal: { color: '#029cec', label: { show: true, color: '#029cec', } } }, markPoint: { data: [{ type: 'max', name: '最大值', itemStyle: { label: { show: false } }, }, { type: 'min', name: '最小值', itemStyle: { label: { show: false } }, }, ] } }, ] };