|
|
@ -64,6 +64,16 @@ function initQXNLZHEcharts(kline, qxnlzhqData) { |
|
|
|
} |
|
|
|
return { categoryData, value }; |
|
|
|
}; |
|
|
|
|
|
|
|
let normalHeatmap = [] |
|
|
|
let rotateHeatmap = [] |
|
|
|
processedHeatmap.forEach((item) => { |
|
|
|
if (item[2] > 999) { |
|
|
|
rotateHeatmap.push(item) |
|
|
|
} else { |
|
|
|
normalHeatmap.push(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
const dealData = spliteDate(data); |
|
|
|
// 给配置项 |
|
|
|
const KlineOption = { |
|
|
@ -358,7 +368,7 @@ function initQXNLZHEcharts(kline, qxnlzhqData) { |
|
|
|
gridIndex: 1, |
|
|
|
xAxisIndex: 1, |
|
|
|
yAxisIndex: 1, |
|
|
|
data: processedHeatmap, |
|
|
|
data: normalHeatmap, |
|
|
|
coordinateSystem: "cartesian2d", |
|
|
|
tooltip: { |
|
|
|
trigger: "item", |
|
|
@ -406,6 +416,55 @@ function initQXNLZHEcharts(kline, qxnlzhqData) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '热力矩阵', |
|
|
|
type: 'heatmap', |
|
|
|
gridIndex: 1, |
|
|
|
xAxisIndex: 1, |
|
|
|
yAxisIndex: 1, |
|
|
|
data: rotateHeatmap, |
|
|
|
coordinateSystem: 'cartesian2d', |
|
|
|
tooltip: { |
|
|
|
trigger: 'item', |
|
|
|
// 覆盖全局 tooltip 配置 |
|
|
|
formatter: function (params) { |
|
|
|
console.log('params', params) |
|
|
|
return `${params.value[2]}` // 直接取数据中的第3个元素(数值) |
|
|
|
} |
|
|
|
}, |
|
|
|
label: { |
|
|
|
normal: { |
|
|
|
rotate: -60, |
|
|
|
show: true, |
|
|
|
color: 'white', // 文本颜色 |
|
|
|
formatter: function (params) { |
|
|
|
const value = params.value[2] // 数值 |
|
|
|
const colorType = params.value[3] // 颜色类型 |
|
|
|
// 使用 rich 富文本格式 |
|
|
|
return `{${colorType}|${value}}` |
|
|
|
}, |
|
|
|
rich: { |
|
|
|
green: { color: '#27ae60', fontWeight: 'bold' }, |
|
|
|
purple: { color: '#8e44ad', fontWeight: 'bold' }, |
|
|
|
red: { color: '#FF0000', fontWeight: 'bold' }, |
|
|
|
yellow: { color: '#FEB736FF', fontWeight: 'bold' }, |
|
|
|
normal: { color: 'grey' } |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
color: 'transparent', |
|
|
|
borderWidth: 2 |
|
|
|
} |
|
|
|
}, |
|
|
|
emphasis: { |
|
|
|
itemStyle: { |
|
|
|
shadowBlur: 10, |
|
|
|
shadowColor: 'rgba(0, 0, 0, 0.5)' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "凸起", |
|
|
|
type: "line", |
|
|
|
xAxisIndex: 2, |
|
|
|