gamma->interActive tool -> Nuclide review (选择table一条数据) 里面曲线图 y 轴有点显示不全
This commit is contained in:
parent
580c4fdfb7
commit
dca4b320d8
|
@ -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,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue
Block a user