' + '열려 있는:$' + _that.decimal(this.point.open.toFixed(20)) + '
' + '높은:$' + _that.decimal(this.point.high.toFixed(20)) + '
' + '낮은:$' + _that.decimal(this.point.low.toFixed(20)) + '
' + '닫다:$' + _that.decimal(this.point.close.toFixed(20)); } }, scrollbar: { enabled: false }, chart: { credits: {} }, yAxis: { lineWidth: 2, lineColor: '#eeeeee', gridLineColor: '#eeeeee', gridLineDashStyle: 'shortdash', opposite: true, labels: { style: { color: '#a0a5ab', fontWeight: 'bold', }, align: 'left', x: 5, formatter: function() { return '$' + _that.decimal(this.value.toFixed(8)); }, }, plotLines: [{ value: this.price, color: '#f8da5f', dashStyle: 'dash', width: 1, zIndex: 5, label: { text: '$'+price, align: 'right', x: Number(this.pricelen)*10, backgroundColor: 'rgba(128, 128, 128, 0.5)', borderRadius: 5, verticalAlign: 'middle', useHTML: true, formatter: function() { return '
$'+price+'
'; } } }], }, xAxis: { min: minData, max: this.lineData[lineDataLength - 1][0], lineWidth: 2, lineColor: '#eeeeee', tickColor: '#eeeeee', labels: { style: { color: '#a0a5ab', fontWeight: 'bold' } }, }, series: [{ showInNavigator: true, name: 'Dogecoin', type: 'candlestick', color: 'red', lineColor: 'red', upColor: '#13c682', upLineColor: '#13c682', data: this.lineData, tooltip: { valueDecimals: 5, } }] }); setInterval(function() { chart.update({ yAxis: { plotLines: [{ value: _that.price, color: '#f8da5f', dashStyle: 'dash', width: 1, zIndex: 5, label: { text: '$'+_that.price, align: 'right', x: Number(_that.pricelen)*10, backgroundColor: 'rgba(128, 128, 128, 0.5)', borderRadius: 5, verticalAlign: 'middle', useHTML: true, formatter: function() { return '$'+_that.price+'
'; } } }] }, series: [{ data: _that.lineData }] }); }, 5000); }, showminchart(elementid,date,data,newsentiment) { if (document.getElementById(elementid) == null) { return } if (document.getElementById(elementid).previousElementSibling == null) { } else { let progressnode = document.getElementById(elementid).previousElementSibling; progressnode.parentNode.removeChild(progressnode); } let echarts = layui.echarts; var element = layui.element; let coloractive, bg1, bg2, bg3, eletitle; var text = selecttext(newsentiment); var color = selectcolor(newsentiment); coloractive = [color[0]]; bg1 = "background-color:"+color[0]+";"; bg2 = "background-color:#EEE; "; bg3 = "background-color:"+color[0]+"; color:#fff !important;"; if (elementid.search("left") > -1) { eletitle = "가격 감정"; } else if (elementid.search("volume") > -1) { eletitle = "거래량 감정"; } else if (elementid.search("impulse") > -1) { eletitle = "충동적인 감정"; } else if (elementid.search("social") > -1) { eletitle = "사회적 감정"; } else if (elementid.search("technical") > -1) { eletitle = "기술적 감정"; } else if (elementid.search("search") > -1) { eletitle = "검색 감정"; } else if (elementid.search("dominance") > -1) { eletitle = "지배적 감정"; } else if (elementid.search("whales") > -1) { eletitle = "고래 감정"; } else if (elementid.search("orderBook") > -1) { eletitle = "주문장 감정"; } else { eletitle = "변동성 감정"; } let htmlstr = '' + eletitle + '
' + '
'+newsentiment+'% - '+text+'
' + '
'; document.getElementById(elementid).insertAdjacentHTML("beforebegin", htmlstr); element.render('progress', elementid); var option = { color: coloractive, tooltip: { trigger: 'axis', position: function (pt) { return [pt[0], '10%']; } }, grid: { top: '5%', left: '5%', right: '5%', bottom: '20%', containLabel: true, }, xAxis: { type: 'category', boundaryGap: false, data: date, axisTick:{show:false}, splitLine:{show:false}, }, yAxis: { type: 'value', boundaryGap: [0, '100%'], axisTick:{show:false}, splitLine:{show:false}, }, series: [ { name: 'Sentiment', type: 'line', symbol: 'none', sampling: 'lttb', itemStyle: { color: coloractive }, areaStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: coloractive }, { offset: 0.5, color: color[1] }, { offset: 1, color: color[2] }, ]), }, data: data } ] }; if (document.getElementById(elementid).querySelector("canvas")) { echarts.dispose(document.getElementById(elementid)); } echarts.init(document.getElementById(elementid)).setOption(option, true); } }, }); function selecttext(score){ if(score<25){ return '극도의 공포'; } else if(score>=25 && score<40){ return '두려움'; } else if(score>=40 && score<60){ return '중립적'; } else if(score>=60 && score<75){ return '탐욕'; } else if(score>=75){ return '극도의 탐욕'; } } function selectcolor(score){ if(score<25){ return ["#ff3847", "rgba(255,78,79,0.2)","rgba(255,78,79,0.1)"] } else if(score>=25 && score<40){ return ["#ff5e40", "rgba(246,104,76,0.2)","rgba(246,104,76,0.1)"] } else if(score>=40 && score<60){ return ["#ff9920", "rgba(255,159,67,0.2)","rgba(255,159,67,0.1)"] } else if(score>=60 && score<75){ return ["#73c14b", "rgba(139,199,94,0.2)","rgba(139,199,94,0.1)"] } else if(score>=75){ return ["#00bd63", "rgba(40,175,105,0.2)","rgba(40,175,105,0.1)"] } }