配置项如下
option = {
xAxis3D: {
type: 'value',
max:50,
min:-50
},
yAxis3D: {
type: 'value',
max:50,
min:-50
},
zAxis3D: {
type: 'value',
max:50,
min:-50
},
grid3D: {
show: true,
axisLine: {
lineStyle: {
color: '#fff'
}
},
axisPointer: {
lineStyle: {
color: '#ffbd67'
}
}
},
visualMap: {
type:'piecewise',
show:true,
min: -50,
max: 50,
dimension: 0,
splitNumber: 5,
inRange: {
color: ['#d94e5d','#eac736','#50a3ba'],
symbol: ['circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'],
},
textStyle: {
color: '#fff'
},
pieces: [
// {gt: 0, lte: 50, color: '#e84e40', symbol: 'rect'},
// {gt: -50, lte: 0, color: '#ffed26', symbol: 'pin'},
],
},
series: [{
showAllSymbol: true,
type: 'scatter3D',
// coordinateSystem: 'cartesian3D',
data:[[12, 14, 10], [34, 50, 15], [5, 30, 20], [10, 15, 12], [23, 10, 14]],
symbolSize: 15,
}]
};