mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 16:22:57 +08:00
fix: 调整散点图的tooltip配置
This commit is contained in:
parent
e24a029a78
commit
04cf44a528
@ -8,8 +8,15 @@ export const includes = ['legend', 'xAxis', 'yAxis']
|
|||||||
|
|
||||||
export const option = {
|
export const option = {
|
||||||
dataset: dataJson,
|
dataset: dataJson,
|
||||||
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
showDelay: 0,
|
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: {
|
axisPointer: {
|
||||||
show: true,
|
show: true,
|
||||||
type: 'cross',
|
type: 'cross',
|
||||||
@ -19,6 +26,7 @@ export const option = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
legend: {},
|
legend: {},
|
||||||
|
|
||||||
xAxis: {
|
xAxis: {
|
||||||
|
@ -11,6 +11,12 @@ export const option = {
|
|||||||
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
showDelay: 0,
|
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: {
|
axisPointer: {
|
||||||
show: true,
|
show: true,
|
||||||
type: 'cross',
|
type: 'cross',
|
||||||
|
@ -46,8 +46,15 @@ export const seriesItem = {
|
|||||||
|
|
||||||
export const option = {
|
export const option = {
|
||||||
dataset: dataJson,
|
dataset: dataJson,
|
||||||
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
showDelay: 0,
|
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: {
|
axisPointer: {
|
||||||
show: true,
|
show: true,
|
||||||
type: 'cross',
|
type: 'cross',
|
||||||
|
Loading…
Reference in New Issue
Block a user