beta 新谱图表增加标题,及自定义提示框
This commit is contained in:
parent
fa137ad0ab
commit
1299a3cb6c
|
@ -30,9 +30,29 @@ const roiLimitsOption = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
show: true,
|
show: true,
|
||||||
trigger: 'axis',
|
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: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
name: 'Gamma Channel',
|
||||||
|
nameTextStyle: {
|
||||||
|
color: '#5b9cba',
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
|
nameLocation: 'center',
|
||||||
|
nameGap: 30,
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -56,6 +76,13 @@ const roiLimitsOption = {
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
|
name: 'Count',
|
||||||
|
nameTextStyle: {
|
||||||
|
color: '#5b9cba',
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
|
nameLocation: 'center',
|
||||||
|
nameGap: 40,
|
||||||
splitLine: {
|
splitLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: 'rgba(119, 181, 213, .3)',
|
color: 'rgba(119, 181, 213, .3)',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user