From 581bf143a56916e7ad9bd4a47faabffcff915501 Mon Sep 17 00:00:00 2001 From: xiaoguangbin Date: Tue, 12 Dec 2023 09:01:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9Gamma=E7=9A=84nuclide?= =?UTF-8?q?=20review=E5=BC=B9=E7=AA=97=E5=A4=A7=E5=B0=8F=EF=BC=9B=E6=9B=B2?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE=E6=A0=B9=E6=8D=AE=E9=BB=84=E8=89=B2=E7=BA=BF?= =?UTF-8?q?=E6=94=BE=E5=A4=A7=E6=98=BE=E7=A4=BA=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/NuclideReviewChart.vue | 39 +++++++++++++++---- .../components/NuclideReviewModal.vue | 4 +- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue index 52b8ec4..043be8c 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue @@ -23,14 +23,17 @@ const initialOption = { xAxis: { axisLine: { lineStyle: { - color: '#fff' + color: 'rgb(119, 181, 213, 0.5)' } }, splitLine: { - show: false + show: true, + lineStyle: { + color: 'rgba(119, 181, 213, .2)' + } }, - axisLabel: { - color: '#fff' + axisLabel: { + color: '#ade6ee' }, min: 'dataMin', max: 'dataMax', @@ -38,15 +41,18 @@ const initialOption = { }, yAxis: { axisLine: { + show: true, lineStyle: { - color: '#fff' + color: 'rgb(119, 181, 213, 0.5)' } }, splitLine: { - show: false + lineStyle: { + color: 'rgba(119, 181, 213, .2)' + } }, axisLabel: { - color: '#fff' + color: '#ade6ee' }, axisTick: { show: false @@ -82,6 +88,11 @@ export default { const series = [] chartData.forEach(({ pointlist, color }) => { + // 根据黄色line 调整最大最小yAxis + if(color === '#F5E91A'){ + this.option.yAxis.max = Math.ceil(Math.max(...pointlist.map(({ y }) => y))) + this.option.yAxis.min = Math.floor(Math.min(...pointlist.map(({ y }) => y))) + } series.push({ type: 'line', data: pointlist.map(({ x, y }) => [x, y]), @@ -89,8 +100,19 @@ export default { color }, symbol: 'none', - animation: false + animation: false, + // markLine: { + // silent: true, + // symbol: 'none', + // data: [], + // animation: false, + // lineStyle: { + // type: 'solid', + // width: 2 + // } + // } }) + }) series[0].markLine = { @@ -114,6 +136,7 @@ export default { } } + this.option.series = series }, immediate: true diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue index 4611171..3467cd7 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewModal.vue @@ -1,5 +1,5 @@