hqchart 1.1.14227 → 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.
- package/lib/umychart.vue.js +4 -3
- package/package.json +1 -1
- package/src/jscommon/umychart.js +5 -1
- package/src/jscommon/umychart.report.js +2 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +8 -3
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +8 -3
package/lib/umychart.vue.js
CHANGED
|
@@ -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;//顶部坐标偏移位置
|
|
@@ -12416,7 +12416,8 @@ if((clickData.Type==2||clickData.Type==4)&&(e.button==0||e.button==2))//点击
|
|
|
12416
12416
|
{if(this.SetYOffset(scroll.Pos)){this.Draw();this.DelayUpdateStockData();}}}}}document.onmousemove=function(e){_this57.DocOnMouseMove(e);};document.onmouseup=function(e){_this57.DocOnMouseUp(e);};};this.UIOnMounseUp=function(e){console.log('"UIOnMounseUp');};//去掉右键菜单
|
|
12417
12417
|
this.UIOnContextMenu=function(e){e.preventDefault();if(this.ChartSplashPaint&&this.ChartSplashPaint.IsEnableSplash==true)return;if(!this.IsShowRightMenu)return;var x=e.clientX-this.UIElement.getBoundingClientRect().left;var y=e.clientY-this.UIElement.getBoundingClientRect().top;if(typeof this.OnRightMenu=='function')this.OnRightMenu(x,y,e);//右键菜单事件
|
|
12418
12418
|
};this.OnRightMenu=function(x,y,e){this.PopupRightMenu(x,y,e);};this.PtInReportChart=function(x,y)//Type: 2=行 3=表头 4=固定行
|
|
12419
|
-
{var chart=this.GetReportChart();if(!chart)return null;var row=chart.PtInHeader(x,y);if(row)return{Type:3,Row:row,X:x,Y:y};row=chart.PtInFixedBody(x,y);if(row)return{Type:4,Row:row,X:x,Y:y};row=chart.PtInBody(x,y);if(row)return{Type:2,Row:row,X:x,Y:y};return{Type:-1,Row:null,X:x,Y:y};};this.PopupRightMenu=function(x,y,e){var _this58=this;var
|
|
12419
|
+
{var chart=this.GetReportChart();if(!chart)return null;var row=chart.PtInHeader(x,y);if(row)return{Type:3,Row:row,X:x,Y:y};row=chart.PtInFixedBody(x,y);if(row)return{Type:4,Row:row,X:x,Y:y};row=chart.PtInBody(x,y);if(row)return{Type:2,Row:row,X:x,Y:y};return{Type:-1,Row:null,X:x,Y:y};};this.PopupRightMenu=function(x,y,e){var _this58=this;var pixelTatio=GetDevicePixelRatio();var data=this.PtInReportChart(x*pixelTatio,y*pixelTatio);//x,y 需要乘以放大倍速
|
|
12420
|
+
if(!data)return;if(!this.JSPopMenu)return;data.e=e;var menuData={Menu:null,Position:JSPopMenu.POSITION_ID.RIGHT_MENU_ID};menuData.ClickCallback=function(data){_this58.OnClickRightMenu(data);};var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_RIGHT_MENU);if(event&&event.Callback){var sendData={MenuData:menuData,Data:data};event.Callback(event,sendData,this);}if(menuData.Menu)this.PopupMenuByRClick(menuData,x,y);};//右键菜单
|
|
12420
12421
|
this.PopupMenuByRClick=function(menuData,x,y){if(!this.JSPopMenu)return;var rtClient=this.UIElement.getBoundingClientRect();var rtScroll=GetScrollPosition();x+=rtClient.left+rtScroll.Left;y+=rtClient.top+rtScroll.Top;this.JSPopMenu.CreatePopMenu(menuData);this.JSPopMenu.PopupMenuByRight(x,y);};//点击右键菜单
|
|
12421
12422
|
this.OnClickRightMenu=function(data){JSConsole.Chart.Log('[JSReportChartContainer::OnClickRightMenu] ',data);if(!data||!data.Data)return;var cmdID=data.Data.ID;//命令ID
|
|
12422
12423
|
var aryArgs=data.Data.Args;//参数
|
|
@@ -13821,7 +13822,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13821
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);};}/********************************************************************************
|
|
13822
13823
|
* 版本信息输出
|
|
13823
13824
|
*
|
|
13824
|
-
*/var HQCHART_VERSION="1.1.
|
|
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();//把给外界调用的方法暴露出来
|
|
13825
13826
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13826
13827
|
// BaseIndex:BaseIndex,
|
|
13827
13828
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -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)
|
|
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));
|
|
@@ -2012,7 +2012,8 @@ function JSReportChartContainer(uielement)
|
|
|
2012
2012
|
|
|
2013
2013
|
this.PopupRightMenu=function(x,y, e)
|
|
2014
2014
|
{
|
|
2015
|
-
var
|
|
2015
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
2016
|
+
var data=this.PtInReportChart(x*pixelTatio,y*pixelTatio); //x,y 需要乘以放大倍速
|
|
2016
2017
|
if (!data) return;
|
|
2017
2018
|
if (!this.JSPopMenu) return;
|
|
2018
2019
|
|
|
@@ -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)
|
|
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));
|
|
@@ -129694,7 +129698,8 @@ function JSReportChartContainer(uielement)
|
|
|
129694
129698
|
|
|
129695
129699
|
this.PopupRightMenu=function(x,y, e)
|
|
129696
129700
|
{
|
|
129697
|
-
var
|
|
129701
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
129702
|
+
var data=this.PtInReportChart(x*pixelTatio,y*pixelTatio); //x,y 需要乘以放大倍速
|
|
129698
129703
|
if (!data) return;
|
|
129699
129704
|
if (!this.JSPopMenu) return;
|
|
129700
129705
|
|
|
@@ -140234,7 +140239,7 @@ function ScrollBarBGChart()
|
|
|
140234
140239
|
|
|
140235
140240
|
|
|
140236
140241
|
|
|
140237
|
-
var HQCHART_VERSION="1.1.
|
|
140242
|
+
var HQCHART_VERSION="1.1.14230";
|
|
140238
140243
|
|
|
140239
140244
|
function PrintHQChartVersion()
|
|
140240
140245
|
{
|
|
@@ -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)
|
|
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));
|
|
@@ -129738,7 +129742,8 @@ function JSReportChartContainer(uielement)
|
|
|
129738
129742
|
|
|
129739
129743
|
this.PopupRightMenu=function(x,y, e)
|
|
129740
129744
|
{
|
|
129741
|
-
var
|
|
129745
|
+
var pixelTatio = GetDevicePixelRatio();
|
|
129746
|
+
var data=this.PtInReportChart(x*pixelTatio,y*pixelTatio); //x,y 需要乘以放大倍速
|
|
129742
129747
|
if (!data) return;
|
|
129743
129748
|
if (!this.JSPopMenu) return;
|
|
129744
129749
|
|
|
@@ -149839,7 +149844,7 @@ function HQChartScriptWorker()
|
|
|
149839
149844
|
|
|
149840
149845
|
|
|
149841
149846
|
|
|
149842
|
-
var HQCHART_VERSION="1.1.
|
|
149847
|
+
var HQCHART_VERSION="1.1.14230";
|
|
149843
149848
|
|
|
149844
149849
|
function PrintHQChartVersion()
|
|
149845
149850
|
{
|