diff --git a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue index f8635d9..5415d1a 100644 --- a/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue +++ b/src/views/spectrumAnalysis/components/BetaGammaSpectrum.vue @@ -15,7 +15,6 @@ @mouseleave="handleBorderMouseLeave" @mouseup="handleBorderMouseLeave" > -
c && b >= minX && b <= maxX && g >= minY && g <= maxY) - .map(({ b, g }) => this.buildScatterItem(b, g)) + .map(({ b, g, c }) => this.buildScatterItem(b, g, c)) }, // 构造一个scatter 的点 - buildScatterItem(xAxis, yAxis) { + buildScatterItem(xAxis, yAxis, count) { return { - value: [xAxis, yAxis], + value: [xAxis, yAxis, count], } }, + + setVisialMapParams() { + const counts = this.histogramDataList.map(({ c }) => c) + if (counts.length) { + this.twoDOption.visualMap.max = Math.max(...counts) + } else { + this.twoDOption.visualMap.max = 0 + } + }, + // 重绘矩形框区域 reDrawRect() { const chart = this.$refs.chartTwoDRef.getChartInstance()