如下面代码所示
{
name: 'Name',
type: 'scatter',
singleAxisIndex: 4,
xAxisIndex: 0,
yAxisIndex: 0,
coordinateSystem: 'singleAxis',
symbolSize: function (val) {
return val * 5;
},
data: BaseData2,
itemStyle: {
color: function (params) {
console.log(params)
var colorList = ['Lime', 'Lime', 'Lime','Red', '#5a79ba', '#98a6dd', '#8b6eaf', '#67afc8'];
return colorList[params.value]
}
}