feat: chartp-line添加 tooltip
This commit is contained in:
@@ -7,6 +7,17 @@ import { format } from 'echarts'
|
|||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
|
||||||
const line = {
|
const line = {
|
||||||
|
tooltip: {
|
||||||
|
appendToBody: true,
|
||||||
|
trigger: 'axis',
|
||||||
|
textStyle: {
|
||||||
|
width: 20,
|
||||||
|
overflow: 'truncate'
|
||||||
|
},
|
||||||
|
// formatter: () =>{
|
||||||
|
// return '1'
|
||||||
|
// }
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'time'
|
type: 'time'
|
||||||
},
|
},
|
||||||
@@ -47,6 +58,17 @@ const line = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
const lineWithStatistics = {
|
const lineWithStatistics = {
|
||||||
|
tooltip: {
|
||||||
|
appendToBody: true,
|
||||||
|
trigger: 'axis',
|
||||||
|
textStyle: {
|
||||||
|
width: 20,
|
||||||
|
overflow: 'truncate'
|
||||||
|
},
|
||||||
|
// formatter: () =>{
|
||||||
|
// return '1'
|
||||||
|
// }
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'time'
|
type: 'time'
|
||||||
},
|
},
|
||||||
@@ -76,6 +98,17 @@ const lineWithStatistics = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
const lineStack = {
|
const lineStack = {
|
||||||
|
tooltip: {
|
||||||
|
appendToBody: true,
|
||||||
|
trigger: 'axis',
|
||||||
|
textStyle: {
|
||||||
|
width: 20,
|
||||||
|
overflow: 'truncate'
|
||||||
|
},
|
||||||
|
// formatter: () =>{
|
||||||
|
// return '1'
|
||||||
|
// }
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'time'
|
type: 'time'
|
||||||
},
|
},
|
||||||
@@ -118,6 +151,7 @@ const lineStack = {
|
|||||||
}
|
}
|
||||||
const pieWithTable = {
|
const pieWithTable = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
appendToBody: true,
|
||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
animation: false,
|
animation: false,
|
||||||
@@ -243,3 +277,6 @@ export function getLayout (type) {
|
|||||||
function tooLongFormatter (name) {
|
function tooLongFormatter (name) {
|
||||||
return format.truncateText(name, 110, '12')
|
return format.truncateText(name, 110, '12')
|
||||||
}
|
}
|
||||||
|
// function axiosFormatter(params) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|||||||
Reference in New Issue
Block a user