|
|
@ -6,10 +6,10 @@ |
|
|
|
import { ref } from 'vue' |
|
|
|
import * as echarts from 'echarts' |
|
|
|
const bottomRadarRef = ref(null) |
|
|
|
let bottomRadarChart = null |
|
|
|
function initEmotionalBottomRadar(KlineData, barAndLineData) { |
|
|
|
console.log('KlineData, barAndLineData---', KlineData, barAndLineData) |
|
|
|
let bottomRadarChartDom = document.getElementById('bottomRadarChart') |
|
|
|
let bottomRadarChart = echarts.init(bottomRadarChartDom) |
|
|
|
bottomRadarChart = echarts.init(bottomRadarChartDom) |
|
|
|
|
|
|
|
// 日期-作为x轴 |
|
|
|
let dateArray = KlineData.map(subArray => subArray[0]) |
|
|
@ -543,6 +543,13 @@ function initEmotionalBottomRadar(KlineData, barAndLineData) { |
|
|
|
defineExpose({ |
|
|
|
initEmotionalBottomRadar |
|
|
|
}) |
|
|
|
|
|
|
|
onBeforeUnmount(() => { |
|
|
|
// 组件卸载时销毁图表 |
|
|
|
if (bottomRadarChart) { |
|
|
|
bottomRadarChart.dispose() |
|
|
|
} |
|
|
|
}) |
|
|
|
</script> |
|
|
|
|
|
|
|
<style> |
|
|
|