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 lines
26 KiB

import{e}from"./marketTemperature-7b8efb57.js";import{_ as t}from"./plugin-vue_export-helper-46f75680.js";import{j as o,r as i,o as r,a7 as n,b as a,c as l,d,m as s}from"./index-909bd241.js";import{t as h,c,a as m,l as u}from"./index-31762c78.js";const w={class:"qxjmqbox"};var x=t({__name:"emotionDecod",setup(t,{expose:o}){o({initQXNLZHEcharts:function(t,o){m.value=o;const i=[];m.value.forEach(((e,t)=>{const[o,r,n,a,l,d,s,h,c,m]=e;i.push([t,0,l,1==c?"green":"transparent"]),i.push([t,1,a,1==h?"purple":"transparent"]),i.push([t,2,n,1==s?"red":"transparent"]),i.push([t,3,r,1==d?"yellow":"transparent"])})),c.value=i,u.value=m.value.map((e=>e[9]));const r=(e=>{const t=[];let o=[];for(let i=0;i<e.length;i++)t.push(e[i][0]),o.push(e[i].slice(1));return{categoryData:t,value:o}})(t),n={tooltip:{trigger:"axis",confine:!0,axisPointer:{type:"cross",crossStyle:{color:"#999"}},formatter:function(e){if(!e||0===e.length)return"";const t=e.find((e=>"candlestick"===e.seriesType));if(!t)return"";return`日期: ${t.name}<br/>开盘价: ${t.data[1]}<br/>收盘价: ${t.data[2]}<br/>最低价: ${t.data[3]}<br/>最高价: ${t.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:r.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:r.categoryData,axisTick:{show:!1},axisLabel:{show:!1,rotate:45},splitLine:{show:!0,lineStyle:{color:"white",type:"solid"},interval:0}},{type:"category",gridIndex:2,data:r.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:r.value,itemStyle:{normal:{color0:"red",color:"#0CF49B",borderColor0:"#FD1050",borderColor:"#0CF49B"}}},{name:"热力矩阵",type:"heatmap",gridIndex:1,xAxisIndex:1,yAxisIndex:1,data:i,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 t=e.value[2];return`{${e.value[3]}|${t}}`},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",borderWidth:2}},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}},{name:"凸起",type:"line",xAxisIndex:2,yAxisIndex:2,data:u.value,color:"black",lineStyle:{normal:{color:"red"}},symbol:"none",emphasis:{showSymbol:!0}}]};if(!s.value)return;h&&h.dispose();h=e.init(s.value),h.setOption(n),h&&(h.on("dataZoom",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),h.on("mousewheel",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),h.on("mousedown",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),h.on("mouseup",(()=>{window.handleChartInteractionEnd&&window.handleChartInteractionEnd()})),h.on("click",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})));const a=(e,t)=>{let o;return function(...i){clearTimeout(o),o=setTimeout((()=>{clearTimeout(o),e(...i)}),t)}},l=a((()=>{if(h&&!h.isDisposed())try{h.resize()}catch(e){}}),100);window.emotionDecodResizeHandler&&window.removeEventListener("resize",window.emotionDecodResizeHandler);if(window.addEventListener("resize",l),window.emotionDecodResizeHandler=l,s.value&&window.ResizeObserver){const e=new ResizeObserver(a((()=>{if(h&&!h.isDisposed())try{h.resize()}catch(e){}}),100));e.observe(s.value),window.emotionDecodContainerObserver=e}}});const s=i(null);let h=null;const c=i([]),m=i([]),u=i([]);const x=i(window.innerHeight),p=()=>{x.value=window.innerHeight};return r((()=>{window.emotionDecodHeightHandler||(window.addEventListener("resize",p),window.emotionDecodHeightHandler=p)})),n((()=>{h&&(h.dispose(),h=null),window.emotionDecodResizeHandler&&(window.removeEventListener("resize",window.emotionDecodResizeHandler),window.emotionDecodResizeHandler=null),window.emotionDecodHeightHandler&&(window.removeEventListener("resize",window.emotionDecodHeightHandler),window.emotionDecodHeightHandler=null),window.emotionDecodContainerObserver&&(window.emotionDecodContainerObserver.disconnect(),window.emotionDecodContainerObserver=null)})),(e,t)=>(a(),l("div",w,[d("div",{ref_key:"KlineCanvs",ref:s,class:"qxjmqEcharts"},null,512)]))}},[["__scopeId","data-v-66f4a538"]]);function p(e){const{chart:t,container:o,option:i,beforeResize:r,name:n="图表"}=e;if(!t||!o)return{cleanup:()=>{}};const a=function(e,t=100){let o;return function(...i){clearTimeout(o),o=setTimeout((()=>{clearTimeout(o),e(...i)}),t)}}((()=>{if(t&&!t.isDisposed())try{"function"==typeof r&&r(),i&&t.setOption(i,!0),t.resize()}catch(e){}}),100),l=a;let d=null;return window.ResizeObserver&&(d=new ResizeObserver(a),d.observe(o)),window.addEventListener("resize",l),{cleanup:()=>{window.removeEventListener("resize",l),d&&(d.disconnect(),d=null)},triggerResize:a}}const y={__name:"emotionalBottomRadar",setup(t,{expose:o}){const r=i(null);let d=null,s=null;return o({initEmotionalBottomRadar:function(t,o){if(d&&(d.dispose(),d=null),!r.value)return;d=e.init(r.value);let i=o.map((e=>e[0])),n=t.map((e=>[e[1],e[2],e[3],e[4]])),a=[];n.forEach((e=>{Array.isArray(e)&&e.length>=4&&a.push(e[0],e[1],e[2],e[3])}));let l=a.filter((e=>"number"==typeof e&&!isNaN(e))),h=Math.min(...l),c=Math.max(...l),m=Math.floor(h),u=Math.ceil(c),w=o.map((e=>e[1])),x=o.map((e=>e.slice(2,6))),y=[],f=[],b=[],g=[],v=[];x.forEach((e=>{e[0]?(y.push(4),e[3]?(g.push(36),e[2]?(b.push(40),v.push(0)):(b.push(0),v.push(0))):(g.push(0),e[2]?(b.push(76),v.push(0)):(b.push(0),v.push(0)))):e[0]||(y.push(0),e[3]?(g.push(40),e[2]?(b.push(40),v.push(0)):(b.push(0),v.push(0))):(g.push(0),e[2]?(b.push(79),v.push(1)):(b.push(0),v.push(0)))),e[1]?f.push(1):e[1]||f.push(0)}));let F={axisPointer:{link:{xAxisIndex:"all"}},tooltip:{show:!0,trigger:"axis",triggerOn:"mousemove",confine:!0,axisPointer:{type:"cross",crossStyle:{color:"grey",width:1,type:"dashed"},lineStyle:{color:"grey",width:1,type:"dashed"},label:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"#fff",borderColor:"#fff",borderWidth:1}},backgroundColor:"rgba(232, 232, 242, 0.87)",borderColor:"#fff",borderWidth:1,padding:10,textStyle:{color:"#fff",fontSize:12},formatter:function(e){if(!e||0===e.length)return"";if(e.some((e=>"红线"===e.seriesName&&1===e.axisIndex||2===e.axisIndex||"K线"!==e.seriesName&&"基础base"!==e.seriesName))&&!e.some((e=>"candlestick"===e.seriesType)))return"";let t=`<div style="font-weight: bold; color: black; margin-bottom: 8px;">${e[0].name}</div>`;return e.sort(((e,t)=>"candlestick"===e.seriesType?-1:"candlestick"===t.seriesType?1:"红线"===e.seriesName?-1:"红线"===t.seriesName?1:0)).forEach((e=>{let o=e.value,i=e.color;if("candlestick"===e.seriesType){let o=e.value;if(!Array.isArray(o)||o.length<4)return"";let i=o[1],r=o[2],a=o[3],l=o[4];if("number"!=typeof i||"number"!=typeof r||"number"!=typeof a||"number"!=typeof l)return"";let d=null;const s=e.dataIndex;if(s>0&&n&&n[s-1]){const e=n[s-1];e&&Array.isArray(e)&&e.length>=2&&(d=e[1])}if(t+='<div style="margin-bottom: 6px;">',t+=`<div style="color: black; font-weight: bold;">${e.seriesName}</div>`,t+=`<div style="color: black;">开盘价: ${i}</div>`,t+=`<div style="color: black;">收盘价: ${r}</div>`,t+=`<div style="color: black;">最低价: ${a}</div>`,t+=`<div style="color: black;">最高价: ${l}</div>`,null!==d&&"number"==typeof d){let e=r-d,o=(e/d*100).toFixed(2);t+=`<div style="color: ${e>=0?"#14b143":"#ef232a"};">涨跌: ${e>=0?"+":""}${e.toFixed(2)} (${o}%)</div>`}t+="</div>"}else"红线"===e.seriesName?t+=`<div style="color: #ef232a; margin-bottom: 4px;">${e.seriesName}: ${o}</div>`:"基础base"!==e.seriesName&&o>0&&(t+=`<div style="color: ${i}; margin-bottom: 4px;">${e.seriesName}: ${o}</div>`)})),t}},legend:{type:"scroll",pageButtonItemGap:2,pageButtonPosition:"end",textStyle:{color:"#666"}},grid:[{left:"10%",right:"3%",top:"20px",bottom:"50%",height:"150px",width:"85%"},{left:"10%",right:"3%",top:"170px",bottom:"25%",height:"150px",width:"85%"},{left:"10%",right:"3%",top:"320px",bottom:"50px",height:"150px",width:"85%"}],xAxis:[{type:"category",data:i,gridIndex:0,boundaryGap:!0,axisLine:{lineStyle:{color:"white"}},axisTick:{show:!1,alignWithLabel:!0,lineStyle:{color:"#999",width:1,type:"dashed"}},axisLabel:{show:!1},splitLine:{show:!1},axisPointer:{link:{xAxisIndex:"all"},label:{show:!1}}},{type:"category",data:i,gridIndex:1,boundaryGap:!0,axisLine:{lineStyle:{color:"white"}},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1},axisPointer:{link:{xAxisIndex:"all"},label:{show:!1}}},{type:"category",data:i,gridIndex:2,axisLine:{lineStyle:{color:"white"}},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:"#999",width:1,type:"solid"}},axisLabel:{color:"white",interval:"auto",rotate:0},splitLine:{show:!1},axisPointer:{link:{xAxisIndex:"all"}}}],yAxis:[{type:"value",gridIndex:0,splitNumber:4,min:m,max:u,interval:(u-m)/4,axisLine:{lineStyle:{color:"white"}},axisTick:{show:!0},axisLabel:{width:50,color:"white",formatter:function(e,t){return e.toFixed(0)}},splitLine:{show:!1,lineStyle:{color:"#837b7b",type:"dotted"}},scale:!0},{type:"value",gridIndex:1,splitNumber:3,axisLine:{lineStyle:{color:"white"}},axisTick:{show:!0},splitNumber:5,axisLabel:{width:50,color:"white",formatter:function(e,t){return 0===t?"0":5===t?"":e}},splitLine:{show:!1,lineStyle:{color:"#837b7b",type:"dotted"}}},{type:"value",gridIndex:2,splitNumber:2,axisLine:{lineStyle:{color:"white"}},axisTick:{show:!0},splitNumber:5,axisLabel:{width:50,color:"white",formatter:function(e,t){return 5===t?"":e}},splitLine:{show:!1,lineStyle:{color:"#837b7b",type:"dotted"}},splitNumber:5,min:function(e){return 0},max:function(e){return e.max+10}}],dataZoom:[{type:"slider",xAxisIndex:[0,1,2],start:50,end:100,show:!0,bottom:window.innerWidth>768?30:50,height:20,borderColor:"#CFD6E3",fillerColor:"rgba(135, 175, 274, 0.2)",handleStyle:{color:"#CFD6E3"},textStyle:{color:"#fff"},dataBackground:{lineStyle:{color:"#CFD6E3"},areaStyle:{color:"rgba(241,243,247,0.5)"}}},{type:"inside",xAxisIndex:[0,1,2],start:50,end:100,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1}],series:[{name:"K线",type:"candlestick",data:n,xAxisIndex:0,yAxisIndex:0,itemStyle:{color:"#14b143",color0:"#ef232a",borderColor:"#14b143",borderColor0:"#ef232a",normal:{color:"#14b143",color0:"#ef232a",borderColor:"#14b143",borderColor0:"#ef232a",opacity:function(e){return e.data[1]>e.data[0]?0:1}}}},{name:"红线",type:"line",data:w,xAxisIndex:1,yAxisIndex:1,symbol:"none",sampling:"average",itemStyle:{normal:{color:"#ef232a"}},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(33, 150, 243, 0.4)"},{offset:1,color:"rgba(33, 150, 243, 0)"}]}}},{name:"基础base",type:"bar",stack:"total",xAxisIndex:2,yAxisIndex:2,barCategoryGap:"0%",itemStyle:{normal:{color:"#ffffff",borderWidth:0}},data:v},{name:"黄色",type:"bar",stack:"total",xAxisIndex:2,yAxisIndex:2,barCategoryGap:"0%",itemStyle:{normal:{color:"rgba(255, 255, 0, 1)",borderWidth:0,label:{show:e=>f[e.dataIndex]>0,position:"top",textStyle:{color:"rgba(255, 255, 0, 1)"},formatter:e=>f[e.dataIndex]>0?"加仓资金":""}}},data:y},{name:"蓝色",type:"bar",stack:"total",xAxisIndex:2,yAxisIndex:2,barCategoryGap:"0%",label:{show:!0,position:"inside"},itemStyle:{normal:{color:"rgba(34, 196, 190, 1)",borderWidth:0}},data:g},{name:"紫色",type:"bar",stack:"total",xAxisIndex:2,yAxisIndex:2,barCategoryGap:"0%",label:{show:!0,position:"inside"},itemStyle:{normal:{color:"rgba(191, 87, 222, 1)",borderWidth:0}},data:b}]};function S(){window.innerWidth<=768&&(F.grid[0].height="150px",F.grid[1].height="150px",F.grid[2].height="150px",F.grid[0].left="15%",F.grid[1].left="15%",F.grid[2].left="15%",F.grid[1].top="170px",F.grid[2].top="320px",F.grid[0].width="80%",F.grid[1].width="80%",F.grid[2].width="80%"),d.setOption(F)}d.setOption(F),d&&(d.on("dataZoom",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),d.on("mousewheel",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),d.on("mousedown",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),d.on("mouseup",(()=>{window.handleChartInteractionEnd&&window.handleChartInteractionEnd()})),d.on("click",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()}))),r.value&&function(e){if(!e)return;Object.assign(e.style,{width:"100%",boxSizing:"border-box",overflow:"hidden",margin:"0",padding:"0"})}(r.value),s&&s.cleanup(),s=p({chart:d,container:r.value,option:F,beforeResize:S,name:"情绪探底雷达图表"}),setTimeout((()=>{s&&s.triggerResize()}),100),S()}}),n((()=>{s&&(s.cleanup(),s=null),d&&(d.dispose(),d=null)})),(e,t)=>(a(),l("div",{ref_key:"bottomRadarRef",ref:r,class:"bottomRadarChart"},null,512))}};var f=t({__name:"emoEnergyConverter",setup(t,{expose:r}){const{translate:d,t:w}=(()=>{const e=o((()=>e=>h.value&&e in h.value?h.value[e]:e)),t=o((()=>{var e;return(null==(e=h.value)?void 0:e.language)||"简体中文"}));return{t:h,translate:e,changeLanguage:c,availableLanguages:m,languagePacks:u,currentLanguage:t}})();r({initQXNLZHEcharts:function(t,o){const r=w.value;if(!x.value)return;p&&p.dispose();let n=[];Array.isArray(t);t.forEach((e=>{let t=e[0],o=[e[1],e[2],e[3],e[4]];n.push({date:t,value:o})})),y=[{min:o.dd,max:o.zc,name:"情绪冰点区",color:"#F5D6FF",fontColor:"#A7691C",fontSize:window.innerWidth>769?12:9,NumberColor:"white",left:null,right:"7%"},{min:o.zc,max:o.ht,name:"认知潜伏区",color:"#FFF6C4",fontColor:"#A7691C",NumberColor:"white",left:null,right:"7%"},{min:o.ht,max:o.qs,name:"多空消化区",color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#D7FF9B"},{offset:1,color:"#CEFF85"}]},fontColor:"#A7691C",NumberColor:"white",left:null,right:"7%"},{min:o.qs,max:o.tp,name:"共识加速区",color:"#FFDC8F",fontColor:"#A7691C",NumberColor:"white",left:null,right:"7%"},{min:o.tp,max:o.js,name:"情绪临界区",color:"#FFC0AA",fontColor:"#A7691C",NumberColor:"white",left:"32%",right:null}],-1!=Number(o.yl)&&y.push({min:o.js,max:o.yl,name:"杠杆失衡区",color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#FEA474"},{offset:1,color:"#FFAAF6"}]},fontColor:"#A7691C",NumberColor:"white",left:"32%",right:null});-1!=Number(o.gg)&&y.push({min:o.yl,max:o.gg,name:"情绪熔断区",color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#F66475"},{offset:1,color:"#FFB98E"}]},fontColor:"#A7691C",NumberColor:"white",left:"32%",right:null});const a=t.flatMap((e=>[e[1],e[2],e[3],e[4]]));Math.min(...a);const l=Math.max(...a),d=1.05*Number(o.cc),s=.97*Number(o.cc),h=Math.max(0,n.length-17),c=new Array(n.length).fill(null),m=new Array(n.length).fill(null);for(var u=h;u<n.length;u++)c[u]=d,m[u]=s;const b=[],v=[],F=[],S=i([]),C=i([]),z=i([]),A={data:{value:[0,0,0,0]}},I={data:{value:[0,0,0,0]}};let k=Math.max(Math.ceil(1.02*l),o.yl>0?o.yl:Math.ceil(1.02*l),1.02*d);function W(e,t){const o=document.createElement("canvas"),i=o.getContext("2d"),[r,n]=t.split(" ");o.width=parseInt(r)||60,o.height=parseInt(n)||60;const a=i.createLinearGradient(0,0,o.width,o.height);return a.addColorStop(.24,"rgba(0,0,0,0)"),a.addColorStop(.25,"rgba(255,255,255,0.7)"),a.addColorStop(.26,"rgba(0,0,0,0)"),a.addColorStop(.74,"rgba(0,0,0,0)"),a.addColorStop(.75,"rgba(255,255,255,0.7)"),a.addColorStop(.76,"rgba(0,0,0,0)"),i.fillStyle=a,i.fillRect(0,0,o.width,o.height),o}f=y.filter((e=>e.max<k)),n.forEach(((e,t)=>{const[i,r,n,a]=e.value,l={date:e.date,value:[null,null,null,null]};(null==A||A.data.value[3]<a)&&(A.data=e,A.index=t),I.data=e,I.index=t;let d=!1,s=!1;o.topxh.includes(e.date)?(C.value.push({date:e.date,value:[e.value[0],e.value[1],e.value[0],e.value[1]]}),d=!0):C.value.push(l),o.lowxh.includes(e.date)?(z.value.push({date:e.date,value:[e.value[0],e.value[1],e.value[0],e.value[1]]}),s=!0):z.value.push(l),o.qixh.includes(e.date)?S.value.push({date:e.date,value:[e.value[0],e.value[1],e.value[0],e.value[1]]}):S.value.push(l),d?(b.push(null),v.push(null)):s?(b.push({value:[t,r>i?r-i:i-r],itemStyle:{normal:{color:"#001EFF"}}}),v.push({value:[t,r>i?i:r],itemStyle:{normal:{color:"transparent"}}})):(b.push(null),v.push(null))})),F.push({name:`${Number(A.data.value[3]).toFixed(2)}`,coord:[A.index,A.data.value[3]],itemStyle:{normal:{color:"rgba(0,0,0,0)"}},label:{normal:{show:!0,position:"top",formatter:`${Number(A.data.value[3]).toFixed(2)}`,textStyle:{color:"#2171DD",fontSize:window.innerWidth>769?12:9,textBorderColor:"#FFFFFF",textBorderWidth:2,fontWeight:"bold"}}}}),F.push({name:`${Number(I.data.value[3]).toFixed(2)}`,coord:[I.index,I.data.value[2]],itemStyle:{normal:{color:"rgba(0,0,0,0)"}},label:{normal:{show:!0,position:"bottom",formatter:`${Number(I.data.value[1]).toFixed(2)}`,textStyle:{color:"#3B8F08",fontSize:window.innerWidth>769?12:9,textBorderColor:"#FFFFFF",textBorderWidth:2,fontWeight:"bold"}}}});const L=[];y.forEach((e=>{"情绪熔断区"!=e.name&&"情绪临界区"!=e.name&&"情绪冰点区"!=e.name||L.push({name:e.name,min:e.min,max:e.max,backgroundSize:"10px 10px "})}));const E=[],N={};o.topxh&&o.topxh.length>0&&(E.push({name:"TOP",textStyle:{color:"#000000",fontSize:window.innerWidth>769?12:9,textBorderColor:"#FFFFFF",textBorderWidth:2,fontWeight:"bold"}}),N.TOP=!0);o.lowxh&&o.lowxh.length>0&&(E.push({name:"LOW",textStyle:{color:"#001EFF",fontSize:window.innerWidth>769?12:9,textBorderColor:"#FFFFFF",textBorderWidth:2,fontWeight:"bold"}}),N.LOW=!0);o.qixh&&o.qixh.length>0&&(E.push({name:"起",textStyle:{color:"#249409",fontSize:window.innerWidth>769?12:9,textBorderColor:"#FFFFFF",textBorderWidth:2,fontWeight:"bold"}}),N.=!0);let $;p=e.init(x.value),$={legend:{data:E,selected:N,top:window.innerWidth>768?"0%":"1%",textStyle:{fontSize:window.matchMedia("(max-width: 767px)").matches?9:12}},tooltip:{show:!0,trigger:"axis",axisPointer:{type:"cross",lineStyle:{color:"grey",width:1,type:"dashed"},label:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"#fff",borderColor:"#fff",borderWidth:1}},backgroundColor:"rgba(232, 232, 242, 0.87)",borderColor:"#fff",borderWidth:1,borderRadius:8,padding:10,textStyle:{color:"#fff",fontSize:12},position:function(e,t,o,i,r){const n=window.matchMedia("(max-width: 768px)").matches,a=r.contentSize[0],l=r.contentSize[1],d=r.viewSize[0],s=r.viewSize[1];let h=e[0],c=e[1];return n?(h+a>d-10&&(h=d-a-10),h<10&&(h=10),c-l-20<0?(c+=20,c+l>s-60&&(c=Math.max(20,s-l-60))):c=c-l-20):(h+a>d-20?h=h-a-20:h+=20,c-l<20?c+=20:c=c-l-20),[h,c]},formatter:function(e){if(!e||0===e.length)return"";let o=`<div style="font-weight: bold; color: black; margin-bottom: 8px;">${e[0].name}</div>`;return e.forEach(((e,i)=>{let n=e.value;if(e.color,"candlestick"===e.seriesType){const i=r.kai,a=r.shou,l=r.di,d=r.gao;let s,h,c=n[1],m=n[2],u=n[3],w=n[4];if("number"!=typeof c||"number"!=typeof m||"number"!=typeof u||"number"!=typeof w)return"";if(0!=e.data[0]){let o=t[e.data[0]-1][2];s=m-o,h=(s/o*100).toFixed(2)}let x=s>=0?"#32B520":"#D8001B";o+='<div style="margin-bottom: 6px;">',o+=`<div style="color: black;">${i}: ${c.toFixed(2)}</div>`,o+=`<div style="color: black;">${a}: ${m.toFixed(2)}</div>`,o+=`<div style="color: black;">${l}: ${u.toFixed(2)}</div>`,o+=`<div style="color: black;">${d}: ${w.toFixed(2)}</div>`,0!=e.data[0]&&(o+=`<div style="color: ${x};">涨跌: ${s>=0?"+":""}${s.toFixed(2)} (${h}%)</div>`,o+="</div>")}else"止盈线"===e.seriesName&&null!=n&&"number"==typeof n?o+=`<div style="color: #FF0000; margin-bottom: 4px;">${e.seriesName}: ${n.toFixed(2)}</div>`:"止损线"===e.seriesName&&null!=n&&"number"==typeof n&&(o+=`<div style="color: #001EFF; margin-bottom: 4px;">${e.seriesName}: ${n.toFixed(2)}</div>`)})),o}},dataZoom:[{top:window.innerWidth<=768?"86%":"",type:"slider",xAxisIndex:0,start:0,end:100,show:!0,bottom:40,height:20,borderColor:"#fff",fillerColor:"rgba(255, 255, 255, 0.2)",handleStyle:{color:"#fff",borderColor:"white"},textStyle:{color:"white"}},{type:"inside",xAxisIndex:0,start:0,end:100,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1}],xAxis:{type:"category",data:n.map((e=>e.date)),axisLabel:{rotate:0,color:"white",interval:"auto",fontSize:window.innerWidth>769?12:9,showMaxLabel:!0},axisLine:{onZero:!1,lineStyle:{color:"white"}},axisTick:{alignWithLabel:!0}},yAxis:{scale:!0,axisLine:{lineStyle:{color:"white"}},splitLine:{show:!1},axisLabel:{show:!0,color:"white",fontSize:window.innerWidth>769?12:9},axisTick:{show:!0,color:"white"},min:o.dd<.98*s?Math.floor(o.dd):Math.floor(.98*s),max:Math.round(Math.max(Math.ceil(1.02*l),o.yl>0?o.yl:Math.ceil(1.02*l),1.02*d))},graphic:g(o.dd<.98*s?Math.floor(o.dd):Math.floor(.98*s),Math.max(Math.ceil(1.02*l),o.yl>0?o.yl:Math.ceil(1.02*l),1.02*d)),series:[{type:"candlestick",data:n.map((e=>e.value)),z:3,clip:!0,markPoint:{symbol:"circle",symbolSize:10,data:F,z:5},itemStyle:{normal:{color:"#00AAFF",color0:"#FF007F",borderColor:"#00AAFF",borderColor0:"#FF007F"}},markArea:{silent:!0,data:[...y.map((e=>[{x:"30%",yAxis:e.min,itemStyle:{normal:{color:e.color}}},{x:"95%",yAxis:e.max}])),...L.map((e=>[{x:"30%",yAxis:e.min,itemStyle:{normal:{color:{image:W(e.color,e.backgroundSize),repeat:"repeat"}}}},{x:"95%",yAxis:e.max}]))],markPoint:{symbol:"circle",symbolSize:10,data:F,z:5}},markLine:{silent:!0,symbol:"none",data:[...f.map((e=>[{name:`${Number(e.max).toFixed(2)}`,x:"30%",yAxis:e.max,label:{normal:{position:"start",color:("情绪冰点区"==e.name||"多空消化区"==e.name||e.name,"white"),fontSize:window.innerWidth>769?12:9}},lineStyle:{normal:{color:"#FFFFFF",width:2,type:"dashed"}}},{x:"95%",yAxis:e.max}])),[{name:`止盈${d.toFixed(2)}`,x:"60%",yAxis:d,label:{normal:{position:"start",fontSize:window.innerWidth>769?13:9,fontWeight:"bold",textBorderColor:"#FFFFFF",textBorderWidth:2}},lineStyle:{normal:{color:"#FF0000",width:2,type:"solid"}}},{x:"95%",yAxis:d}],[{name:`止损${s.toFixed(2)}`,x:"60%",yAxis:s,label:{normal:{position:"start",fontSize:window.innerWidth>769?13:9,fontWeight:"bold",textBorderColor:"#FFFFFF",textBorderWidth:2}},lineStyle:{normal:{color:"#001EFF",width:2,type:"solid"}}},{x:"95%",yAxis:s}]]}},{name:"起",type:"candlestick",data:S.value.map((e=>e.value)),itemStyle:{normal:{color:"#87FF6B",color0:"#87FF6B",borderColor:"#87FF6B",borderColor0:"#87FF6B"}},gridIndex:0,z:4,tooltip:{show:!1}},{name:"TOP",type:"candlestick",data:C.value.map((e=>e.value)),itemStyle:{normal:{color:"#000",color0:"#000",borderColor:"#000",borderColor0:"#000"}},gridIndex:0,z:4,tooltip:{show:!1}},{name:"LOW",type:"candlestick",data:z.value.map((e=>e.value)),itemStyle:{normal:{color:"#001EFF",color0:"#001EFF",borderColor:"#001EFF",borderColor0:"#001EFF"}},gridIndex:0,z:4,tooltip:{show:!1}}],grid:{left:window.innerWidth<=768?"2%":"5%",right:(window.innerWidth,"8%"),top:(window.innerWidth,"40"),bottom:"60",containLabel:!0,width:"auto",height:"auto",overflow:"hidden"}},p.setOption($);const M=(e,t)=>{let o;return function(...i){clearTimeout(o),o=setTimeout((()=>{clearTimeout(o),e(...i)}),t)}},D=M((()=>{if(p&&!p.isDisposed())try{p.resize()}catch(e){}}),100);window.emoEnergyConverterResizeHandler&&window.removeEventListener("resize",window.emoEnergyConverterResizeHandler);if(window.addEventListener("resize",D),window.emoEnergyConverterResizeHandler=D,x.value&&window.ResizeObserver){const e=new ResizeObserver(M((()=>{if(p&&!p.isDisposed())try{p.resize()}catch(e){}}),100));e.observe(x.value),window.emoEnergyConverterContainerObserver=e}}});let x=i(null),p=null,y=s([]),f=s([]);function b(e,t,o,i,r){t=Math.min(t,i),e=Math.max(e,o);const n=p.getHeight();return(t-Number(r))/(t-e)*(n-120)}i(null);const g=(e,t)=>{let o,i;for(let r=0;r<y.length;r++)0==r?(o=Number(y[r].min),i=Number(y[r].max)):(o=Math.min(o,Number(y[r].min)),i=Math.max(i,Number(y[r].max)));return y.flatMap((r=>{if(!r.min||!r.max)return[](Number(r.min)+Number(r.max))/2;const n=(Math.max(e,r.min)+Math.min(t,r.max))/2,a=r.min>=e&&r.max<=t,l=r.min<t&&r.max>e&&!a,d=p?p.getHeight():400,s=Math.max(r.min,e),h=Math.min(r.max,t),c=[];return(a||l)&&(h-s)/(t-e)*(d-60)>=5&&c.push({type:"text",left:r.left,right:r.right,top:window.innerWidth>769?34+b(e,t,o,i,n):37+b(e,t,o,i,n),style:{text:r.name,fill:r.fontColor,fontSize:window.innerWidth>769?12:9,fontWeight:"bold"},z:2}),c}))};return i(),i(),n((()=>{p&&(p.dispose(),p=null),window.emoEnergyConverterResizeHandler&&(window.removeEventListener("resize",window.emoEnergyConverterResizeHandler),window.emoEnergyConverterResizeHandler=null),window.emoEnergyConverterContainerObserver&&(window.emoEnergyConverterContainerObserver.disconnect(),window.emoEnergyConverterContainerObserver=null)})),(e,t)=>(a(),l("div",{ref_key:"qxnlzhqEchartsRef",ref:x,class:"qxnlzhqEcharts"},null,512))}},[["__scopeId","data-v-485f9185"]]);export{y as _,f as a,x as e};