Browse Source

情绪解码器全局触发;不会被遮挡;

dev
宋杰 9 hours ago
parent
commit
3ea19f48fd
  1. 19
      src/views/components/emotionDecod.vue

19
src/views/components/emotionDecod.vue

@ -68,7 +68,8 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
// //
const KlineOption = { const KlineOption = {
tooltip: { tooltip: {
trigger: 'item', //
trigger: 'axis', //
confine: true, // tooltip
axisPointer: { axisPointer: {
type: 'cross', // type: 'cross', //
crossStyle: { crossStyle: {
@ -76,12 +77,18 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
} }
}, },
formatter: function (params) { formatter: function (params) {
const date = params.name
if (!params || params.length === 0) return ''
// K线
const klineParam = params.find(param => param.seriesType === 'candlestick')
if (!klineParam) return ''
const date = klineParam.name
// 25 // 25
const open = params.data[1]
const close = params.data[2]
const low = params.data[3]
const high = params.data[4]
const open = klineParam.data[1]
const close = klineParam.data[2]
const low = klineParam.data[3]
const high = klineParam.data[4]
return `日期: ${date}<br/>开盘价: ${open}<br/>收盘价: ${close}<br/>最低价: ${low}<br/>最高价: ${high}` return `日期: ${date}<br/>开盘价: ${open}<br/>收盘价: ${close}<br/>最低价: ${low}<br/>最高价: ${high}`
} }

Loading…
Cancel
Save