hqchart 1.1.13951 → 1.1.13953

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.
@@ -13137,8 +13137,8 @@ this.Draw=function(){if(!this.Canvas)return;if(!this.Data||!IFrameSplitOperator.
13137
13137
  */function JSTReportChart(divElement){this.DivElement=divElement;this.JSChartContainer;//表格控件
13138
13138
  this.ResizeListener;//大小变动监听
13139
13139
  //h5 canvas
13140
- this.CanvasElement=document.createElement("canvas");this.CanvasElement.className='jstreport-drawing';this.CanvasElement.id=Guid();this.CanvasElement.setAttribute("tabindex",0);if(this.CanvasElement.style)this.CanvasElement.style.outline='none';if(divElement.hasChildNodes()){JSConsole.Chart.Log("[JSTReportChart::JSReportChart] divElement hasChildNodes",divElement.childNodes);}divElement.appendChild(this.CanvasElement);this.OnSize=function(){//画布大小通过div获取
13141
- var height=parseInt(this.DivElement.style.height.replace("px",""));this.CanvasElement.height=height;this.CanvasElement.width=parseInt(this.DivElement.style.width.replace("px",""));this.CanvasElement.style.width=this.CanvasElement.width+'px';this.CanvasElement.style.height=this.CanvasElement.height+'px';var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
13140
+ this.CanvasElement=document.createElement("canvas");this.CanvasElement.className='jstreport-drawing';this.CanvasElement.id=Guid();this.CanvasElement.setAttribute("tabindex",0);if(this.CanvasElement.style)this.CanvasElement.style.outline='none';if(divElement.hasChildNodes()){JSConsole.Chart.Log("[JSTReportChart::JSReportChart] divElement hasChildNodes",divElement.childNodes);}divElement.appendChild(this.CanvasElement);this.OnSize=function(){//画布大小通过div获取 如果有style里的大小 使用style里的
13141
+ var height=this.DivElement.offsetHeight;var width=this.DivElement.offsetWidth;if(this.DivElement.style.height&&this.DivElement.style.width){if(this.DivElement.style.height.includes("px"))height=parseInt(this.DivElement.style.height.replace("px",""));if(this.DivElement.style.width.includes("px"))width=parseInt(this.DivElement.style.width.replace("px",""));}this.CanvasElement.height=height;this.CanvasElement.width=width;this.CanvasElement.style.width=this.CanvasElement.width+'px';this.CanvasElement.style.height=this.CanvasElement.height+'px';var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
13142
13142
  this.CanvasElement.height*=pixelTatio;this.CanvasElement.width*=pixelTatio;JSConsole.Chart.Log('[JSTReportChart::OnSize] devicePixelRatio='+window.devicePixelRatio+', height='+this.CanvasElement.height+', width='+this.CanvasElement.width);if(this.JSChartContainer&&this.JSChartContainer.OnSize){this.JSChartContainer.OnSize();}};this.SetOption=function(option){var chart=this.CreateJSTReportChartContainer(option);if(!chart)return false;if(option.OnCreatedCallback)option.OnCreatedCallback(chart);this.JSChartContainer=chart;this.DivElement.JSChart=this;//div中保存一份
13143
13143
  if(option.EnableResize==true)this.CreateResizeListener();if(option.Symbol){chart.Draw();var name=option.Symbol;if(option.Name)name=option.Name;chart.ChangeSymbol(option.Symbol,{Name:name});//下载列表码表
13144
13144
  }};this.CreateJSTReportChartContainer=function(option){var chart=new JSTReportChartContainer(this.CanvasElement);chart.Create(option);if(option.NetworkFilter)chart.NetworkFilter=option.NetworkFilter;if(IFrameSplitOperator.IsNonEmptyArray(option.Column))chart.SetColumn(option.Column);if(IFrameSplitOperator.IsNonEmptyArray(option.Tab))chart.SetTab(option.Tab);if(IFrameSplitOperator.IsNumber(option.TabSelected))chart.SetSelectedTab(option.TabSelected);if(IFrameSplitOperator.IsBool(option.EnableDragRow))chart.EnableDragRow=option.EnableDragRow;if(IFrameSplitOperator.IsNumber(option.DragRowType))chart.DragRowType=option.DragRowType;if(IFrameSplitOperator.IsBool(option.EnableDragHeader))chart.EnableDragHeader=option.EnableDragHeader;if(option.SortInfo){var item=option.SortInfo;if(IFrameSplitOperator.IsNumber(item.Field))chart.SortInfo.Field=item.Field;if(IFrameSplitOperator.IsNumber(item.Sort))chart.SortInfo.Sort=item.Sort;}this.SetChartBorder(chart,option);//是否自动更新
@@ -13867,7 +13867,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
13867
13867
  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);};}/********************************************************************************
13868
13868
  * 版本信息输出
13869
13869
  *
13870
- */var HQCHART_VERSION="1.1.13950";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();//把给外界调用的方法暴露出来
13870
+ */var HQCHART_VERSION="1.1.13952";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();//把给外界调用的方法暴露出来
13871
13871
  exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
13872
13872
  // BaseIndex:BaseIndex,
13873
13873
  // ChartLine:ChartLine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hqchart",
3
- "version": "1.1.13951",
3
+ "version": "1.1.13953",
4
4
  "description": "HQChart - H5, 微信小程序 沪深/港股/数字货币/期货/美股 K线图(kline),走势图,缩放,拖拽,十字光标,画图工具,截图,筹码图. 分析家语法,通达信语法,(麦语法),第3方数据对接",
5
5
  "main": "lib/main.js",
6
6
  "scripts": {
@@ -32,10 +32,19 @@ function JSTReportChart(divElement)
32
32
 
33
33
  this.OnSize=function()
34
34
  {
35
- //画布大小通过div获取
36
- var height=parseInt(this.DivElement.style.height.replace("px",""));
35
+ //画布大小通过div获取 如果有style里的大小 使用style里的
36
+ var height=this.DivElement.offsetHeight;
37
+ var width=this.DivElement.offsetWidth;
38
+ if (this.DivElement.style.height && this.DivElement.style.width)
39
+ {
40
+ if (this.DivElement.style.height.includes("px"))
41
+ height=parseInt(this.DivElement.style.height.replace("px",""));
42
+ if (this.DivElement.style.width.includes("px"))
43
+ width=parseInt(this.DivElement.style.width.replace("px",""));
44
+ }
45
+
37
46
  this.CanvasElement.height=height;
38
- this.CanvasElement.width=parseInt(this.DivElement.style.width.replace("px",""));
47
+ this.CanvasElement.width=width;
39
48
  this.CanvasElement.style.width=this.CanvasElement.width+'px';
40
49
  this.CanvasElement.style.height=this.CanvasElement.height+'px';
41
50
 
@@ -139117,7 +139117,7 @@ function ScrollBarBGChart()
139117
139117
 
139118
139118
 
139119
139119
 
139120
- var HQCHART_VERSION="1.1.13950";
139120
+ var HQCHART_VERSION="1.1.13952";
139121
139121
 
139122
139122
  function PrintHQChartVersion()
139123
139123
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.13950";
8
+ var HQCHART_VERSION="1.1.13952";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {
@@ -135854,10 +135854,19 @@ function JSTReportChart(divElement)
135854
135854
 
135855
135855
  this.OnSize=function()
135856
135856
  {
135857
- //画布大小通过div获取
135858
- var height=parseInt(this.DivElement.style.height.replace("px",""));
135857
+ //画布大小通过div获取 如果有style里的大小 使用style里的
135858
+ var height=this.DivElement.offsetHeight;
135859
+ var width=this.DivElement.offsetWidth;
135860
+ if (this.DivElement.style.height && this.DivElement.style.width)
135861
+ {
135862
+ if (this.DivElement.style.height.includes("px"))
135863
+ height=parseInt(this.DivElement.style.height.replace("px",""));
135864
+ if (this.DivElement.style.width.includes("px"))
135865
+ width=parseInt(this.DivElement.style.width.replace("px",""));
135866
+ }
135867
+
135859
135868
  this.CanvasElement.height=height;
135860
- this.CanvasElement.width=parseInt(this.DivElement.style.width.replace("px",""));
135869
+ this.CanvasElement.width=width;
135861
135870
  this.CanvasElement.style.width=this.CanvasElement.width+'px';
135862
135871
  this.CanvasElement.style.height=this.CanvasElement.height+'px';
135863
135872
 
@@ -144513,7 +144522,7 @@ function HQChartScriptWorker()
144513
144522
 
144514
144523
 
144515
144524
 
144516
- var HQCHART_VERSION="1.1.13950";
144525
+ var HQCHART_VERSION="1.1.13952";
144517
144526
 
144518
144527
  function PrintHQChartVersion()
144519
144528
  {