hqchart 1.1.14471 → 1.1.14473

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.
@@ -3017,7 +3017,7 @@ if(height<this.MinSubFrameHeight&&yMove<0||height2<this.MinSubFrameHeight&&yMove
3017
3017
  {var zoomInfo={FrameID:frameID,Data:[]};//备份下放大前各个窗口的高度
3018
3018
  for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];zoomInfo.Data[i]={Height:item.Height,ShowXText:item.Frame.XSplitOperator.ShowText};}this.ZoomWindowsInfo=zoomInfo;var totalHeight=0;for(var i=this.ZoomStartWindowIndex;i<this.SubFrame.length;++i){var item=this.SubFrame[i];var frame=item.Frame;frame.XYSplit=true;totalHeight+=item.Height;if(i!=frameID){item.Height=0;frame.IsMinSize=true;//最小化
3019
3019
  frame.HideToolbar();frame.XSplitOperator.ShowText=false;for(var j=0;j<item.OverlayIndex.length;++j){var overlayItem=item.OverlayIndex[j];overlayItem.Frame.IsMinSize=true;}}}subFrame.Height=totalHeight;subFrame.Frame.XSplitOperator.ShowText=true;return true;}};//保存高度比例
3020
- this.SaveSubFrameHeightRate=function(){var height=this.ChartBorder.GetHeight();for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];var subHeight=item.Frame.ChartBorder.GetHeight();var rate=subHeight/height*100;item.Height=rate;}};this.ShowIndexTitleOnly=function(frameID,option){var item=this.SubFrame[frameID];if(!item&&!item.Frame)return false;var frame=item.Frame;if(!frame.ChartBorder)return false;var subChartBorder=frame.ChartBorder;if(subChartBorder.TitleHeight<10)return false;this.RestoreIndexWindows();if(subChartBorder.IsShowTitleOnly){subChartBorder.IsShowTitleOnly=false;}else{subChartBorder.IsShowTitleOnly=true;}return true;};this.CalculateChartBorder=function()//计算每个子框架的边框信息
3020
+ this.SaveSubFrameHeightRate=function(){var height=this.ChartBorder.GetHeight();for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];var subHeight=item.Frame.ChartBorder.GetHeight();var rate=subHeight/height*100;item.Height=rate;}};this.ShowIndexTitleOnly=function(frameID,option){var item=this.SubFrame[frameID];if(!item&&!item.Frame)return false;var frame=item.Frame;if(!frame.ChartBorder)return false;var subChartBorder=frame.ChartBorder;if(subChartBorder.TitleHeight<10)return false;this.RestoreIndexWindows();var bChange=false;var bEnable=!subChartBorder.IsShowTitleOnly;if(option){if(IFrameSplitOperator.IsBool(option.Enable))bEnable=option.Enable;}if(subChartBorder.IsShowTitleOnly!=bEnable){subChartBorder.IsShowTitleOnly=bEnable;bChange=true;}return bChange;};this.CalculateChartBorder=function()//计算每个子框架的边框信息
3021
3021
  {if(this.SubFrame.length<=0)return;var top=this.ChartBorder.GetTop();var height=this.ChartBorder.GetHeight();var totalHeight=0;var totalTitleHeight=0;for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];var frame=item.Frame;if(frame&&frame.ChartBorder&&frame.ChartBorder.IsShowTitleOnly&&item.Height>0)totalTitleHeight+=frame.ChartBorder.TitleHeight;else totalHeight+=item.Height;}height-=totalTitleHeight;for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];var frame=item.Frame;item.Frame.ChartBorder.Top=top;item.Frame.ChartBorder.Left=this.ChartBorder.Left;item.Frame.ChartBorder.Right=this.ChartBorder.Right;item.Frame.ChartBorder.LeftExtendWidth=this.ChartBorder.LeftExtendWidth;item.Frame.ChartBorder.RightExtendWidth=this.ChartBorder.RightExtendWidth;if(frame&&frame.ChartBorder&&frame.ChartBorder.IsShowTitleOnly&&item.Height>0){var frameHeight=item.Frame.ChartBorder.Top+frame.ChartBorder.TitleHeight;item.Frame.ChartBorder.Bottom=this.ChartBorder.GetChartHeight()-frameHeight;top=frameHeight;}else{var frameHeight=height*(item.Height/totalHeight)+top;item.Frame.ChartBorder.Bottom=this.ChartBorder.GetChartHeight()-frameHeight;top=frameHeight;}}if(this.GetEventCallback){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SIZE_FRAME);if(event&&event.Callback){var sendData={SubFrame:this.SubFrame};event.Callback(event,sendData,this);}}};this.SetExtendWidth=function(obj){if(!obj)return;var leftWidth=null,rightWidth=null;if(IFrameSplitOperator.IsNumber(obj.Left)){leftWidth=obj.Left;this.ChartBorder.LeftExtendWidth=leftWidth;}if(IFrameSplitOperator.IsNumber(obj.Right)){rightWidth=obj.Right;this.ChartBorder.RightExtendWidth=rightWidth;}for(var i in this.SubFrame){var item=this.SubFrame[i];if(leftWidth!=null)item.Frame.ChartBorder.LeftExtendWidth=leftWidth;if(rightWidth!=null)item.Frame.ChartBorder.RightExtendWidth=rightWidth;}};this.CalculateChartBorder2=function()//计算每个子框架的边框信息(思维导图用)
3022
3022
  {if(this.SubFrame.length<=0)return;var top=this.ChartBorder.Top;var bottom=this.ChartBorder.Bottom;var height=this.ChartBorder.GetHeight();var totalHeight=0;for(var i in this.SubFrame){var item=this.SubFrame[i];totalHeight+=item.Height;}var tempHeight=0;for(var i in this.SubFrame){var item=this.SubFrame[i];item.Frame.ChartBorder.Top=top;item.Frame.ChartBorder.Left=this.ChartBorder.Left;item.Frame.ChartBorder.Right=this.ChartBorder.Right;item.Frame.ChartBorder.X=this.ChartBorder.X;item.Frame.ChartBorder.Y=this.ChartBorder.Y;item.Frame.ChartBorder.Width=this.ChartBorder.Width;item.Frame.ChartBorder.Height=this.ChartBorder.Height;var frameHeight=height*(item.Height/totalHeight);tempHeight+=frameHeight;bottom=this.ChartBorder.Bottom+(height-tempHeight);item.Frame.ChartBorder.Bottom=bottom;top+=frameHeight;}};this.GetScaleTextWidth=function(){var width={Left:null,Right:null,OverlayRight:0};var aryOverlayWidth=[];// 叠加坐标
3023
3023
  for(var i=0;i<this.SubFrame.length;++i){var item=this.SubFrame[i];if(item.Height<=0)continue;var frame=item.Frame;if(!frame)continue;if(!frame.XSplitOperator)continue;var maxValue=frame.HorizontalMax;//最大最小要还原
@@ -14350,7 +14350,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
14350
14350
  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);};}/********************************************************************************
14351
14351
  * 版本信息输出
14352
14352
  *
14353
- */var HQCHART_VERSION="1.1.14470";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();//把给外界调用的方法暴露出来
14353
+ */var HQCHART_VERSION="1.1.14472";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();//把给外界调用的方法暴露出来
14354
14354
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
14355
14355
  // BaseIndex:BaseIndex,
14356
14356
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.14471",
3
+ "version": "1.1.14473",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -19944,16 +19944,21 @@ function HQTradeFrame()
19944
19944
 
19945
19945
  this.RestoreIndexWindows();
19946
19946
 
19947
- if (subChartBorder.IsShowTitleOnly)
19947
+ var bChange=false;
19948
+ var bEnable=!subChartBorder.IsShowTitleOnly;
19949
+ if (option)
19948
19950
  {
19949
- subChartBorder.IsShowTitleOnly=false;
19951
+ if (IFrameSplitOperator.IsBool(option.Enable)) bEnable=option.Enable;
19950
19952
  }
19951
- else
19953
+
19954
+ if (subChartBorder.IsShowTitleOnly!=bEnable)
19952
19955
  {
19953
- subChartBorder.IsShowTitleOnly=true;
19956
+ subChartBorder.IsShowTitleOnly=bEnable;
19957
+ bChange=true;
19958
+
19954
19959
  }
19955
19960
 
19956
- return true;
19961
+ return bChange;
19957
19962
  }
19958
19963
 
19959
19964
  this.CalculateChartBorder=function() //计算每个子框架的边框信息
@@ -23869,16 +23869,21 @@ function HQTradeFrame()
23869
23869
 
23870
23870
  this.RestoreIndexWindows();
23871
23871
 
23872
- if (subChartBorder.IsShowTitleOnly)
23872
+ var bChange=false;
23873
+ var bEnable=!subChartBorder.IsShowTitleOnly;
23874
+ if (option)
23873
23875
  {
23874
- subChartBorder.IsShowTitleOnly=false;
23876
+ if (IFrameSplitOperator.IsBool(option.Enable)) bEnable=option.Enable;
23875
23877
  }
23876
- else
23878
+
23879
+ if (subChartBorder.IsShowTitleOnly!=bEnable)
23877
23880
  {
23878
- subChartBorder.IsShowTitleOnly=true;
23881
+ subChartBorder.IsShowTitleOnly=bEnable;
23882
+ bChange=true;
23883
+
23879
23884
  }
23880
23885
 
23881
- return true;
23886
+ return bChange;
23882
23887
  }
23883
23888
 
23884
23889
  this.CalculateChartBorder=function() //计算每个子框架的边框信息
@@ -143705,7 +143710,7 @@ function ScrollBarBGChart()
143705
143710
 
143706
143711
 
143707
143712
 
143708
- var HQCHART_VERSION="1.1.14470";
143713
+ var HQCHART_VERSION="1.1.14472";
143709
143714
 
143710
143715
  function PrintHQChartVersion()
143711
143716
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.14470";
8
+ var HQCHART_VERSION="1.1.14472";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -23913,16 +23913,21 @@ function HQTradeFrame()
23913
23913
 
23914
23914
  this.RestoreIndexWindows();
23915
23915
 
23916
- if (subChartBorder.IsShowTitleOnly)
23916
+ var bChange=false;
23917
+ var bEnable=!subChartBorder.IsShowTitleOnly;
23918
+ if (option)
23917
23919
  {
23918
- subChartBorder.IsShowTitleOnly=false;
23920
+ if (IFrameSplitOperator.IsBool(option.Enable)) bEnable=option.Enable;
23919
23921
  }
23920
- else
23922
+
23923
+ if (subChartBorder.IsShowTitleOnly!=bEnable)
23921
23924
  {
23922
- subChartBorder.IsShowTitleOnly=true;
23925
+ subChartBorder.IsShowTitleOnly=bEnable;
23926
+ bChange=true;
23927
+
23923
23928
  }
23924
23929
 
23925
- return true;
23930
+ return bChange;
23926
23931
  }
23927
23932
 
23928
23933
  this.CalculateChartBorder=function() //计算每个子框架的边框信息
@@ -153517,7 +153522,7 @@ function HQChartScriptWorker()
153517
153522
 
153518
153523
 
153519
153524
 
153520
- var HQCHART_VERSION="1.1.14470";
153525
+ var HQCHART_VERSION="1.1.14472";
153521
153526
 
153522
153527
  function PrintHQChartVersion()
153523
153528
  {