hqchart 1.1.15321 → 1.1.15326

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2900,7 +2900,7 @@ var textRightPrev=null;//上一次刻度输出右边x坐标
2900
2900
  for(var i=0;i<this.VerticalInfo.length;++i){var item=this.VerticalInfo[i];var x=null;if(mapX&&mapX.has(item.Value))x=mapX.get(item.Value);else x=this.GetXFromIndex(item.Value);if(item.XOffset&&item.XOffset[0]){var subItem=item.XOffset[0];if(subItem.Position===1){x-=this.DataWidth/2;x-=this.DistanceWidth/2;}else if(subItem.Position===2){x+=this.DataWidth/2;x+=this.DistanceWidth/2;}}if(x>right)break;if(xPrev!=null&&Math.abs(x-xPrev)<this.MinXDistance)continue;var item=this.VerticalInfo[i];var xFixed=ToFixedPoint(x);if(this.IsShowXLine){if(item.LineType==2)//虚线
2901
2901
  {this.Canvas.strokeStyle=this.VerticalInfo[i].LineColor;if(item.LineDash)this.Canvas.setLineDash(item.LineDash);else this.Canvas.setLineDash([5*pixelRatio,5*pixelRatio]);this.Canvas.beginPath();this.Canvas.moveTo(xFixed,top);this.Canvas.lineTo(xFixed,bottom);this.Canvas.stroke();this.Canvas.setLineDash([]);}else if(item.LineType==3){}else if(item.LineType>0)//实线
2902
2902
  {if(g_JSChartResource.FrameXLineDash){this.Canvas.strokeStyle=this.VerticalInfo[i].LineColor;this.Canvas.setLineDash(g_JSChartResource.FrameXLineDash);//虚线
2903
- this.Canvas.beginPath();this.Canvas.moveTo(xFixed,top);this.Canvas.lineTo(xFixed,bottom);this.Canvas.stroke();this.Canvas.setLineDash([]);}else{this.Canvas.strokeStyle=this.VerticalInfo[i].LineColor;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,top);this.Canvas.lineTo(xFixed,bottom);this.Canvas.stroke();}}}if(item.BG&&this.DrawDayVertical){this.DrawDayVertical(item,x,border);}if(item.Message[0]!=null&&this.ChartBorder.Bottom>5*pixelRatio){if(IFrameSplitOperator.IsObject(item.Message[0])){var textObj=item.Message[0];if(!textObj.Font)textObj.Font=item.Font;if(!textObj.TextColor)textObj.TextColor=item.TextColor;var drawInfo=this.GetMultiLineVTextSize(textObj);if(drawInfo){drawInfo.XCenter=x;var rtBottom={Left:0,Right:right,Top:bottom+2*pixelRatio,Bottom:border.Height};rtBottom.Width=rtBottom.Right-rtBottom.Left;rtBottom.Height=rtBottom.Bottom-rtBottom.Top;drawInfo.RectBottom=rtBottom;drawInfo.TextRightPrev=textRightPrev;this.DrawMultiLineVText(drawInfo);if(drawInfo.TextRight)textRightPrev=drawInfo.TextRight;}}else{if(item.Font)this.Canvas.font=item.Font;var textLeft=0;this.Canvas.strokeStyle=item.TextColor;var testWidth=this.Canvas.measureText(item.Message[0]).width;var textHeight=this.Canvas.measureText("擎").width;if(bottomTextExtend&&bottomTextExtend.Align==1){this.Canvas.textAlign="left";this.Canvas.textBaseline="top";textLeft=x;}else{if(x<testWidth/2){this.Canvas.textAlign="left";this.Canvas.textBaseline="top";textLeft=x;}else if(x+testWidth/2>=this.ChartBorder.GetChartWidth()){this.Canvas.textAlign="right";this.Canvas.textBaseline="top";textLeft=x-testWidth;}else{this.Canvas.textAlign="center";this.Canvas.textBaseline="top";textLeft=x-testWidth/2;}}if(textRightPrev==null||textLeft>textRightPrev){var yText=bottom;if(item.LineType==3){var lineLength=this.ShortXLineLength*pixelRatio;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,yText);this.Canvas.lineTo(xFixed,yText+lineLength);this.Canvas.stroke();yText+=lineLength+2*pixelRatio;}if(bottomLineExtend){if(bottomLineExtend.Mode===1){if(item.Value>1){if(bottomLineExtend.Color)this.Canvas.strokeStyle=bottomLineExtend.Color;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,bottom);this.Canvas.lineTo(xFixed,border.ChartHeight);this.Canvas.stroke();x+=1;}}else if(bottomLineExtend.Mode===2){if(bottomLineExtend.Width>=1){var lineLength=bottomLineExtend.Width;if(bottomLineExtend.Color)this.Canvas.strokeStyle=bottomLineExtend.Color;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,yText);this.Canvas.lineTo(xFixed,yText+lineLength);this.Canvas.stroke();yText+=lineLength+2;}}}//item.TextBGColor="rgb(0,255,0)";
2903
+ this.Canvas.beginPath();this.Canvas.moveTo(xFixed,top);this.Canvas.lineTo(xFixed,bottom);this.Canvas.stroke();this.Canvas.setLineDash([]);}else{this.Canvas.strokeStyle=this.VerticalInfo[i].LineColor;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,top);this.Canvas.lineTo(xFixed,bottom);this.Canvas.stroke();}}}if(item.BG&&this.DrawDayVertical)this.DrawDayVertical(item,x,border);if(item.VBG&&this.DrawBGVertical)this.DrawBGVertical(item,x,border);if(item.Message[0]!=null&&this.ChartBorder.Bottom>5*pixelRatio){if(IFrameSplitOperator.IsObject(item.Message[0])){var textObj=item.Message[0];if(!textObj.Font)textObj.Font=item.Font;if(!textObj.TextColor)textObj.TextColor=item.TextColor;var drawInfo=this.GetMultiLineVTextSize(textObj);if(drawInfo){drawInfo.XCenter=x;var rtBottom={Left:0,Right:right,Top:bottom+2*pixelRatio,Bottom:border.Height};rtBottom.Width=rtBottom.Right-rtBottom.Left;rtBottom.Height=rtBottom.Bottom-rtBottom.Top;drawInfo.RectBottom=rtBottom;drawInfo.TextRightPrev=textRightPrev;this.DrawMultiLineVText(drawInfo);if(drawInfo.TextRight)textRightPrev=drawInfo.TextRight;}}else{if(item.Font)this.Canvas.font=item.Font;var textLeft=0;this.Canvas.strokeStyle=item.TextColor;var testWidth=this.Canvas.measureText(item.Message[0]).width;var textHeight=this.Canvas.measureText("擎").width;if(bottomTextExtend&&bottomTextExtend.Align==1){this.Canvas.textAlign="left";this.Canvas.textBaseline="top";textLeft=x;}else{if(x<testWidth/2){this.Canvas.textAlign="left";this.Canvas.textBaseline="top";textLeft=x;}else if(x+testWidth/2>=this.ChartBorder.GetChartWidth()){this.Canvas.textAlign="right";this.Canvas.textBaseline="top";textLeft=x-testWidth;}else{this.Canvas.textAlign="center";this.Canvas.textBaseline="top";textLeft=x-testWidth/2;}}if(textRightPrev==null||textLeft>textRightPrev){var yText=bottom;if(item.LineType==3){var lineLength=this.ShortXLineLength*pixelRatio;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,yText);this.Canvas.lineTo(xFixed,yText+lineLength);this.Canvas.stroke();yText+=lineLength+2*pixelRatio;}if(bottomLineExtend){if(bottomLineExtend.Mode===1){if(item.Value>1){if(bottomLineExtend.Color)this.Canvas.strokeStyle=bottomLineExtend.Color;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,bottom);this.Canvas.lineTo(xFixed,border.ChartHeight);this.Canvas.stroke();x+=1;}}else if(bottomLineExtend.Mode===2){if(bottomLineExtend.Width>=1){var lineLength=bottomLineExtend.Width;if(bottomLineExtend.Color)this.Canvas.strokeStyle=bottomLineExtend.Color;this.Canvas.beginPath();this.Canvas.moveTo(xFixed,yText);this.Canvas.lineTo(xFixed,yText+lineLength);this.Canvas.stroke();yText+=lineLength+2;}}}//item.TextBGColor="rgb(0,255,0)";
2904
2904
  if(item.TextBGColor)//文字背景色
2905
2905
  {var rtText={Left:textLeft,Top:yText+this.XBottomOffset,Width:testWidth,Height:textHeight};this.Canvas.fillStyle=item.TextBGColor;this.Canvas.fillRect(rtText.Left-1,rtText.Top,rtText.Width+2,rtText.Height);}this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(this.VerticalInfo[i].Message[0],x,yText+this.XBottomOffset);textRightPrev=textLeft+testWidth;}}}xPrev=x;}};//{Font:, AryText:[ { AryText:[{ Text:, Color: }], }, ] }
2906
2906
  this.GetMultiLineVTextSize=function(obj){if(obj.Font)this.Canvas.font=obj.Font;var lineHeight=this.Canvas.measureText('擎').width;var aryLine=[];for(var i=0;i<obj.AryText.length;++i){var item=obj.AryText[i];var lineInfo={Width:0,Height:lineHeight,AryText:[],Align:2,Margin:{Top:1,Bottom:1},YOffset:-1};if(item.Margin){if(IFrameSplitOperator.IsNumber(item.Margin.Top))lineInfo.Margin.Top=item.Margin.Top;if(IFrameSplitOperator.IsNumber(item.Margin.Bottom))lineInfo.Margin.Bottom=item.Margin.Bottom;}if(IFrameSplitOperator.IsNumber(item.YOffset))lineInfo.YOffset=item.YOffset;if(IFrameSplitOperator.IsNumber(item.Align))lineInfo.Align=item.Align;lineInfo.Height=lineHeight+lineInfo.Margin.Top+lineInfo.Margin.Bottom;for(var j=0;j<item.AryText.length;++j){var subItem=item.AryText[j];if(!subItem||!subItem.Text)continue;var width=this.Canvas.measureText(subItem.Text).width;var textItem={Width:width,Text:subItem.Text,Color:obj.TextColor,Margin:{Left:0,Right:0}};if(subItem.Color)textItem.Color=subItem.Color;if(subItem.Margin){if(IFrameSplitOperator.IsNumber(subItem.Margin.Left))textItem.Margin.Left=subItem.Margin.Left;if(IFrameSplitOperator.IsNumber(subItem.Margin.Right))textItem.Margin.Right=subItem.Margin.Right;}textItem.Width=width+textItem.Margin.Right+textItem.Margin.Left;lineInfo.Width+=textItem.Width;lineInfo.AryText.push(textItem);}aryLine.push(lineInfo);}if(aryLine.length<=0)return null;var width=0,height=0;for(var i=0;i<aryLine.length;++i){var item=aryLine[i];if(width<item.Width)width=item.Width;height+=item.Height;}if(width<=0||height<=0)return null;var drawInfo={Width:width,Height:height,AryLine:aryLine,Align:2};//Align 1=left 2=center 3=right
@@ -3000,7 +3000,7 @@ var top=ToFixedPoint(border.Top);var bottom=ToFixedPoint(border.Bottom);this.Can
3000
3000
  var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_MINUTE_NIGHT_DAY_X_INDEX);if(!event||!event.Callback)return;var sendData={Symbol:symbol,XIndex:xIndex,MinuteTimeStringData:g_MinuteTimeStringData};event.Callback(event,sendData,this);xIndex=sendData.XIndex;if(xIndex<0)return;var border=this.ChartBorder.GetBorder();var x=this.GetXFromIndex(xIndex);var rtNight={Left:border.Left,Top:border.TopEx,Right:x,Bottom:border.Bottom};rtNight.Width=rtNight.Right-rtNight.Left;rtNight.Height=rtNight.Bottom-rtNight.Top;this.Canvas.fillStyle=this.NightDayConfig.NightBGColor;this.Canvas.fillRect(rtNight.Left,rtNight.Top,rtNight.Width,rtNight.Height);if(this.Identify!=0)return;//显示 日盘夜盘文字
3001
3001
  this.Canvas.font=this.NightDayConfig.Font;this.Canvas.textBaseline="bottom";this.Canvas.textAlign='left';var aryTitle=[{Title:"夜盘",Position:1,Config:this.NightDayConfig.Night},{Title:"日盘",Position:0,Config:this.NightDayConfig.Day}];var textHeight=this.Canvas.measureText("擎").width;for(var i=0;i<aryTitle.length;++i){var item=aryTitle[i];var text=g_JSChartLocalization.GetText(item.Title,this.HQChart.LanguageID);var testWidth=this.Canvas.measureText(text).width;var rtItem={Width:testWidth+item.Config.Margin.Left+item.Config.Margin.Right,Height:textHeight+item.Config.Margin.Top+item.Config.Margin.Bottom,Bottom:border.Bottom};rtItem.Top=rtItem.Bottom-rtItem.Height;if(item.Position===1){rtItem.Right=x-1;rtItem.Left=rtItem.Right-rtItem.Width;}else{rtItem.Left=x+1;rtItem.Right=rtItem.Left+rtItem.Width;}if(item.Config.BGColor){this.Canvas.fillStyle=item.Config.BGColor;this.Canvas.fillRect(rtItem.Left,rtItem.Top,rtItem.Width,rtItem.Height);}if(item.Config.BorderColor){this.Canvas.strokeStyle=item.Config.BorderColor;this.Canvas.strokeRect(ToFixedPoint(rtItem.Left),ToFixedPoint(rtItem.Top),ToFixedRect(rtItem.Width),ToFixedRect(rtItem.Height));}this.Canvas.fillStyle=item.Config.Color;this.Canvas.fillText(text,rtItem.Left+item.Config.Margin.Left,rtItem.Bottom-item.Config.Margin.Bottom);}};//选中的画图工具X轴坐标信息
3002
3002
  this.DrawPictureXCoordinate=function(drawPicture,range,option){if(this.IsHScreen)return;if(!range)return;if(!IFrameSplitOperator.IsNonEmptyArray(range.Points))return;var border=this.GetBorder();var left=border.Left;var right=border.Right;this.Canvas.font=this.DrawPicture.Font;var fontHeight=this.GetFontHeight();if(range.X){var xRange=range.X;var xLeft=xRange.Min.X;var xRight=xRange.Max.X;if(xLeft<left)xLeft=left;if(xRight>right)xRight=right;this.Canvas.fillStyle=this.DrawPicture.BGColor;this.Canvas.fillRect(xLeft,border.Bottom,xRight-xLeft,fontHeight);}for(var i=0;i<range.Points.length;++i){var item=range.Points[i];if(item.X<left||item.X>right)continue;var index=parseInt(this.GetXData(item.X));var kItem=this.GetKItem(index,option);if(kItem){//var text=IFrameSplitOperator.FormatDateString(kItem.Date,null);
3003
- var text=IFrameSplitOperator.FormatTimeString(kItem.Time,"HH:MM");var textWidth=this.Canvas.measureText(text).width+2;var textLeft=item.X-textWidth/2;if(textLeft<left)textLeft=left;this.Canvas.fillStyle=this.DrawPicture.TextBGColor;this.Canvas.fillRect(textLeft,border.Bottom,textWidth,fontHeight);this.Canvas.fillStyle=this.DrawPicture.TextColor;var yCenter=border.Bottom+fontHeight;this.Canvas.fillText(text,textLeft+1,yCenter);}}};this.GetKItem=function(currentIndex,option){if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;if(currentIndex<this.Data.Data.length){return this.Data.Data[currentIndex];}else{var kItem=this.Data.Data[this.Data.Data.length-1];var xDatetime=g_MinuteTimeStringData.GetTimeData(option.Symbol);var index=currentIndex%xDatetime.length;var timeItem=xDatetime[index];return{Date:kItem.Date,Time:timeItem};}};this.DrawDayVertical=function(dayItem,x,border){if(!dayItem.BG)return;var bgItem=dayItem.BG;var xStart=this.GetXFromIndex(bgItem.Index.Start);var xEnd=this.GetXFromIndex(bgItem.Index.End);var maxWidth=xEnd-xStart;var bgHeight=this.ChartBorder.Bottom;if(IFrameSplitOperator.IsNumber(bgItem.Height))bgHeight=bgItem.Height;if(bgItem.Color){this.Canvas.fillStyle=bgItem.Color;var rtBG={Left:xStart,Width:maxWidth,Top:border.Bottom,Height:bgHeight};this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}if(IFrameSplitOperator.IsNonEmptyArray(dayItem.AryText))//[ [{Text:, Color:},], []]
3003
+ var text=IFrameSplitOperator.FormatTimeString(kItem.Time,"HH:MM");var textWidth=this.Canvas.measureText(text).width+2;var textLeft=item.X-textWidth/2;if(textLeft<left)textLeft=left;this.Canvas.fillStyle=this.DrawPicture.TextBGColor;this.Canvas.fillRect(textLeft,border.Bottom,textWidth,fontHeight);this.Canvas.fillStyle=this.DrawPicture.TextColor;var yCenter=border.Bottom+fontHeight;this.Canvas.fillText(text,textLeft+1,yCenter);}}};this.GetKItem=function(currentIndex,option){if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;if(currentIndex<this.Data.Data.length){return this.Data.Data[currentIndex];}else{var kItem=this.Data.Data[this.Data.Data.length-1];var xDatetime=g_MinuteTimeStringData.GetTimeData(option.Symbol);var index=currentIndex%xDatetime.length;var timeItem=xDatetime[index];return{Date:kItem.Date,Time:timeItem};}};this.DrawBGVertical=function(dayItem,x,border){if(!dayItem.VBG)return;var bgItem=dayItem.VBG;var xStart=this.GetXFromIndex(bgItem.Index.Start);var xEnd=this.GetXFromIndex(bgItem.Index.End);var maxWidth=xEnd-xStart;if(bgItem.Color){this.Canvas.fillStyle=bgItem.Color;var rtBG={Left:xStart,Width:maxWidth,Top:border.TopEx,Bottom:border.Bottom};rtBG.Height=rtBG.Bottom-rtBG.Top;rtBG.Right=rtBG.Left+rtBG.Width;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}};this.DrawDayVertical=function(dayItem,x,border){if(!dayItem.BG)return;var bgItem=dayItem.BG;var xStart=this.GetXFromIndex(bgItem.Index.Start);var xEnd=this.GetXFromIndex(bgItem.Index.End);var maxWidth=xEnd-xStart;var bgHeight=this.ChartBorder.Bottom;if(IFrameSplitOperator.IsNumber(bgItem.Height))bgHeight=bgItem.Height;if(bgItem.Color){this.Canvas.fillStyle=bgItem.Color;var rtBG={Left:xStart,Width:maxWidth,Top:border.Bottom,Height:bgHeight};this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);}if(IFrameSplitOperator.IsNonEmptyArray(dayItem.AryText))//[ [{Text:, Color:},], []]
3004
3004
  {if(dayItem.Font)this.Canvas.font=dayItem.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="top";var yText=border.Bottom+2;var lineHeight=this.Canvas.measureText("擎").width+2;for(var i=0,j=0;i<dayItem.AryText.length;++i){var aryText=dayItem.AryText[i];var itemWidth=0;var aryOut=[];for(j=0;j<aryText.length;++j){var item=aryText[j];var textWidth=this.Canvas.measureText(item.Text).width;if(itemWidth+textWidth>maxWidth)break;var newItem={Text:item.Text,Width:textWidth,Color:item.Color,Space:item.Space};itemWidth+=textWidth;item.Width=textWidth;if(item.Space>=1)itemWidth+=item.Space;aryOut.push(newItem);}var xText=xStart+(maxWidth-itemWidth)/2;for(var j=0;j<aryOut.length;++j){var item=aryOut[j];if(!IFrameSplitOperator.IsNumber(item.Width))break;if(item.Color)this.Canvas.fillStyle=item.Color;else if(dayItem.TextColor)this.Canvas.fillStyle=dayItem.TextColor;this.Canvas.fillText(item.Text,xText,yText);xText+=item.Width;if(item.Space>=1)xText+=item.Space;}yText+=lineHeight;}}};//分割x,y轴坐标信息
3005
3005
  this.SplitXYCoordinate=function(){if(this.XYSplit==false){//计算自定义刻度
3006
3006
  if(this.YCustomSplit){if(this.YSplitOperator&&this.YSplitOperator.CustomCoordinate)this.YSplitOperator.CustomCoordinate();}return;}if(this.XSplitOperator!=null)this.XSplitOperator.Operator();if(this.YSplitOperator!=null)this.YSplitOperator.Operator();};this.GetMultiDayXFromIndex=function(index,border){var dayBorder=border.DayBorder;var minuteIndex=index%this.MinuteCount;var dayIndex=parseInt(index/this.MinuteCount);if(dayIndex>=dayBorder.length)dayIndex=dayBorder.length-1;var client=dayBorder[dayIndex];var count=this.MinuteCount-1;if(minuteIndex>=count){return client.RightEx;}else{var width=client.RightEx-client.LeftEx;var offset=client.LeftEx+width*minuteIndex/count;return offset;}};this.GetXFromIndex=function(index){var count=this.XPointCount-1;var border=this.ChartBorder.GetBorder();if(border.DayBorder)return this.GetMultiDayXFromIndex(index,border);if(count==1){if(index==0)return border.LeftEx;else return border.RightEx;}else if(count<=0){return border.LeftEx;}else if(index>=count){return border.RightEx;}else{var width=border.RightEx-border.LeftEx;var offset=border.LeftEx+width*index/count;return offset;}};this.GetMultiDayXData=function(x,border){var dayBorder=border.DayBorder;for(var i=0;i<dayBorder.length;++i){var client=dayBorder[i];if(x>=client.Left&&x<=client.Right){var count=this.MinuteCount-1;var dayMinuteCount=this.MinuteCount*i;if(x<=client.LeftEx)return 0+dayMinuteCount;if(x>=client.RightEx)return count+dayMinuteCount;var width=client.RightEx-client.LeftEx;return(x-client.LeftEx)*(count*1.0/width)+dayMinuteCount;}}};//X坐标转x轴数值
@@ -15744,7 +15744,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
15744
15744
  this.ExecuteScript(item,data);}this.Status=0;}};this.OnExecuteFinish=function(data,indexInfo,jsExectute,jobInfo){var message={Data:data,IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.FINISH_EXECUTE_SCRIPT,JobInfo:jobInfo};postMessage(message);};this.OnExecuteError=function(error,indexInfo,jobData){var message={IndexInfo:indexInfo,ID:JSCHART_WORKER_MESSAGE_ID.ERROR_EXECUTE_SCRIPT,Error:error};postMessage(message);};}/********************************************************************************
15745
15745
  * 版本信息输出
15746
15746
  *
15747
- */var HQCHART_VERSION="1.1.15320";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
15747
+ */var HQCHART_VERSION="1.1.15325";function PrintHQChartVersion(){var logo='\n\n*************************************************************************************************************************************************************************** \n* \n* :%@@- \n* :@@@@- \n* =@@@@ :#@@@ .:+#@@@#=: :=*@@@@@@#+-. *@@@@. \n* :@@@@@ .@@@@@ .#@@@@@@@@@@@- +@@@@@@@@@@@@@+ @@@@@ -%@@* \n* +@@@@% #@@@@# *@@@@@@@@@@@@@@%. =@@@@@@@@@@@@@@@- @@@@@ -@@@@+ \n* %@@@@* @@@@@+ .%@@@@@@@@@@@@@@@@%: #@@@@@@@@@@@@@@@% @@@@# *@@@@= \n* @@@@@= @@@@@- .%@@@@@@@*++*%@@@@@@% .%@@@@@@@%*+==+**= -@@@@+ #@@@@- \n* @@@@@. @@@@@. #@@@@@%= =@@@@@@* %@@@@@@#: *@@@@- :::. .-+*###+: ::: .+##+: -%%@@@@@%%%% \n* .@@@@@ .@@@@@. +@@@@@% .@@@@@@ *@@@@@@: %@@@@: +@@@@@%. :%@@@@@@@@@@: *@@@ :@@@@@* @@@@@@@@@@@@ \n* :@@@@@ :@@@@@ @@@@@% :@@@@@+ @@@@@@: %@@@@-@@@@@@@@@. @@@@@@@@@@@@@. :@@@%-@@@@@@.:@@@@@@@@@@@# \n* -@@@@% -@@@@@ =@@@@@. %@@@@% %@@@@@- %@@@@@@@@@@@@@@* %@@@@@@@@@@@@+ -@@@@@@@@@@# -@@@@@@@@@@@. \n* +@@@@%=========#@@@@% @@@@@# :@@@@@ .@@@@@% @@@@@@@@%@@@@@@@ -%+:. .#@@@@* +@@@@@@@%%@. .::+@@@@#:: \n* #@@@@@@@@@@@@@@@@@@@# .@@@@@ .@@@@@ :@@@@@. @@@@@@#. #@@@@@. -@@@@* #@@@@@@: *@@@@+ \n* %@@@@@@@@@@@@@@@@@@@+ :@@@@@ .@@@@@ -@@@@@ @@@@@+ @@@@@. :@@@@* @@@@@% #@@@@- \n* @@@@@@@@@@@@@@@@@@@@: :@@@@% :@@@@@ +@@@@% -@@@@+ @@@@@ -@@@@+ @@@@@. @@@@@. \n* .@@@@@@@@@@@@@@@@@@@@ :@@@@% -@@@@% *@@@@% #@@@@. @@@@@ .=*#%%%@@@@@= :@@@@# @@@@@. \n* -@@@@@:::::::::=@@@@@ :@@@@@ @@@@@* +@@@@% @@@@@ @@@@% -#@@@@@@@@@@@@: -@@@@* @@@@@ \n* =@@@@% =@@@@% .@@@@@ :@@@@@. -@@@@% @@@@@ .@@@@* +@@@@@@@@@@@@@@. =@@@@+ .@@@@@ \n* +@@@@# +@@@@# @@@@@# %@@@@% :@@@@@ .@@@@% =@@@@= -@@@@@*-:..%@@@@ +@@@@= :@@@@# \n* *@@@@* *@@@@* +@@@@@: #@@@@@+ .@@@@@@ :@@@@% *@@@@- @@@@@. @@@@% #@@@@: =@@@@+ \n* %@@@@= %@@@@+ @@@@@@- .%@@@@@# #@@@@@# :@@@@% #@@@@: @@@@% @@@@* %@@@@. #@@@@- \n* @@@@@- @@@@@= =@@@@@@#=...-*@@@@@@@: @@@@@@%=. :+**. :@@@@* %@@@@. .@@@@* *@@@@= @@@@@ %@@@@+ \n* .@@@@@: .@@@@@: *@@@@@@@@@@@@@@@@@@@# =@@@@@@@@%%%@@@@@@ +@@@@- @@@@@ .@@@@@: :%@@@@@- .@@@@% %@@@@@*+- \n* :@@@@@ :@@@@@ +@@@@@@@@@@@@@@@@@@@# =@@@@@@@@@@@@@@@@% %@@@@ @@@@@ @@@@@@@@@@@@@@@: -@@@@* *@@@@@@@@- \n* =@@@@@ -@@@@@ :@@@@@@@@@@@@@@@@@@@# :@@@@@@@@@@@@@@@% @@@@@ %@@@% #@@@@@@@@@#@@@@. +@@@@- .@@@@@@@@# \n* *@@@@# =@@@@% :#@@@@@@@#: :@@@@@= =@@@@@@@@@@@+. @@@@@ :@@@+ *@@@@@@@- %@@@ *@@@= =@@@@@@@* \n* =++++- -++++= .:::. .=*+: :-=+++=:. ****= .=+. .-++=: :+++ -+=: .-=+=:. \n* \n* \n* HQChart \n* Ver: '+HQCHART_VERSION+' \n* License: Apache License 2.0 \n* Source: https://github.com/jones2000/HQChart\n*\n************************************************************************************************************************************************************************** \n ';console.log(logo);}PrintHQChartVersion();//把给外界调用的方法暴露出来
15748
15748
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
15749
15749
  // BaseIndex:BaseIndex,
15750
15750
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.15321",
3
+ "version": "1.1.15326",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -15111,10 +15111,9 @@ function AverageWidthFrame()
15111
15111
  }
15112
15112
  }
15113
15113
 
15114
- if (item.BG && this.DrawDayVertical)
15115
- {
15116
- this.DrawDayVertical(item, x, border);
15117
- }
15114
+ if (item.BG && this.DrawDayVertical) this.DrawDayVertical(item, x, border);
15115
+
15116
+ if (item.VBG && this.DrawBGVertical) this.DrawBGVertical(item, x, border);
15118
15117
 
15119
15118
  if (item.Message[0]!=null && this.ChartBorder.Bottom>5*pixelRatio)
15120
15119
  {
@@ -17257,6 +17256,25 @@ function MinuteFrame()
17257
17256
  }
17258
17257
  }
17259
17258
 
17259
+ this.DrawBGVertical=function(dayItem, x, border)
17260
+ {
17261
+ if (!dayItem.VBG) return;
17262
+
17263
+ var bgItem=dayItem.VBG;
17264
+ var xStart=this.GetXFromIndex(bgItem.Index.Start);
17265
+ var xEnd=this.GetXFromIndex(bgItem.Index.End);
17266
+ var maxWidth=xEnd-xStart;
17267
+
17268
+ if (bgItem.Color)
17269
+ {
17270
+ this.Canvas.fillStyle=bgItem.Color;
17271
+ var rtBG={Left:xStart, Width:maxWidth, Top:border.TopEx, Bottom:border.Bottom };
17272
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
17273
+ rtBG.Right=rtBG.Left+rtBG.Width;
17274
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
17275
+ }
17276
+ }
17277
+
17260
17278
  this.DrawDayVertical=function(dayItem, x, border)
17261
17279
  {
17262
17280
  if (!dayItem.BG) return;
@@ -19207,10 +19207,9 @@ function AverageWidthFrame()
19207
19207
  }
19208
19208
  }
19209
19209
 
19210
- if (item.BG && this.DrawDayVertical)
19211
- {
19212
- this.DrawDayVertical(item, x, border);
19213
- }
19210
+ if (item.BG && this.DrawDayVertical) this.DrawDayVertical(item, x, border);
19211
+
19212
+ if (item.VBG && this.DrawBGVertical) this.DrawBGVertical(item, x, border);
19214
19213
 
19215
19214
  if (item.Message[0]!=null && this.ChartBorder.Bottom>5*pixelRatio)
19216
19215
  {
@@ -21353,6 +21352,25 @@ function MinuteFrame()
21353
21352
  }
21354
21353
  }
21355
21354
 
21355
+ this.DrawBGVertical=function(dayItem, x, border)
21356
+ {
21357
+ if (!dayItem.VBG) return;
21358
+
21359
+ var bgItem=dayItem.VBG;
21360
+ var xStart=this.GetXFromIndex(bgItem.Index.Start);
21361
+ var xEnd=this.GetXFromIndex(bgItem.Index.End);
21362
+ var maxWidth=xEnd-xStart;
21363
+
21364
+ if (bgItem.Color)
21365
+ {
21366
+ this.Canvas.fillStyle=bgItem.Color;
21367
+ var rtBG={Left:xStart, Width:maxWidth, Top:border.TopEx, Bottom:border.Bottom };
21368
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
21369
+ rtBG.Right=rtBG.Left+rtBG.Width;
21370
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
21371
+ }
21372
+ }
21373
+
21356
21374
  this.DrawDayVertical=function(dayItem, x, border)
21357
21375
  {
21358
21376
  if (!dayItem.BG) return;
@@ -155159,7 +155177,7 @@ function ScrollBarBGChart()
155159
155177
 
155160
155178
 
155161
155179
 
155162
- var HQCHART_VERSION="1.1.15320";
155180
+ var HQCHART_VERSION="1.1.15325";
155163
155181
 
155164
155182
  function PrintHQChartVersion()
155165
155183
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.15320";
8
+ var HQCHART_VERSION="1.1.15325";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -19251,10 +19251,9 @@ function AverageWidthFrame()
19251
19251
  }
19252
19252
  }
19253
19253
 
19254
- if (item.BG && this.DrawDayVertical)
19255
- {
19256
- this.DrawDayVertical(item, x, border);
19257
- }
19254
+ if (item.BG && this.DrawDayVertical) this.DrawDayVertical(item, x, border);
19255
+
19256
+ if (item.VBG && this.DrawBGVertical) this.DrawBGVertical(item, x, border);
19258
19257
 
19259
19258
  if (item.Message[0]!=null && this.ChartBorder.Bottom>5*pixelRatio)
19260
19259
  {
@@ -21397,6 +21396,25 @@ function MinuteFrame()
21397
21396
  }
21398
21397
  }
21399
21398
 
21399
+ this.DrawBGVertical=function(dayItem, x, border)
21400
+ {
21401
+ if (!dayItem.VBG) return;
21402
+
21403
+ var bgItem=dayItem.VBG;
21404
+ var xStart=this.GetXFromIndex(bgItem.Index.Start);
21405
+ var xEnd=this.GetXFromIndex(bgItem.Index.End);
21406
+ var maxWidth=xEnd-xStart;
21407
+
21408
+ if (bgItem.Color)
21409
+ {
21410
+ this.Canvas.fillStyle=bgItem.Color;
21411
+ var rtBG={Left:xStart, Width:maxWidth, Top:border.TopEx, Bottom:border.Bottom };
21412
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
21413
+ rtBG.Right=rtBG.Left+rtBG.Width;
21414
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
21415
+ }
21416
+ }
21417
+
21400
21418
  this.DrawDayVertical=function(dayItem, x, border)
21401
21419
  {
21402
21420
  if (!dayItem.BG) return;
@@ -167218,7 +167236,7 @@ function HQChartScriptWorker()
167218
167236
 
167219
167237
 
167220
167238
 
167221
- var HQCHART_VERSION="1.1.15320";
167239
+ var HQCHART_VERSION="1.1.15325";
167222
167240
 
167223
167241
  function PrintHQChartVersion()
167224
167242
  {