散点图加颜色轴和点大小控制
This commit is contained in:
parent
78337da23b
commit
3d83bea8a8
|
@ -521,11 +521,28 @@ export default {
|
|||
},
|
||||
// 构造scatter列表
|
||||
buildScatterList() {
|
||||
console.log(this.twoDOption)
|
||||
const {
|
||||
xAxis: { min: minX, max: maxX },
|
||||
yAxis: { min: minY, max: maxY },
|
||||
} = this.twoDOption
|
||||
|
||||
//点大小
|
||||
this.twoDOption.series[0].symbolSize = 5
|
||||
//
|
||||
this.twoDOption.visualMap = {
|
||||
min: 512,
|
||||
max: minY,
|
||||
dimension: 1,
|
||||
orient: 'vertical',
|
||||
right: 10,
|
||||
top: 'center',
|
||||
text: ['HIGH', 'LOW'],
|
||||
calculable: true,
|
||||
inRange: {
|
||||
color: ['#ffffff', '#ff0000']
|
||||
}
|
||||
},
|
||||
this.twoDOption.series[0].data = this.histogramDataList
|
||||
.filter(({ b, g, c }) => c && b >= minX && b <= maxX && g >= minY && g <= maxY)
|
||||
.map(({ b, g, c }) => this.buildScatterItem(b, g, c))
|
||||
|
@ -536,9 +553,9 @@ export default {
|
|||
const { r, g, b } = this.interpolateColor(1 - count / this.currCount)
|
||||
return {
|
||||
value: [xAxis, yAxis],
|
||||
itemStyle: {
|
||||
color: `rgb(${r}, ${g}, ${b})`,
|
||||
},
|
||||
// itemStyle: {
|
||||
// color: `rgb(${r}, ${g}, ${b})`,
|
||||
// },
|
||||
}
|
||||
},
|
||||
// 重绘矩形框区域
|
||||
|
|
Loading…
Reference in New Issue
Block a user