From dca4b320d83f81dfca06170bb6314c90485fa2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Tue, 12 Dec 2023 09:47:56 +0800 Subject: [PATCH] =?UTF-8?q?gamma->interActive=20tool=20->=20Nuclide=20revi?= =?UTF-8?q?ew=20=EF=BC=88=E9=80=89=E6=8B=A9table=E4=B8=80=E6=9D=A1?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=89=20=E9=87=8C=E9=9D=A2=E6=9B=B2?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE=20y=20=E8=BD=B4=E6=9C=89=E7=82=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/NuclideReviewChart.vue | 71 +++++++++---------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue index 043be8c..1840fb7 100644 --- a/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue +++ b/src/views/spectrumAnalysis/components/Modals/AnalyzeInteractiveToolModal/components/NuclideReviewChart.vue @@ -8,77 +8,78 @@ const initialOption = { grid: { top: 40, bottom: 50, - right: 30 + right: 30, + left: 50, }, title: { text: 'Energy', textStyle: { color: '#8FD4F8', fontSize: 14, - fontWeight: 'normal' + fontWeight: 'normal', }, right: 10, - bottom: 5 + bottom: 5, }, xAxis: { axisLine: { lineStyle: { - color: 'rgb(119, 181, 213, 0.5)' - } + color: 'rgb(119, 181, 213, 0.5)', + }, }, splitLine: { show: true, lineStyle: { - color: 'rgba(119, 181, 213, .2)' - } + color: 'rgba(119, 181, 213, .2)', + }, }, - axisLabel: { - color: '#ade6ee' + axisLabel: { + color: '#ade6ee', }, min: 'dataMin', max: 'dataMax', - animation: false + animation: false, }, yAxis: { axisLine: { show: true, lineStyle: { - color: 'rgb(119, 181, 213, 0.5)' - } + color: 'rgb(119, 181, 213, 0.5)', + }, }, splitLine: { lineStyle: { - color: 'rgba(119, 181, 213, .2)' - } + color: 'rgba(119, 181, 213, .2)', + }, }, axisLabel: { - color: '#ade6ee' + color: '#ade6ee', }, axisTick: { - show: false + show: false, }, name: 'Counts', nameTextStyle: { color: '#8FD4F8', - fontSize: 14 + fontSize: 14, }, - animation: false + animation: false, }, - series: [] + series: [], } export default { components: { - CustomChart + CustomChart, }, props: { data: { type: Object, - default: () => ({}) - } + default: () => ({}), + }, }, data() { return { - option: cloneDeep(initialOption) + option: cloneDeep(initialOption), } }, watch: { @@ -89,7 +90,7 @@ export default { const series = [] chartData.forEach(({ pointlist, color }) => { // 根据黄色line 调整最大最小yAxis - if(color === '#F5E91A'){ + 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))) } @@ -97,7 +98,7 @@ export default { type: 'line', data: pointlist.map(({ x, y }) => [x, y]), itemStyle: { - color + color, }, symbol: 'none', animation: false, @@ -112,7 +113,6 @@ export default { // } // } }) - }) series[0].markLine = { @@ -123,24 +123,23 @@ export default { formatter: '{c} keV', color: '#f00', fontWeight: 'bold', - fontSize: 14 - } - } + fontSize: 14, + }, + }, ], symbol: 'none', lineStyle: { - color: '#f00' + color: '#f00', }, emphasis: { - disabled: true - } + disabled: true, + }, } - this.option.series = series }, - immediate: true - } - } + immediate: true, + }, + }, }