You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.2 KiB

//散点图
export default function multiColumnsOption(dx=[], dValue=[], dName=[]) {
const newData = [];
for(let i=0;i<dValue.length;i++) {
let obj = {
name: dName[i],
type: 'bar',
stack: 'total',
emphasis: {
focus: 'series'
},
data: dValue[i]
};
newData.push(obj)
};
return {
tooltip: {
trigger: 'axis',
axisPointer: {
// Use axis to trigger tooltip
type: 'line' // 'shadow' as default; can also be 'line' or 'shadow'
},
},
legend: {},
grid: {
bottom: 20
},
xAxis: {
type: 'category',
data: dx,
axisLabel: {
interval: 1,
}
},
yAxis: {
type: 'value'
},
series: newData
// series: [
// {
// name: 'Direct',
// type: 'bar',
// stack: 'total',
// emphasis: {
// focus: 'series'
// },
// data: [320, 302, 301, 334, 390, 330, 320]
// },
// ]
}
}