beta 新谱图表增加标题,及自定义提示框

This commit is contained in:
任珮宇 2024-01-25 17:23:54 +08:00
parent fa137ad0ab
commit 1299a3cb6c

View File

@ -30,9 +30,29 @@ const roiLimitsOption = {
tooltip: {
show: true,
trigger: 'axis',
formatter: (params) => {
let content = ''
params.forEach((item) => {
//
content += `
<!-- 圆点样式 -->
<span style="color: #424864;">Channel ${item.axisValueLabel}</span><br>
<span style="display: inline-block; margin-right: 10px; border-radius: 50%; width: 8px; height: 8px;background-color: ${item.color};"></span>
<span >${item.value[1]}</span>
`
})
return content
},
},
xAxis: {
type: 'category',
name: 'Gamma Channel',
nameTextStyle: {
color: '#5b9cba',
fontSize: 16,
},
nameLocation: 'center',
nameGap: 30,
boundaryGap: false,
splitLine: {
show: true,
@ -56,6 +76,13 @@ const roiLimitsOption = {
},
yAxis: {
type: 'value',
name: 'Count',
nameTextStyle: {
color: '#5b9cba',
fontSize: 16,
},
nameLocation: 'center',
nameGap: 40,
splitLine: {
lineStyle: {
color: 'rgba(119, 181, 213, .3)',