hqchart 1.1.14254 → 1.1.14256

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.
@@ -5998,7 +5998,7 @@ this.LineWidth=1;this.Precision=2;//小数位数
5998
5998
  this.ValueTextColor='rgb(250,250,250)';this.IsShowCorssCursor=true;//画的时候是否显示十字光标
5999
5999
  this.GetLabelCallback;//绘制标题回调函数
6000
6000
  this.PointCount=1;this.ClassName='ChartDrawHLine';this.Font=14*GetDevicePixelRatio()+"px 微软雅黑";this.TextFont=12*GetDevicePixelRatio()+"px 微软雅黑";this.RightSpaceWidth=50;this.ButtonPosition=0;//按钮位置, 0=价格后面, 1=价格上面 2=价格上面 左对齐 3=垂直排列
6001
- this.ButtonBGColor='rgb(190,190,190)';this.ButtonSpace=3;this.TextMargin={Left:0,Right:0,Top:0,Bottom:0,YOffset:4*GetDevicePixelRatio()};this.AlwaysShowLab=false;//总是显示标签
6001
+ this.ButtonBGColor='rgb(190,190,190)';this.ButtonSpace=3;this.TopOffset=3;this.TextMargin={Left:0,Right:0,Top:0,Bottom:0,YOffset:4*GetDevicePixelRatio()};this.AlwaysShowLab=false;//总是显示标签
6002
6002
  this.Button={CloseIcon:{Text:'\uE62B',Color:'rgb(255,255,255)',Family:"iconfont",Size:16,ID:JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE,TooltipText:null,Margin:{Left:2,Right:2}},SettingIcon:{Text:'\uE623',Color:'rgb(255,255,255)',Family:"iconfont",Size:16,ID:JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING,TooltipText:null,Margin:{Left:2,Right:2}//修改ID, Text , TooltipText 可以外部定制按钮
6003
6003
  }};this.CustomButton=[];//自定义的按钮 { Text:'\ue62b', Color:'rgb(255,255,255)', Family:"iconfont", Size:16, ID:JSCHART_BUTTON_ID.DRAW_PICTURE_BUTTON_1, TooltipText:null, Data:null }
6004
6004
  this.AryShowButton=[];//需要显示的按钮 { Data:, Width }
@@ -6007,7 +6007,7 @@ this.ShowPriceTextConfig={IsShow:[false,false,true],//[0]=left内 [1]=right内 [
6007
6007
  Font:[12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1',12*GetDevicePixelRatio()+'px \u5FAE\u8F6F\u96C5\u9ED1']};this.LableInfo;//{ Position:2=右侧外部 }
6008
6008
  //内部变量
6009
6009
  this.ColseButtonSize=0;this.SettingButtonSize=0;this.ButtonBGWidth=0;this.VerticalButtonInfo={Width:0,Height:0};//垂直按钮信息
6010
- this.IsPointIn=this.IsPointIn_XYValue_Line;this.SetOption=function(option){if(this.Super_SetOption)this.Super_SetOption(option);if(option){if(option.GetLabelCallback){this.GetLabelCallback=option.GetLabelCallback;}if(IFrameSplitOperator.IsNumber(option.Precision))this.Precision=option.Precision;if(option.Font)this.Font=option.Font;if(option.ValueTextColor)this.ValueTextColor=option.ValueTextColor;if(option.ButtonBGColor)this.ButtonBGColor=option.ButtonBGColor;if(IFrameSplitOperator.IsNumber(option.ButtonPosition))this.ButtonPosition=option.ButtonPosition;if(IFrameSplitOperator.IsNumber(option.RightSpaceWidth))this.RightSpaceWidth=option.RightSpaceWidth;if(IFrameSplitOperator.IsBool(option.AlwaysShowLab))this.AlwaysShowLab=option.AlwaysShowLab;if(option.Button){var item=option.Button;if(item.CloseIcon){this.Button.CloseIcon=CloneData(item.CloseIcon);if(!this.Button.CloseIcon.ID)this.Button.CloseIcon.ID=JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE;}else if(item.CloseIcon===null){this.Button.CloseIcon=null;}if(item.SettingIcon){this.Button.SettingIcon=CloneData(item.SettingIcon);if(!this.Button.SettingIcon.ID)this.Button.SettingIcon.ID=JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING;}else if(item.SettingIcon===null){this.Button.SettingIcon=null;}}if(option.ExtendData)this.ExtendData=option.ExtendData;if(IFrameSplitOperator.IsNonEmptyArray(option.IsShowPriceText)){for(var i=0;i<option.IsShowPriceText.length&&i<3;++i){var value=option.IsShowPriceText[i];if(IFrameSplitOperator.IsBool(value))this.ShowPriceTextConfig.IsShow[i]=value;}}if(option.TextMargin){var item=option.TextMargin;if(IFrameSplitOperator.IsNumber(item.Left))this.TextMargin.Left=item.Left;if(IFrameSplitOperator.IsNumber(item.Right))this.TextMargin.Right=item.Right;if(IFrameSplitOperator.IsNumber(item.Top))this.TextMargin.Top=item.Top;if(IFrameSplitOperator.IsNumber(item.Bottom))this.TextMargin.Bottom=item.Bottom;if(IFrameSplitOperator.IsNumber(item.YOffset))this.TextMargin.YOffset=item.YOffset;}}};this.ExportStorageData=function(){var storageData;if(this.Super_ExportStorageData){storageData=this.Super_ExportStorageData();if(this.Label)storageData.Label=this.Label;}return storageData;};/*
6010
+ this.IsPointIn=this.IsPointIn_XYValue_Line;this.SetOption=function(option){if(this.Super_SetOption)this.Super_SetOption(option);if(option){if(option.GetLabelCallback){this.GetLabelCallback=option.GetLabelCallback;}if(IFrameSplitOperator.IsNumber(option.Precision))this.Precision=option.Precision;if(option.Font)this.Font=option.Font;if(option.ValueTextColor)this.ValueTextColor=option.ValueTextColor;if(option.ButtonBGColor)this.ButtonBGColor=option.ButtonBGColor;if(IFrameSplitOperator.IsNumber(option.ButtonPosition))this.ButtonPosition=option.ButtonPosition;if(IFrameSplitOperator.IsNumber(option.RightSpaceWidth))this.RightSpaceWidth=option.RightSpaceWidth;if(IFrameSplitOperator.IsBool(option.AlwaysShowLab))this.AlwaysShowLab=option.AlwaysShowLab;if(IFrameSplitOperator.IsNumber(option.TopOffset))this.TopOffset=option.TopOffset;if(option.Button){var item=option.Button;if(item.CloseIcon){this.Button.CloseIcon=CloneData(item.CloseIcon);if(!this.Button.CloseIcon.ID)this.Button.CloseIcon.ID=JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE;}else if(item.CloseIcon===null){this.Button.CloseIcon=null;}if(item.SettingIcon){this.Button.SettingIcon=CloneData(item.SettingIcon);if(!this.Button.SettingIcon.ID)this.Button.SettingIcon.ID=JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING;}else if(item.SettingIcon===null){this.Button.SettingIcon=null;}}if(option.ExtendData)this.ExtendData=option.ExtendData;if(IFrameSplitOperator.IsNonEmptyArray(option.IsShowPriceText)){for(var i=0;i<option.IsShowPriceText.length&&i<3;++i){var value=option.IsShowPriceText[i];if(IFrameSplitOperator.IsBool(value))this.ShowPriceTextConfig.IsShow[i]=value;}}if(option.TextMargin){var item=option.TextMargin;if(IFrameSplitOperator.IsNumber(item.Left))this.TextMargin.Left=item.Left;if(IFrameSplitOperator.IsNumber(item.Right))this.TextMargin.Right=item.Right;if(IFrameSplitOperator.IsNumber(item.Top))this.TextMargin.Top=item.Top;if(IFrameSplitOperator.IsNumber(item.Bottom))this.TextMargin.Bottom=item.Bottom;if(IFrameSplitOperator.IsNumber(item.YOffset))this.TextMargin.YOffset=item.YOffset;}}};this.ExportStorageData=function(){var storageData;if(this.Super_ExportStorageData){storageData=this.Super_ExportStorageData();if(this.Label)storageData.Label=this.Label;}return storageData;};/*
6011
6011
  this.GetXYCoordinate=function()
6012
6012
  {
6013
6013
  if (this.IsFrameMinSize()) return null;
@@ -6030,7 +6030,7 @@ if(moveonPoint&&mouseStatus){for(var i=0;i<this.AryButton.length;++i){var item=t
6030
6030
  this.DrawInternalLabel=function(y){if(!this.LableInfo||!IFrameSplitOperator.IsNonEmptyArray(this.LableInfo.AryText))return;if(this.LableInfo.Position==2)return;var border=this.Frame.GetBorder();var left=border.Left;var right=border.Right;var labSize=this.CalculateLabSize(this.LableInfo);var drawLeft=right-labSize.Width;var drawRight=drawLeft+labSize.Width;var drawTop=y-labSize.Height-1;if(drawTop<=border.TopEx)drawTop=y+1;var rtLabel={Left:drawLeft,Right:drawRight,Top:drawTop,Width:labSize.Width,Height:labSize.Height};rtLabel.Bottom=rtLabel.Top+rtLabel.Height;this.DrawLabel(this.LableInfo,labSize,rtLabel);};//绘制标签页
6031
6031
  this.DrawLabel=function(labelInfo,labelSize,rtLabel){//背景色
6032
6032
  if(labelInfo.BGColor){this.Canvas.fillStyle=labelInfo.BGColor;this.Canvas.fillRect(ToFixedRect(rtLabel.Left),ToFixedRect(rtLabel.Top),ToFixedRect(rtLabel.Width),ToFixedRect(rtLabel.Height));}var labelMargin=labelInfo.LabelMargin;var lineSpace=0;if(IFrameSplitOperator.IsNumber(labelInfo.LineSpace))lineSpace=labelInfo.LineSpace;var yText=rtLabel.Top;var xText=rtLabel.Left;var yRightText=rtLabel.Right;if(labelMargin){if(IFrameSplitOperator.IsNumber(labelMargin.Left))xText+=labelMargin.Left;if(IFrameSplitOperator.IsNumber(labelMargin.Right))yRightText-=labelMargin.Right;if(IFrameSplitOperator.IsNumber(labelMargin.Top))yText+=labelMargin.Top;}this.Canvas.font=this.TextFont;this.Canvas.textBaseline="top";for(var i=0;i<labelInfo.AryText.length;++i){if(i>0)yText+=lineSpace;var item=labelInfo.AryText[i];if(item.Name){this.Canvas.textAlign="left";this.Canvas.fillStyle=item.NameColor;this.Canvas.fillText(item.Name,xText,yText);}if(item.Text){this.Canvas.textAlign="right";this.Canvas.fillStyle=item.TextColor;this.Canvas.fillText(item.Text,yRightText,yText);}yText+=labelSize.LineHeight;}};this.DrawRightLabel=function(y){var rtDraw={};if(!this.LableInfo||!IFrameSplitOperator.IsNonEmptyArray(this.LableInfo.AryText)||this.LableInfo.Position!=2){this.DrawValueText(y,rtDraw);return;}var priceSize=this.CalculateValueText(y);var labSize=this.CalculateLabSize(this.LableInfo);var border=this.Frame.GetBorder();var yTop=y-priceSize.Height/2;var totalHeight=priceSize.Height+labSize.Height;var yBottom=yTop+totalHeight;var option={};if(yBottom>border.Bottom)//超过窗口底部, 标签位置不动
6033
- {yBottom=border.Bottom;yTop=yBottom-totalHeight;option.Top=yTop;}this.DrawValueText(y,rtDraw,option);var drawLeft=rtDraw.Right-labSize.Width;if(drawLeft<rtDraw.Left)drawLeft=rtDraw.Left;var drawRight=drawLeft+labSize.Width;var drawTop=rtDraw.Bottom;var rtLabel={Left:drawLeft,Right:drawRight,Top:drawTop,Width:labSize.Width,Height:labSize.Height};rtLabel.Bottom=rtLabel.Top+rtLabel.Height;this.DrawLabel(this.LableInfo,labSize,rtLabel);this.DrawVerticalButton(rtLabel);};this.DrawCustomHLine=function(yLine){if(!this.LableInfo)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.LableInfo.AryLine))return;var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var pixelRatio=GetDevicePixelRatio();var yMax=yLine,yMin=yLine;for(var i=0;i<this.LableInfo.AryLine.length;++i){var item=this.LableInfo.AryLine[i];if(!IFrameSplitOperator.IsNumber(item.Value))continue;if(item.Width<0)continue;var y=this.Frame.GetYFromData(item.Value);var yFixed=ToFixedPoint(y);var xRight=right;if(IFrameSplitOperator.IsPlusNumber(item.Width)){if(item.Width<1)xRight=left+item.Width*(right-left);//0.3 百分比
6033
+ {yBottom=border.Bottom;yTop=yBottom-totalHeight;if(yTop<this.TopOffset){yTop=this.TopOffset;yBottom=yTop+totalHeight;}option.Top=yTop;}this.DrawValueText(y,rtDraw,option);var drawLeft=rtDraw.Right-labSize.Width;if(drawLeft<rtDraw.Left)drawLeft=rtDraw.Left;var drawRight=drawLeft+labSize.Width;var drawTop=rtDraw.Bottom;var rtLabel={Left:drawLeft,Right:drawRight,Top:drawTop,Width:labSize.Width,Height:labSize.Height};rtLabel.Bottom=rtLabel.Top+rtLabel.Height;this.DrawLabel(this.LableInfo,labSize,rtLabel);this.DrawVerticalButton(rtLabel);};this.DrawCustomHLine=function(yLine){if(!this.LableInfo)return;if(!IFrameSplitOperator.IsNonEmptyArray(this.LableInfo.AryLine))return;var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var pixelRatio=GetDevicePixelRatio();var yMax=yLine,yMin=yLine;for(var i=0;i<this.LableInfo.AryLine.length;++i){var item=this.LableInfo.AryLine[i];if(!IFrameSplitOperator.IsNumber(item.Value))continue;if(item.Width<0)continue;var y=this.Frame.GetYFromData(item.Value);var yFixed=ToFixedPoint(y);var xRight=right;if(IFrameSplitOperator.IsPlusNumber(item.Width)){if(item.Width<1)xRight=left+item.Width*(right-left);//0.3 百分比
6034
6034
  else xRight=left+item.Width*pixelRatio;//>1 实际数值就是长度
6035
6035
  }if(item.Color)this.Canvas.strokeStyle=item.Color;else this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(left,yFixed);this.Canvas.lineTo(xRight,yFixed);this.Canvas.stroke();if(yMax<yFixed)yMax=yFixed;if(yMin>yFixed)yMin=yFixed;}if(yMax!=yMin&&this.LableInfo.VLine){var item=this.LableInfo.VLine;var x=left+20*pixelRatio;if(IFrameSplitOperator.IsNumber(item.XOffset))x=left+item.XOffset*pixelRatio;x=ToFixedPoint(x);if(item.Color)this.Canvas.strokeStyle=item.Color;else this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(x,yMax);this.Canvas.lineTo(x,yMin);this.Canvas.stroke();}};this.DrawValueText=function(y,rtDraw,option){var left=this.Frame.ChartBorder.GetLeft();var right=this.Frame.ChartBorder.GetRight();var top=this.Frame.ChartBorder.GetTopEx();var bottom=this.Frame.ChartBorder.GetBottomEx();var pixelTatio=GetDevicePixelRatio();var labInfo=this.LabelInfo;if(labInfo&&IFrameSplitOperator.IsNumber(labInfo.TopOffset))top-=labInfo.TopOffset;if(labInfo&&IFrameSplitOperator.IsNumber(labInfo.BottomOffset))bottom+=labInfo.BottomOffset;var yValue=this.Frame.GetYData(y,false);var strValue=yValue.toFixed(this.Precision);if(labInfo&&labInfo.PriceSuffixText)strValue+=labInfo.PriceSuffixText;var bVisibleRange=true;if(y<top){y=top;bVisibleRange=false;}else if(y>bottom){y=bottom;bVisibleRange=false;}if(this.RightSpaceWidth>0){if(!bVisibleRange)this.Canvas.setLineDash([2*pixelTatio,3*pixelTatio]);//虚线
6036
6036
  this.Canvas.strokeStyle=this.LineColor;this.Canvas.beginPath();this.Canvas.moveTo(right,ToFixedPoint(y));this.Canvas.lineTo(right+this.RightSpaceWidth,ToFixedPoint(y));this.Canvas.stroke();if(!bVisibleRange)this.Canvas.setLineDash([]);}this.Canvas.fillStyle=this.LineColor;this.Canvas.font=this.Font;var textWidth=this.Canvas.measureText(strValue).width;var lineHeight=this.GetFontHeight();var rtBG={Left:right+this.RightSpaceWidth,YCenter:y,Width:textWidth,Height:lineHeight};rtBG.Height+=this.TextMargin.Top+this.TextMargin.Bottom;rtBG.Width+=this.TextMargin.Left+this.TextMargin.Right;rtBG.Right=rtBG.Left+rtBG.Width;rtBG.Top=rtBG.YCenter-rtBG.Height/2;rtBG.Bottom=rtBG.Top+rtBG.Height;if(option&&IFrameSplitOperator.IsNumber(option.Top)){rtBG.Top=option.Top;rtBG.Bottom=rtBG.Top+rtBG.Height;}var xText=rtBG.Left+this.TextMargin.Left;var yText=rtBG.Top+this.TextMargin.Top+this.TextMargin.YOffset;if(this.ButtonPosition==1){this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width+this.ButtonBGWidth),ToFixedRect(rtBG.Height));}else{this.Canvas.fillRect(ToFixedRect(rtBG.Left),ToFixedRect(rtBG.Top),ToFixedRect(rtBG.Width),ToFixedRect(rtBG.Height));}this.Canvas.fillStyle=this.ValueTextColor;this.Canvas.textAlign="left";this.Canvas.textBaseline="top";this.Canvas.fillText(strValue,xText,yText);rtDraw.Left=rtBG.Left;rtDraw.Top=rtBG.Top;rtDraw.Bottom=rtBG.Bottom;rtDraw.Right=rtBG.Right;this.DrawButton(rtBG.Top,rtBG.Right,lineHeight,rtDraw);};//计算右侧价格标签大小
@@ -13825,7 +13825,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13825
13825
  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);};}/********************************************************************************
13826
13826
  * 版本信息输出
13827
13827
  *
13828
- */var HQCHART_VERSION="1.1.14253";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();//把给外界调用的方法暴露出来
13828
+ */var HQCHART_VERSION="1.1.14255";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();//把给外界调用的方法暴露出来
13829
13829
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13830
13830
  // BaseIndex:BaseIndex,
13831
13831
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14254",
3
+ "version": "1.1.14256",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -60297,6 +60297,7 @@ function ChartDrawHLine()
60297
60297
  this.ButtonPosition=0; //按钮位置, 0=价格后面, 1=价格上面 2=价格上面 左对齐 3=垂直排列
60298
60298
  this.ButtonBGColor='rgb(190,190,190)';
60299
60299
  this.ButtonSpace=3;
60300
+ this.TopOffset=3;
60300
60301
 
60301
60302
  this.TextMargin={ Left:0, Right:0, Top:0, Bottom:0, YOffset:4*GetDevicePixelRatio() };
60302
60303
 
@@ -60351,6 +60352,7 @@ function ChartDrawHLine()
60351
60352
  if (IFrameSplitOperator.IsNumber(option.ButtonPosition)) this.ButtonPosition=option.ButtonPosition;
60352
60353
  if (IFrameSplitOperator.IsNumber(option.RightSpaceWidth)) this.RightSpaceWidth=option.RightSpaceWidth;
60353
60354
  if (IFrameSplitOperator.IsBool(option.AlwaysShowLab)) this.AlwaysShowLab=option.AlwaysShowLab;
60355
+ if (IFrameSplitOperator.IsNumber(option.TopOffset)) this.TopOffset=option.TopOffset;
60354
60356
 
60355
60357
 
60356
60358
  if (option.Button)
@@ -60722,6 +60724,12 @@ function ChartDrawHLine()
60722
60724
  {
60723
60725
  yBottom=border.Bottom;
60724
60726
  yTop=yBottom-totalHeight;
60727
+ if (yTop<this.TopOffset)
60728
+ {
60729
+ yTop=this.TopOffset;
60730
+ yBottom=yTop+totalHeight;
60731
+ }
60732
+
60725
60733
  option.Top=yTop;
60726
60734
  }
60727
60735
 
@@ -64222,6 +64222,7 @@ function ChartDrawHLine()
64222
64222
  this.ButtonPosition=0; //按钮位置, 0=价格后面, 1=价格上面 2=价格上面 左对齐 3=垂直排列
64223
64223
  this.ButtonBGColor='rgb(190,190,190)';
64224
64224
  this.ButtonSpace=3;
64225
+ this.TopOffset=3;
64225
64226
 
64226
64227
  this.TextMargin={ Left:0, Right:0, Top:0, Bottom:0, YOffset:4*GetDevicePixelRatio() };
64227
64228
 
@@ -64276,6 +64277,7 @@ function ChartDrawHLine()
64276
64277
  if (IFrameSplitOperator.IsNumber(option.ButtonPosition)) this.ButtonPosition=option.ButtonPosition;
64277
64278
  if (IFrameSplitOperator.IsNumber(option.RightSpaceWidth)) this.RightSpaceWidth=option.RightSpaceWidth;
64278
64279
  if (IFrameSplitOperator.IsBool(option.AlwaysShowLab)) this.AlwaysShowLab=option.AlwaysShowLab;
64280
+ if (IFrameSplitOperator.IsNumber(option.TopOffset)) this.TopOffset=option.TopOffset;
64279
64281
 
64280
64282
 
64281
64283
  if (option.Button)
@@ -64647,6 +64649,12 @@ function ChartDrawHLine()
64647
64649
  {
64648
64650
  yBottom=border.Bottom;
64649
64651
  yTop=yBottom-totalHeight;
64652
+ if (yTop<this.TopOffset)
64653
+ {
64654
+ yTop=this.TopOffset;
64655
+ yBottom=yTop+totalHeight;
64656
+ }
64657
+
64650
64658
  option.Top=yTop;
64651
64659
  }
64652
64660
 
@@ -140391,7 +140399,7 @@ function ScrollBarBGChart()
140391
140399
 
140392
140400
 
140393
140401
 
140394
- var HQCHART_VERSION="1.1.14253";
140402
+ var HQCHART_VERSION="1.1.14255";
140395
140403
 
140396
140404
  function PrintHQChartVersion()
140397
140405
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14253";
8
+ var HQCHART_VERSION="1.1.14255";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -64266,6 +64266,7 @@ function ChartDrawHLine()
64266
64266
  this.ButtonPosition=0; //按钮位置, 0=价格后面, 1=价格上面 2=价格上面 左对齐 3=垂直排列
64267
64267
  this.ButtonBGColor='rgb(190,190,190)';
64268
64268
  this.ButtonSpace=3;
64269
+ this.TopOffset=3;
64269
64270
 
64270
64271
  this.TextMargin={ Left:0, Right:0, Top:0, Bottom:0, YOffset:4*GetDevicePixelRatio() };
64271
64272
 
@@ -64320,6 +64321,7 @@ function ChartDrawHLine()
64320
64321
  if (IFrameSplitOperator.IsNumber(option.ButtonPosition)) this.ButtonPosition=option.ButtonPosition;
64321
64322
  if (IFrameSplitOperator.IsNumber(option.RightSpaceWidth)) this.RightSpaceWidth=option.RightSpaceWidth;
64322
64323
  if (IFrameSplitOperator.IsBool(option.AlwaysShowLab)) this.AlwaysShowLab=option.AlwaysShowLab;
64324
+ if (IFrameSplitOperator.IsNumber(option.TopOffset)) this.TopOffset=option.TopOffset;
64323
64325
 
64324
64326
 
64325
64327
  if (option.Button)
@@ -64691,6 +64693,12 @@ function ChartDrawHLine()
64691
64693
  {
64692
64694
  yBottom=border.Bottom;
64693
64695
  yTop=yBottom-totalHeight;
64696
+ if (yTop<this.TopOffset)
64697
+ {
64698
+ yTop=this.TopOffset;
64699
+ yBottom=yTop+totalHeight;
64700
+ }
64701
+
64694
64702
  option.Top=yTop;
64695
64703
  }
64696
64704
 
@@ -149996,7 +150004,7 @@ function HQChartScriptWorker()
149996
150004
 
149997
150005
 
149998
150006
 
149999
- var HQCHART_VERSION="1.1.14253";
150007
+ var HQCHART_VERSION="1.1.14255";
150000
150008
 
150001
150009
  function PrintHQChartVersion()
150002
150010
  {