hqchart 1.1.13819 → 1.1.13823

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.
@@ -2373,9 +2373,12 @@ if(item.Value>this.HorizontalMax)position=1;else if(item.Value<this.HorizontalMi
2373
2373
  this.Canvas.strokeStyle=outRange.Border.Color;this.Canvas.strokeRect(ToFixedPoint(rtBG.Left),ToFixedPoint(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));}this.Canvas.fillStyle=outRange.TextColor;this.Canvas.fillText(itemText.Text,rtBG.Right-1*pixelTatio,rtBG.Top+rtBG.Height/2+1*pixelTatio);yText+=textHeight+1;}}else if(item.Message[1]&&borderRight>=10){if(item.Font!=null)this.Canvas.font=item.Font;var textInfo=this.GetCustomItemTextInfo(item,false,pixelTatio);var textWidth=textInfo.MaxWidth;var itemRight=right+textWidth;var fontHeight=this.GetFontHeight();var textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var yText=null;if(position==1){yText=border.TopEx;if(IFrameSplitOperator.IsNumber(outRange.TopYOffset))yText+=outRange.TopYOffset;}else if(position==2){yText=border.BottomEx+textHeight;if(IFrameSplitOperator.IsNumber(outRange.BottomYOffset))yText+=outRange.BottomYOffset;}for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];var rtBG={Right:itemRight,Width:itemText.Width,Bottom:yText,Height:textHeight};rtBG.Top=rtBG.Bottom-rtBG.Height;rtBG.Left=rtBG.Right-rtBG.Width;if(item.ExtendLine&&item.ExtendLine[1])//右侧延长线
2374
2374
  {var exLine=item.ExtendLine[1];if(IFrameSplitOperator.IsNumber(exLine.Width)){var yLine=rtBG.Bottom;if(position==2)yLine=rtBG.Top;var lineType=item.LineType;if(IFrameSplitOperator.IsNumber(outRange.ExtendLine.Type))lineType=outRange.ExtendLine.Type;if(i==0)this.DrawLine(right,right+exLine.Width,yLine,item.LineColor,lineType,item);rtBG.Left+=exLine.Width;rtBG.Right+=exLine.Width;}}this.Canvas.fillStyle=outRange.BGColor;this.Canvas.fillRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);if(outRange.Border&&outRange.Border.Color){if(IFrameSplitOperator.IsNonEmptyArray(outRange.Border.LineDash))this.Canvas.setLineDash(outRange.Border.LineDash);//虚线
2375
2375
  this.Canvas.strokeStyle=outRange.Border.Color;this.Canvas.strokeRect(ToFixedPoint(rtBG.Left),ToFixedPoint(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));}this.Canvas.fillStyle=outRange.TextColor;this.Canvas.fillText(itemText.Text,rtBG.Left+1*pixelTatio,rtBG.Top+rtBG.Height/2+1*pixelTatio);yText+=textHeight+1;}}this.Canvas.restore();};this.DrawCustomItem=function(item,mapTextRect)//显示自定义Y刻度
2376
- {if(!item.Message[1]&&!item.Message[0])return;if(item.Value>this.HorizontalMax||item.Value<this.HorizontalMin){this.DrawOutRangeCustomItem(item,mapTextRect);this.SendDrawCountDownEvent({IsShow:false});return;}var border=this.GetBorder();var left=border.Left;var right=border.Right;var bottom=border.Bottom;var top=border.Top;var borderRight=this.ChartBorder.Right;var borderLeft=this.ChartBorder.Left;var titleHeight=this.ChartBorder.TitleHeight;if(this.IsHScreen){borderLeft=this.ChartBorder.Top;borderRight=this.ChartBorder.Bottom;top=border.Top;bottom=border.Bottom;}var pixelTatio=GetDevicePixelRatio();var defaultTextHeight=18*pixelTatio;var textHeight=defaultTextHeight;var y;if(item.Value=="TopEx")y=border.TopEx;else if(item.Value=="TopTitle")y=border.TopTitle;else if(item.Value=="Top")y=border.Top;else if(item.Value=="BottomEx")y=border.BottomEx;else if(item.Value=="Bottom")y=border.Bottom;else y=this.GetYFromData(item.Value);if(IFrameSplitOperator.IsNumber(item.YOffset))y+=item.YOffset;var position=0;var emptyBGColor;if(item.ExtendData&&item.ExtendData.Custom){var customItem=item.ExtendData.Custom;if(IFrameSplitOperator.IsNumber(customItem.Position))position=customItem.Position;if(customItem.EmptyBGColor)emptyBGColor=customItem.EmptyBGColor;}if(item.Message[0])// 左
2377
- {if(borderLeft<10||position==1){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,true,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
2378
- var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){var bgTop=top;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(bgTop+itemText.Width,bottom,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){}else{var bgTop=yText-textHeight/2-1*pixelTatio;var textLeft=left+1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft+1*pixelTatio,yText);if(i==0)this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;}}}}else{if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="right";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,true,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){if(i==0)var bgTop=top-itemText.Width;else var bgTop=top-textWidth;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(bgTop+itemText.Width,bottom,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{var bgTop=yText-textHeight/2-1*pixelTatio;if(i==0){var rectLeft=left-itemText.Width;var textLeft=left;}else{var rectLeft=left-textWidth;var textLeft=left-(textWidth-itemText.Width);}if(item.ExtendLine&&item.ExtendLine[0])//右侧延长线
2376
+ {if(!item.Message[1]&&!item.Message[0])return;if(item.Value>this.HorizontalMax||item.Value<this.HorizontalMin){this.DrawOutRangeCustomItem(item,mapTextRect);this.SendDrawCountDownEvent({IsShow:false});return;}var border=this.GetBorder();var left=border.Left;var right=border.Right;var bottom=border.Bottom;var top=border.Top;var borderRight=this.ChartBorder.Right;var borderLeft=this.ChartBorder.Left;var titleHeight=this.ChartBorder.TitleHeight;if(this.IsHScreen){borderLeft=this.ChartBorder.Top;borderRight=this.ChartBorder.Bottom;top=border.Top;bottom=border.Bottom;}var pixelTatio=GetDevicePixelRatio();var defaultTextHeight=18*pixelTatio;var textHeight=defaultTextHeight;var y;if(item.Value=="TopEx")y=border.TopEx;else if(item.Value=="TopTitle")y=border.TopTitle;else if(item.Value=="Top")y=border.Top;else if(item.Value=="BottomEx")y=border.BottomEx;else if(item.Value=="Bottom")y=border.Bottom;else y=this.GetYFromData(item.Value);if(IFrameSplitOperator.IsNumber(item.YOffset))y+=item.YOffset;var position=0;var emptyBGColor;if(item.ExtendData&&item.ExtendData.Custom){var customItem=item.ExtendData.Custom;if(IFrameSplitOperator.IsNumber(customItem.Position))position=customItem.Position;if(customItem.EmptyBGColor)emptyBGColor=customItem.EmptyBGColor;}if(item.Message[0])// 左 position=2 集合竞价右侧
2377
+ {if(borderLeft<10||position==1||position==2){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,true,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
2378
+ if(item.BGColor)bgColor=item.BGColor;var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){var bgTop=top;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(bgTop+itemText.Width,bottom,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{if(itemText.Type===1){}else{if(position==2)left=border.LeftEx-textInfo.MaxWidth;var bgTop=yText-textHeight/2-1*pixelTatio;var textLeft=left+1*pixelTatio;if(item.ExtendLine&&item.ExtendLine[0]&&position==2)//左侧延长线
2379
+ {var exLine=item.ExtendLine[0];if(IFrameSplitOperator.IsNumber(exLine.Width)){var lineType=item.LineType;if(IFrameSplitOperator.IsNumber(exLine.Type))lineType=exLine.Type;//外部设置延长线样式
2380
+ if(i==0){var yLine=border.LeftEx-exLine.Width;this.DrawLine(yLine,yLine+exLine.Width,y,item.LineColor,lineType,item);}textLeft-=exLine.Width;//rectLeft-=exLine.Width
2381
+ }}this.Canvas.fillStyle=bgColor;this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft+1*pixelTatio,yText);if(i==0){if(position==2)this.DrawLine(border.LeftEx,right,yText,item.LineColor,item.LineType,item);else this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);}yText+=textHeight+1*pixelTatio;}}}}else{if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="right";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,true,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var yText=y;for(var i=0;i<textInfo.Text.length;++i){var itemText=textInfo.Text[i];if(this.IsHScreen){if(i==0)var bgTop=top-itemText.Width;else var bgTop=top-textWidth;var textLeft=yText-textHeight/2-1*pixelTatio;this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(textLeft,bgTop,textHeight,itemText.Width);this.DrawHScreenText({X:yText,Y:bgTop},{Text:itemText.Text,Color:item.TextColor,XOffset:1*pixelTatio,YOffset:2*pixelTatio});if(i==0)this.DrawLine(bgTop+itemText.Width,bottom,yText,item.LineColor,item.LineType,item);yText-=textHeight+1*pixelTatio;}else{var bgTop=yText-textHeight/2-1*pixelTatio;if(i==0){var rectLeft=left-itemText.Width;var textLeft=left;}else{var rectLeft=left-textWidth;var textLeft=left-(textWidth-itemText.Width);}if(item.ExtendLine&&item.ExtendLine[0])//右侧延长线
2379
2382
  {var exLine=item.ExtendLine[0];if(IFrameSplitOperator.IsNumber(exLine.Width)){var lineType=item.LineType;if(IFrameSplitOperator.IsNumber(exLine.Type))lineType=exLine.Type;//外部设置延长线样式
2380
2383
  if(i==0)this.DrawLine(left,left-exLine.Width,y,item.LineColor,lineType,item);textLeft-=exLine.Width;rectLeft-=exLine.Width;}}if(emptyBGColor){this.Canvas.fillStyle=emptyBGColor;this.Canvas.fillRect(rectLeft-1,bgTop,itemText.Width+1,textHeight);this.Canvas.strokeStyle=item.LineColor;this.Canvas.strokeRect(ToFixedPoint(rectLeft-1),ToFixedPoint(bgTop),ToFixedPoint(itemText.Width+1),ToFixedPoint(textHeight));this.Canvas.fillStyle=item.LineColor;this.Canvas.fillText(itemText.Text,textLeft-1*pixelTatio,yText);}else{this.Canvas.fillStyle=item.LineColor;this.Canvas.fillRect(rectLeft,bgTop,itemText.Width,textHeight);this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(itemText.Text,textLeft-1*pixelTatio,yText);}if(i==0)this.DrawLine(left,right,yText,item.LineColor,item.LineType,item);yText+=textHeight+1*pixelTatio;}}}}else if(item.Message[1])//右
2381
2384
  {if(borderRight<10||position==1){if(item.Font!=null)this.Canvas.font=item.Font;this.Canvas.textAlign="left";this.Canvas.textBaseline="middle";var textInfo=this.GetCustomItemTextInfo(item,false,pixelTatio);var textWidth=textInfo.MaxWidth;var fontHeight=this.GetFontHeight();textHeight=fontHeight>defaultTextHeight?fontHeight:defaultTextHeight;var bgColor=item.LineColor;var rgb=this.RGBToStruct(item.LineColor);if(rgb)bgColor='rgba('+rgb.R+', '+rgb.G+', '+rgb.B+', '+g_JSChartResource.FrameLatestPrice.BGAlpha+')';//内部刻度 背景增加透明度
@@ -13737,7 +13740,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13737
13740
  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);};}/********************************************************************************
13738
13741
  * 版本信息输出
13739
13742
  *
13740
- */var HQCHART_VERSION="1.1.13818";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();//把给外界调用的方法暴露出来
13743
+ */var HQCHART_VERSION="1.1.13822";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();//把给外界调用的方法暴露出来
13741
13744
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13742
13745
  // BaseIndex:BaseIndex,
13743
13746
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.13819",
3
+ "version": "1.1.13823",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -12538,9 +12538,9 @@ function AverageWidthFrame()
12538
12538
  if (customItem.EmptyBGColor) emptyBGColor=customItem.EmptyBGColor;
12539
12539
  }
12540
12540
 
12541
- if (item.Message[0]) // 左
12541
+ if (item.Message[0]) // 左 position=2 集合竞价右侧
12542
12542
  {
12543
- if (borderLeft<10 || position==1)
12543
+ if (borderLeft<10 || position==1 || position==2)
12544
12544
  {
12545
12545
  if (item.Font != null) this.Canvas.font = item.Font;
12546
12546
  this.Canvas.textAlign = "left";
@@ -12552,6 +12552,7 @@ function AverageWidthFrame()
12552
12552
  var bgColor=item.LineColor;
12553
12553
  var rgb=this.RGBToStruct(item.LineColor);
12554
12554
  if (rgb) bgColor=`rgba(${rgb.R}, ${rgb.G}, ${rgb.B}, ${g_JSChartResource.FrameLatestPrice.BGAlpha})`; //内部刻度 背景增加透明度
12555
+ if (item.BGColor) bgColor=item.BGColor;
12555
12556
 
12556
12557
  var yText=y;
12557
12558
  for(var i=0;i<textInfo.Text.length;++i)
@@ -12576,13 +12577,37 @@ function AverageWidthFrame()
12576
12577
  }
12577
12578
  else
12578
12579
  {
12580
+ if (position==2) left=border.LeftEx-textInfo.MaxWidth;
12581
+
12579
12582
  var bgTop=yText-textHeight/2-1*pixelTatio;
12580
- var textLeft=left + 1*pixelTatio
12583
+ var textLeft=left + 1*pixelTatio;
12584
+
12585
+ if (item.ExtendLine && item.ExtendLine[0] && position==2) //左侧延长线
12586
+ {
12587
+ var exLine=item.ExtendLine[0];
12588
+ if (IFrameSplitOperator.IsNumber(exLine.Width))
12589
+ {
12590
+ var lineType=item.LineType;
12591
+ if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
12592
+ if (i==0)
12593
+ {
12594
+ var yLine=border.LeftEx-exLine.Width;
12595
+ this.DrawLine(yLine,yLine+exLine.Width,y,item.LineColor,lineType,item);
12596
+ }
12597
+ textLeft-=exLine.Width;
12598
+ //rectLeft-=exLine.Width
12599
+ }
12600
+ }
12601
+
12581
12602
  this.Canvas.fillStyle=bgColor;
12582
12603
  this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);
12583
12604
  this.Canvas.fillStyle = item.TextColor;
12584
12605
  this.Canvas.fillText(itemText.Text, textLeft + 1*pixelTatio, yText);
12585
- if (i==0) this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);
12606
+ if (i==0)
12607
+ {
12608
+ if (position==2) this.DrawLine(border.LeftEx,right,yText,item.LineColor,item.LineType,item);
12609
+ else this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);
12610
+ }
12586
12611
 
12587
12612
  yText+=textHeight+1*pixelTatio;
12588
12613
  }
@@ -16463,9 +16463,9 @@ function AverageWidthFrame()
16463
16463
  if (customItem.EmptyBGColor) emptyBGColor=customItem.EmptyBGColor;
16464
16464
  }
16465
16465
 
16466
- if (item.Message[0]) // 左
16466
+ if (item.Message[0]) // 左 position=2 集合竞价右侧
16467
16467
  {
16468
- if (borderLeft<10 || position==1)
16468
+ if (borderLeft<10 || position==1 || position==2)
16469
16469
  {
16470
16470
  if (item.Font != null) this.Canvas.font = item.Font;
16471
16471
  this.Canvas.textAlign = "left";
@@ -16477,6 +16477,7 @@ function AverageWidthFrame()
16477
16477
  var bgColor=item.LineColor;
16478
16478
  var rgb=this.RGBToStruct(item.LineColor);
16479
16479
  if (rgb) bgColor=`rgba(${rgb.R}, ${rgb.G}, ${rgb.B}, ${g_JSChartResource.FrameLatestPrice.BGAlpha})`; //内部刻度 背景增加透明度
16480
+ if (item.BGColor) bgColor=item.BGColor;
16480
16481
 
16481
16482
  var yText=y;
16482
16483
  for(var i=0;i<textInfo.Text.length;++i)
@@ -16501,13 +16502,37 @@ function AverageWidthFrame()
16501
16502
  }
16502
16503
  else
16503
16504
  {
16505
+ if (position==2) left=border.LeftEx-textInfo.MaxWidth;
16506
+
16504
16507
  var bgTop=yText-textHeight/2-1*pixelTatio;
16505
- var textLeft=left + 1*pixelTatio
16508
+ var textLeft=left + 1*pixelTatio;
16509
+
16510
+ if (item.ExtendLine && item.ExtendLine[0] && position==2) //左侧延长线
16511
+ {
16512
+ var exLine=item.ExtendLine[0];
16513
+ if (IFrameSplitOperator.IsNumber(exLine.Width))
16514
+ {
16515
+ var lineType=item.LineType;
16516
+ if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
16517
+ if (i==0)
16518
+ {
16519
+ var yLine=border.LeftEx-exLine.Width;
16520
+ this.DrawLine(yLine,yLine+exLine.Width,y,item.LineColor,lineType,item);
16521
+ }
16522
+ textLeft-=exLine.Width;
16523
+ //rectLeft-=exLine.Width
16524
+ }
16525
+ }
16526
+
16506
16527
  this.Canvas.fillStyle=bgColor;
16507
16528
  this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);
16508
16529
  this.Canvas.fillStyle = item.TextColor;
16509
16530
  this.Canvas.fillText(itemText.Text, textLeft + 1*pixelTatio, yText);
16510
- if (i==0) this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);
16531
+ if (i==0)
16532
+ {
16533
+ if (position==2) this.DrawLine(border.LeftEx,right,yText,item.LineColor,item.LineType,item);
16534
+ else this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);
16535
+ }
16511
16536
 
16512
16537
  yText+=textHeight+1*pixelTatio;
16513
16538
  }
@@ -138242,7 +138267,7 @@ function ScrollBarBGChart()
138242
138267
 
138243
138268
 
138244
138269
 
138245
- var HQCHART_VERSION="1.1.13818";
138270
+ var HQCHART_VERSION="1.1.13822";
138246
138271
 
138247
138272
  function PrintHQChartVersion()
138248
138273
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13818";
8
+ var HQCHART_VERSION="1.1.13822";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -16507,9 +16507,9 @@ function AverageWidthFrame()
16507
16507
  if (customItem.EmptyBGColor) emptyBGColor=customItem.EmptyBGColor;
16508
16508
  }
16509
16509
 
16510
- if (item.Message[0]) // 左
16510
+ if (item.Message[0]) // 左 position=2 集合竞价右侧
16511
16511
  {
16512
- if (borderLeft<10 || position==1)
16512
+ if (borderLeft<10 || position==1 || position==2)
16513
16513
  {
16514
16514
  if (item.Font != null) this.Canvas.font = item.Font;
16515
16515
  this.Canvas.textAlign = "left";
@@ -16521,6 +16521,7 @@ function AverageWidthFrame()
16521
16521
  var bgColor=item.LineColor;
16522
16522
  var rgb=this.RGBToStruct(item.LineColor);
16523
16523
  if (rgb) bgColor=`rgba(${rgb.R}, ${rgb.G}, ${rgb.B}, ${g_JSChartResource.FrameLatestPrice.BGAlpha})`; //内部刻度 背景增加透明度
16524
+ if (item.BGColor) bgColor=item.BGColor;
16524
16525
 
16525
16526
  var yText=y;
16526
16527
  for(var i=0;i<textInfo.Text.length;++i)
@@ -16545,13 +16546,37 @@ function AverageWidthFrame()
16545
16546
  }
16546
16547
  else
16547
16548
  {
16549
+ if (position==2) left=border.LeftEx-textInfo.MaxWidth;
16550
+
16548
16551
  var bgTop=yText-textHeight/2-1*pixelTatio;
16549
- var textLeft=left + 1*pixelTatio
16552
+ var textLeft=left + 1*pixelTatio;
16553
+
16554
+ if (item.ExtendLine && item.ExtendLine[0] && position==2) //左侧延长线
16555
+ {
16556
+ var exLine=item.ExtendLine[0];
16557
+ if (IFrameSplitOperator.IsNumber(exLine.Width))
16558
+ {
16559
+ var lineType=item.LineType;
16560
+ if (IFrameSplitOperator.IsNumber(exLine.Type)) lineType=exLine.Type; //外部设置延长线样式
16561
+ if (i==0)
16562
+ {
16563
+ var yLine=border.LeftEx-exLine.Width;
16564
+ this.DrawLine(yLine,yLine+exLine.Width,y,item.LineColor,lineType,item);
16565
+ }
16566
+ textLeft-=exLine.Width;
16567
+ //rectLeft-=exLine.Width
16568
+ }
16569
+ }
16570
+
16550
16571
  this.Canvas.fillStyle=bgColor;
16551
16572
  this.Canvas.fillRect(textLeft,bgTop,itemText.Width,textHeight);
16552
16573
  this.Canvas.fillStyle = item.TextColor;
16553
16574
  this.Canvas.fillText(itemText.Text, textLeft + 1*pixelTatio, yText);
16554
- if (i==0) this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);
16575
+ if (i==0)
16576
+ {
16577
+ if (position==2) this.DrawLine(border.LeftEx,right,yText,item.LineColor,item.LineType,item);
16578
+ else this.DrawLine(textLeft+itemText.Width,right,yText,item.LineColor,item.LineType,item);
16579
+ }
16555
16580
 
16556
16581
  yText+=textHeight+1*pixelTatio;
16557
16582
  }
@@ -142798,7 +142823,7 @@ function HQChartScriptWorker()
142798
142823
 
142799
142824
 
142800
142825
 
142801
- var HQCHART_VERSION="1.1.13818";
142826
+ var HQCHART_VERSION="1.1.13822";
142802
142827
 
142803
142828
  function PrintHQChartVersion()
142804
142829
  {