Closed XD-DENG closed 5 years ago
var data = echarts.dataTool.prepareBoxplotData([ [850, 740, 900, 1070, 930, 850, 950, 1000, 960, 960, 1500], [210,280,250], [100, 200, 110] ]); option = { tooltip: { trigger: 'item', axisPointer: { type: 'shadow' } }, grid: { left: '10%', right: '10%', bottom: '5%' }, xAxis: { type: 'category', name:"X Axis name here", data: ['A', 'B', "C"], boundaryGap: true, nameGap: 3, axisLabel: { formatter: '{value}' } }, yAxis: { type: 'value', name: 'Give Y axis name here' }, series: [ { name: 'boxplot', type: 'boxplot', data: data.boxData, tooltip: { formatter: function (param) { return [ param.name + ': ', 'upper: ' + param.data[4], 'Q3: ' + param.data[3], 'median: ' + param.data[2], 'Q1: ' + param.data[1], 'lower: ' + param.data[0] ].join('<br/>') } } }, { name: 'outlier', type: 'scatter', data: data.outliers } ] };