mirror of
https://gitee.com/dromara/go-view.git
synced 2024-12-04 12:49:14 +08:00
fix: 调整散点图的tooltip配置
This commit is contained in:
parent
287097ceed
commit
f8aafd0e0b
@ -8,8 +8,15 @@ export const includes = ['legend', 'xAxis', 'yAxis']
|
||||
|
||||
export const option = {
|
||||
dataset: dataJson,
|
||||
|
||||
tooltip: {
|
||||
showDelay: 0,
|
||||
formatter: (params: { value: string | any[]; seriesName: string; name: string }) => {
|
||||
console.log(params)
|
||||
return params.value.length > 1
|
||||
? `${params.seriesName}:<br />${params.value[0]} ${params.value[1]}`
|
||||
: `${params.seriesName}:<br />${params.name} ${params.value}`
|
||||
},
|
||||
axisPointer: {
|
||||
show: true,
|
||||
type: 'cross',
|
||||
@ -19,6 +26,7 @@ export const option = {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
legend: {},
|
||||
|
||||
xAxis: {
|
||||
|
@ -11,6 +11,12 @@ export const option = {
|
||||
|
||||
tooltip: {
|
||||
showDelay: 0,
|
||||
formatter: (params: { value: string | any[]; seriesName: string; name: string }) => {
|
||||
console.log(params)
|
||||
return params.value.length > 1
|
||||
? `${params.seriesName}:<br />${params.value[0]} ${params.value[1]}`
|
||||
: `${params.seriesName}:<br />${params.name} ${params.value}`
|
||||
},
|
||||
axisPointer: {
|
||||
show: true,
|
||||
type: 'cross',
|
||||
|
@ -46,8 +46,15 @@ export const seriesItem = {
|
||||
|
||||
export const option = {
|
||||
dataset: dataJson,
|
||||
|
||||
tooltip: {
|
||||
showDelay: 0,
|
||||
formatter: (params: { value: string | any[]; seriesName: string; name: string }) => {
|
||||
console.log(params)
|
||||
return params.value.length > 1
|
||||
? `${params.seriesName}:<br />${params.value[0]} ${params.value[1]}`
|
||||
: `${params.seriesName}:<br />${params.name} ${params.value}`
|
||||
},
|
||||
axisPointer: {
|
||||
show: true,
|
||||
type: 'cross',
|
||||
|
Loading…
Reference in New Issue
Block a user