hqchart 1.1.14229 → 1.1.14231

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.
@@ -1925,7 +1925,7 @@ this.Canvas.beginPath();this.Canvas.rect(client.RightEx,border.TopEx,client.Righ
1925
1925
  this.Frame.SetFrameBorderSizeChange();this.Frame.ReDrawToolbar();this.Draw();};this.OnZoomUpDownFrameY=function(obj,yMove){if(!this.Frame)return;if(!this.Frame.OnZoomUpDownFrameY(obj,yMove))return;this.Frame.SetSizeChage(true);this.Draw();};this.OnUpDonwFrameY=function(obj,yMove){if(!this.Frame)return false;if(!this.Frame.OnUpDonwFrameY(obj,yMove))return false;this.Frame.SetSizeChage(true);return true;};this.CancelZoomUpDownFrameY=function(obj){if(!this.Frame)return;if(!this.Frame.CancelZoomUpDownFrameY(obj))return;this.UpdateFrameMaxMin();this.Frame.SetSizeChage(true);this.Draw();};this.IsKLineContainer=function(){if(this.ClassName=='KLineChartContainer'||this.ClassName=='KLineChartHScreenContainer'||this.ClassName=="KLineTrainChartContainer"||this.ClassName=="CustomKLineChartContainer")return true;return false;};this.IsMinuteContainer=function(){if(this.ClassName=="MinuteChartContainer"||this.ClassName=="MinuteChartHScreenContainer")return true;return false;};this.UpdatePointByCursorIndex=function(type)//type 1=根据十字光标更新 2=强制取消十字光标
1926
1926
  {var pt={X:null,Y:null};pt.X=this.Frame.GetXFromIndex(this.CursorIndex);var index=Math.abs(this.CursorIndex-0.5);if(this.IsKLineContainer())index=this.CursorIndex;var data=this.Frame.Data;if(data.DataOffset+index<data.Data.length){var close=data.Data[data.DataOffset+index].Close;pt.Y=this.Frame.GetYFromData(close);}if(type==1&&this.ChartCorssCursor){if(this.ChartCorssCursor.Status==1)//十字光标显示中, 不调整位置
1927
1927
  {}else{this.LastPoint.X=this.Frame.GetXFromIndex(this.CursorIndex);var index=Math.abs(this.CursorIndex-0.5);index=parseInt(index.toFixed(0));if(this.IsKLineContainer())index=this.CursorIndex;this.LastPoint.Y=null;}}else if(type==2&&this.ChartCorssCursor)//取消鼠标位置,十字光标就不显示了
1928
- {this.LastPoint.Y=null;this.LastPoint.X=null;}else{this.LastPoint.X=pt.X;this.LastPoint.Y=pt.Y;}};this.ShowTooltipByKeyDown=function(){if(!this.KLineTooltipConfig.Enable||!this.KLineTooltipConfig.EnableKeyDown)return;var index=Math.abs(this.CursorIndex-0.5);index=parseInt(index.toFixed(0));if(this.ClassName=='KLineChartContainer'||this.ClassName=='KLineTrainChartContainer')index=this.CursorIndex;var data=this.Frame.Data;var toolTip=new TooltipData();toolTip.Data=data.Data[data.DataOffset+index];toolTip.ChartPaint=this.ChartPaint[0];var pixelTatio=GetDevicePixelRatio();if(pixelTatio===0)pixelTatio=1;//div 缩放还是使用原始坐标
1928
+ {this.LastPoint.Y=null;this.LastPoint.X=null;}else{this.LastPoint.X=pt.X;this.LastPoint.Y=pt.Y;}};this.ShowTooltipByKeyDown=function(){if(!this.KLineTooltipConfig.Enable||!this.KLineTooltipConfig.EnableKeyDown){this.HideFloatTooltip();return;}var index=Math.abs(this.CursorIndex-0.5);index=parseInt(index.toFixed(0));if(this.ClassName=='KLineChartContainer'||this.ClassName=='KLineTrainChartContainer')index=this.CursorIndex;var data=this.Frame.Data;var toolTip=new TooltipData();toolTip.Data=data.Data[data.DataOffset+index];toolTip.ChartPaint=this.ChartPaint[0];var pixelTatio=GetDevicePixelRatio();if(pixelTatio===0)pixelTatio=1;//div 缩放还是使用原始坐标
1929
1929
  this.ShowTooltip(this.LastPoint.X/pixelTatio,this.LastPoint.Y/pixelTatio,toolTip);};this.DrawTooltipDialog=function(){};this.DrawFloatTooltip=function(point,toolTip){if(!this.FloatTooltip)return;this.UpdateFloatTooltip(point,toolTip);};this.UpdateFloatTooltip=function(point,toolTip){if(!this.FloatTooltip)return;var sendData={Tooltip:toolTip,Point:point,Symbol:this.Symbol,Name:this.Name,DataType:1};this.FloatTooltip.Update(sendData);};//更新实时行情到浮动tooltip
1930
1930
  this.UpdateHQFloatTooltip=function(item){};this.ShowTooltip=function(x,y,toolTip){var _this10=this;if(!this.IsShowTooltip)return;var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
1931
1931
  var xMove=15/pixelTatio;//顶部坐标偏移位置
@@ -13822,7 +13822,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13822
13822
  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);};}/********************************************************************************
13823
13823
  * 版本信息输出
13824
13824
  *
13825
- */var HQCHART_VERSION="1.1.14228";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();//把给外界调用的方法暴露出来
13825
+ */var HQCHART_VERSION="1.1.14230";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();//把给外界调用的方法暴露出来
13826
13826
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13827
13827
  // BaseIndex:BaseIndex,
13828
13828
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14229",
3
+ "version": "1.1.14231",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -7139,7 +7139,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7139
7139
 
7140
7140
  this.ShowTooltipByKeyDown=function()
7141
7141
  {
7142
- if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown) return;
7142
+ if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown)
7143
+ {
7144
+ this.HideFloatTooltip();
7145
+ return;
7146
+ }
7143
7147
 
7144
7148
  var index=Math.abs(this.CursorIndex-0.5);
7145
7149
  index=parseInt(index.toFixed(0));
@@ -11064,7 +11064,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11064
11064
 
11065
11065
  this.ShowTooltipByKeyDown=function()
11066
11066
  {
11067
- if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown) return;
11067
+ if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown)
11068
+ {
11069
+ this.HideFloatTooltip();
11070
+ return;
11071
+ }
11068
11072
 
11069
11073
  var index=Math.abs(this.CursorIndex-0.5);
11070
11074
  index=parseInt(index.toFixed(0));
@@ -140235,7 +140239,7 @@ function ScrollBarBGChart()
140235
140239
 
140236
140240
 
140237
140241
 
140238
- var HQCHART_VERSION="1.1.14228";
140242
+ var HQCHART_VERSION="1.1.14230";
140239
140243
 
140240
140244
  function PrintHQChartVersion()
140241
140245
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14228";
8
+ var HQCHART_VERSION="1.1.14230";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -11108,7 +11108,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
11108
11108
 
11109
11109
  this.ShowTooltipByKeyDown=function()
11110
11110
  {
11111
- if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown) return;
11111
+ if (!this.KLineTooltipConfig.Enable || !this.KLineTooltipConfig.EnableKeyDown)
11112
+ {
11113
+ this.HideFloatTooltip();
11114
+ return;
11115
+ }
11112
11116
 
11113
11117
  var index=Math.abs(this.CursorIndex-0.5);
11114
11118
  index=parseInt(index.toFixed(0));
@@ -149840,7 +149844,7 @@ function HQChartScriptWorker()
149840
149844
 
149841
149845
 
149842
149846
 
149843
- var HQCHART_VERSION="1.1.14228";
149847
+ var HQCHART_VERSION="1.1.14230";
149844
149848
 
149845
149849
  function PrintHQChartVersion()
149846
149850
  {