You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
28 KiB

5 days ago
  1. import{k as e,_ as o,r as t,o as i,a8 as r,b as n,c as a,d as l,e as s,F as d,n as c}from"./index-4cb6f38c.js";import{e as h}from"./marketTemperature-7871708f.js";import{t as m,c as u,a as w,l as x}from"./index-5d1237a4.js";const p={class:"qxjmqbox"};var y=o({__name:"emotionDecod",setup(e,{expose:o}){o({initQXNLZHEcharts:function(e,o){w.value=o;const t=[];w.value.forEach(((e,o)=>{const[i,r,n,a,l,s,d,c,h,m]=e;t.push([o,0,l,1==h?"green":"transparent"]),t.push([o,1,a,1==c?"purple":"transparent"]),t.push([o,2,n,1==d?"red":"transparent"]),t.push([o,3,r,1==s?"yellow":"transparent"])})),u.value=t,x.value=w.value.map((e=>e[9])),console.log("热力图数据:",u.value),console.log("折线图数据:",x.value);const i=(e=>{const o=[];let t=[];for(let i=0;i<e.length;i++)o.push(e[i][0]),t.push(e[i].slice(1));return{categoryData:o,value:t}})(e),r={tooltip:{trigger:"axis",confine:!0,axisPointer:{type:"cross",crossStyle:{color:"#999"}},formatter:function(e){if(!e||0===e.length)return"";const o=e.find((e=>"candlestick"===e.seriesType));if(!o)return"";return`日期: ${o.name}<br/>开盘价: ${o.data[1]}<br/>收盘价: ${o.data[2]}<br/>最低价: ${o.data[3]}<br/>最高价: ${o.data[4]}`}},grid:[{top:"5%",height:window.innerWidth<=768?"35%":"40%",width:window.innerWidth<=768?"70%":"80%",left:window.outerWidth<=768?"20%":"10%"},{top:window.innerWidth<=768?"40%":"45%",height:"35%",width:window.innerWidth<=768?"70%":"80%",left:window.outerWidth<=768?"20%":"10%"},{top:window.innerWidth<=768?"75%":"80%",height:"2%",width:window.innerWidth<=768?"70%":"80%",left:window.outerWidth<=768?"20%":"10%"}],visualMap:[{show:!1,seriesIndex:1,min:0,max:2e3,calculable:!0,orient:"horizontal",left:"center",bottom:"15%",inRange:{color:["transparent"]}}],xAxis:[{type:"category",gridIndex:0,data:i.categoryData,axisPointer:{show:!0,type:"line",label:{show:!0,backgroundColor:"rgba(0,191,255)",color:"black"}},axisTick:{show:!1},axisLabel:{show:!1,rotate:45},axisLine:{show:!0,lineStyle:{color:"white"}}},{type:"category",gridIndex:1,data:i.categoryData,axisTick:{show:!1},axisLabel:{show:!1,rotate:45},splitLine:{show:!0,lineStyle:{color:"white",type:"solid"},interval:0}},{type:"category",gridIndex:2,data:i.categoryData,axisLine:{lineStyle:{color:"white"}},axisPointer:{show:!1,label:{show:!1},type:"line"},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:"white",width:1,type:"dashed"}}}],yAxis:[{scale:!0,axisLabel:{formatter:function(e){return e}},axisLine:{show:!0,lineStyle:{color:"white"}},splitLine:{show:!1},axisPointer:{show:!0,label:{show:!0,backgroundColor:"rgba(0,255,127)",color:"black"},type:"line"}},{gridIndex:1,type:"category",data:[0,1,2,3],axisLine:{lineStyle:{color:"white"}},axisLabel:{show:!1,color:"#fff",backgroundColor:"transparent",fontSize:12,margin:8},axisPointer:{show:!0,label:{show:!1},type:"line"},axisTick:{show:!1},splitLine:{show:!0,lineStyle:{color:"#8392A5",width:1,type:"solid"},interval:0}},{gridIndex:2,type:"value",axisLine:{show:!0,lineStyle:{color:"white"}},splitLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1},axisPointer:{show:!1,label:{show:!1},type:"line"}}],dataZoom:[{textStyle:{color:"white"},dataBackground:{areaStyle:{color:"#8392A5"},lineStyle:{opacity:.8,color:"#8392A5"}},xAxisIndex:[0,1,2],start:50,end:100,bottom:window.innerWidth<=768?"5%":"7%"},{type:"inside",xAxisIndex:[0,1,2],filterMode:"filter"}],series:[{type:"candlestick",name:"日K",data:i.value,itemStyle:{normal:{color0:"red",color:"#0CF49B",borderColor0:"#FD1050",borderColor:"#0CF49B"}}},{name:"热力矩阵",type:"heatmap",gridIndex:1,xAxisIndex:1,yAxisIndex:1,data:t,coordinateSystem:"cartesian2d",tooltip:{trigger:"item",axisPointer:{type:"cross",crossStyle:{color:"#999"}},formatter:function(e){return`${e.value[2]}`}},label:{normal:{show:!0,color:"#fff",formatter:function(e){const o=e.value[2];return`{${e.value[3]}|${o}}`},rich:{green:{color:"#27ae60",fontWeight:"bold"},purple:{color:"#8e44ad",fontWeight:"bold"},red:{color:"#FF0000",fontWeight:"bold"},yellow:{color:"#FFFF00",fontWeight:"bold"},normal:{color:"#fff"}}}},itemStyle:{normal:{color:"transparent",borderW