hqchart 1.1.14611 → 1.1.14613
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
CHANGED
|
@@ -13552,7 +13552,7 @@ this.GetNameColor=function(colunmInfo,symbol,rowType){var event=this.GetEventCal
|
|
|
13552
13552
|
{var sendData={Column:buttonData.Column,Index:buttonData.Index,Stock:buttonData.Stock,ColumnIndex:buttonData.ColumnIndex,Data:buttonData.Data};this.SendClickEvent(JSCHART_EVENT_ID.ON_CLICK_REPORT_LINK,sendData);status.Redraw=true;return true;}return false;};this.OnDblClick=function(x,y,e){if(!this.Data)return false;var header=this.PtInHeaderDragBorder(x,y);if(header){this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_REPORT_DRAG_COLUMN_WIDTH,{Data:header,X:x,Y:y});return true;}var row=this.PtInBody(x,y);if(row){this.SendClickEvent(JSCHART_EVENT_ID.ON_DBCLICK_REPORT_ROW,{Data:row,X:x,Y:y});return true;}return false;};this.PtInClient=function(x,y){if(x>this.RectClient.Left&&x<this.RectClient.Right&&y>this.RectClient.Top&&y<this.RectClient.Bottom)return true;return false;};this.PtInBody=function(x,y){if(!this.Data)return null;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return null;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var right=this.RectClient.Right;var rowWidth=this.RectClient.Right-this.RectClient.Left;var textTop=top+this.FixedRowHeight*this.FixedRowCount;for(var i=this.Data.YOffset,j=0;i<this.Data.Data.length&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var rtRow={Left:left,Top:textTop,Right:right,Bottom:textTop+this.RowHeight};if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={Rect:rtRow,DataIndex:i,Index:j,Symbol:symbol};data.Item=this.PtInItem(x,y,rtRow.Top,rtRow.Bottom);return data;}textTop+=this.RowHeight;}return null;};this.PtInFixedBody=function(x,y){if(this.FixedRowCount<=0)return null;var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var right=this.RectClient.Right;var rowWidth=this.RectClient.Right-this.RectClient.Left;var textTop=top;for(var i=0;i<this.FixedRowCount;++i){var rtRow={Left:left,Top:textTop,Right:right,Bottom:textTop+this.FixedRowHeight};if(x>=rtRow.Left&&x<=rtRow.Right&&y>=rtRow.Top&&y<=rtRow.Bottom){var data={Rect:rtRow,Index:i};data.Item=this.PtInItem(x,y,rtRow.Top,rtRow.Bottom);return data;}textTop+=this.FixedRowHeight;}return null;};this.PtInItem=function(x,y,top,bottom){var left=this.RectClient.Left;var right=this.RectClient.Right;var textLeft=left;//固定列
|
|
13553
13553
|
for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];var header={Left:textLeft,Right:textLeft+item.Width,Top:top,Bottom:bottom};if(x>=header.Left&&x<=header.Right&&y>=header.Top&&y<=header.Bottom){return{Rect:header,Column:item,Index:i,IsFixed:true};}textLeft+=item.Width;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];if(textLeft>=right)break;var header={Left:textLeft,Right:textLeft+item.Width,Top:top,Bottom:bottom};if(x>=header.Left&&x<=header.Right&&y>=header.Top&&y<=header.Bottom){return{Rect:header,Column:item,Index:i,IsFixed:false};}textLeft+=item.Width;}return null;};this.PtInHeader=function(x,y){if(!this.IsShowHeader)return null;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=top+this.HeaderHeight;if(!(x>=left&&x<=right&&y>=top&&y<=bottom))return null;return this.PtInItem(x,y,top,bottom);};this.IsPtInBody=function(x,y){var top=this.RectClient.Top+this.HeaderHeight;var left=this.RectClient.Left;var right=this.RectClient.Right;var bottom=this.RectClient.Bottom;if(x>=left&&x<=right&&y>=top&&y<=bottom)return true;return false;};this.IsPtInHeader=function(x,y){if(!this.IsShowHeader)return false;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=top+this.HeaderHeight;if(x>=left&&x<=right&&y>=top&&y<=bottom)return true;return false;};this.SendClickEvent=function(id,data){var event=this.GetEventCallback(id);if(event&&event.Callback){event.Callback(event,data,this);}};this.DrawDragRow=function(){if(!this.DragRow)return;var drag=this.DragRow;if(!drag.Data||!drag.Inside||!drag.Data.Row)return;var dataIndex=drag.Data.Row.DataIndex;if(!IFrameSplitOperator.IsNumber(dataIndex)||dataIndex<0)return;var textTop=drag.Inside.Y-this.RowHeight/2;var top=textTop;var left=this.RectClient.Left;var rowWidth=this.RectClient.Right-this.RectClient.Left;//背景
|
|
13554
13554
|
this.Canvas.fillStyle=this.DragRowColor;this.Canvas.fillRect(left,textTop,rowWidth,this.RowHeight);var symbol=this.Data.Data[dataIndex];var data={Symbol:symbol,Stock:null,Block:null};if(this.GetStockDataCallback)data.Stock=this.GetStockDataCallback(symbol);if(this.GetBlockDataCallback)data.Block=this.GetBlockDataCallback(symbol);data.Decimal=GetfloatPrecision(symbol);//小数位数
|
|
13555
|
-
var chartRight=this.RectClient.Right;this.Canvas.font=this.ItemFont;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,3);left+=item.Width;if(left>=chartRight)break;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,3);left+=item.Width;if(left>=chartRight)break;}};this.DrawDragHeader=function(){if(!this.DragHeader)return;var drag=this.DragHeader;var clickData=drag.ClickData;var rtHeader=clickData.Header.Rect;var headerWidth=rtHeader.Right-rtHeader.Left;var rtRow={Left:drag.
|
|
13555
|
+
var chartRight=this.RectClient.Right;this.Canvas.font=this.ItemFont;for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,3);left+=item.Width;if(left>=chartRight)break;}for(var i=this.FixedColumn+this.Data.XOffset;i<this.Column.length;++i){var item=this.Column[i];this.DrawItem(dataIndex,data,item,left,top,3);left+=item.Width;if(left>=chartRight)break;}};this.DrawDragHeader=function(){if(!this.DragHeader)return;var drag=this.DragHeader;var clickData=drag.ClickData;var rtHeader=clickData.Header.Rect;var headerWidth=rtHeader.Right-rtHeader.Left;var rtRow={Left:drag.MovePoint.X-headerWidth/2,Top:this.RectClient.Top+this.HeaderHeight,Width:headerWidth};rtRow.Bottom=rtRow.Top+this.HeaderHeight+this.RowHeight*this.RowCount+this.FixedRowHeight*this.FixedRowCount;rtRow.Right=rtRow.Left+rtRow.Width;rtRow.Height=rtRow.Bottom-rtRow.Top;//背景
|
|
13556
13556
|
this.Canvas.fillStyle=this.DragRowColor;this.Canvas.fillRect(rtRow.Left,rtRow.Top,rtRow.Width,rtRow.Height);//文字
|
|
13557
13557
|
var cellHeader={Left:rtRow.Left,Top:rtRow.Top,Right:rtRow.Right,Width:rtRow.Width,Height:this.HeaderHeight};cellHeader.Bottom=cellHeader.Top+cellHeader.Height;this.DrawHeaderItem(clickData.Header.Column,cellHeader,clickData.Header.Index,{HeaderColor:this.DragRowTextColor});var textTop=cellHeader.Bottom+this.FixedRowHeight*this.FixedRowCount;this.Canvas.font=this.ItemFont;var dataCount=this.GetAllRowCount();for(var i=this.Data.YOffset,j=0;i<dataCount&&j<this.RowCount;++i,++j){var symbol=this.Data.Data[i];var data={Symbol:symbol,Stock:null,Block:null};if(this.GetStockDataCallback)data.Stock=this.GetStockDataCallback(symbol);if(this.GetBlockDataCallback)data.Block=this.GetBlockDataCallback(symbol);if(this.GetFlashBGDataCallback)data.FlashBG=this.GetFlashBGDataCallback(symbol,Date.now());data.Decimal=GetfloatPrecision(symbol);//小数位数
|
|
13558
13558
|
var item=this.Column[clickData.Header.Index];this.DrawItem(i,data,item,cellHeader.Left,textTop,3);textTop+=this.RowHeight;}};this.GetTooltipData=function(x,y){if(!IFrameSplitOperator.IsNonEmptyArray(this.TooltipRect))return null;for(var i=0;i<this.TooltipRect.length;++i){var item=this.TooltipRect[i];var rt=item.Rect;if(!rt)continue;if(x>=rt.Left&&x<=rt.Right&&y>=rt.Top&&y<=rt.Bottom){return{Rect:item.Rect,Stock:item.Stock,Column:item.Column,Index:item.Index,Type:item.Type,Data:item.Data};}}return null;};this.GetButtonData=function(x,y){if(!IFrameSplitOperator.IsNonEmptyArray(this.ButtonRect))return null;for(var i=0;i<this.ButtonRect.length;++i){var item=this.ButtonRect[i];var rt=item.Rect;if(!rt)continue;if(x>=rt.Left&&x<=rt.Right&&y>=rt.Top&&y<=rt.Bottom){return{Rect:item.Rect,Stock:item.Stock,Column:item.Column,Index:item.Index,Type:item.Type,Data:item.Data,ColumnIndex:item.ColumnIndex};}}};this.PtInHeaderDragBorder=function(x,y){if(!this.IsShowHeader)return null;var left=this.RectClient.Left;var right=this.RectClient.Right;var top=this.RectClient.Top;var bottom=top+this.HeaderHeight;if(!(x>=left&&x<=right&&y>=top&&y<=bottom))return null;var textLeft=left;var dragBarWidth=5*GetDevicePixelRatio();//固定列
|
|
@@ -14853,7 +14853,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14853
14853
|
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);};}/********************************************************************************
|
|
14854
14854
|
* 版本信息输出
|
|
14855
14855
|
*
|
|
14856
|
-
*/var HQCHART_VERSION="1.1.
|
|
14856
|
+
*/var HQCHART_VERSION="1.1.14612";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();//把给外界调用的方法暴露出来
|
|
14857
14857
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14858
14858
|
// BaseIndex:BaseIndex,
|
|
14859
14859
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -8724,7 +8724,8 @@ function ChartReport()
|
|
|
8724
8724
|
var clickData=drag.ClickData;
|
|
8725
8725
|
var rtHeader=clickData.Header.Rect;
|
|
8726
8726
|
var headerWidth=rtHeader.Right-rtHeader.Left;
|
|
8727
|
-
|
|
8727
|
+
|
|
8728
|
+
var rtRow={ Left:drag.MovePoint.X-headerWidth/2, Top:this.RectClient.Top+this.HeaderHeight, Width:headerWidth };
|
|
8728
8729
|
rtRow.Bottom=rtRow.Top+this.HeaderHeight+this.RowHeight*this.RowCount+this.FixedRowHeight*this.FixedRowCount;
|
|
8729
8730
|
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
8730
8731
|
rtRow.Height=rtRow.Bottom-rtRow.Top;
|
|
@@ -141738,7 +141738,8 @@ function ChartReport()
|
|
|
141738
141738
|
var clickData=drag.ClickData;
|
|
141739
141739
|
var rtHeader=clickData.Header.Rect;
|
|
141740
141740
|
var headerWidth=rtHeader.Right-rtHeader.Left;
|
|
141741
|
-
|
|
141741
|
+
|
|
141742
|
+
var rtRow={ Left:drag.MovePoint.X-headerWidth/2, Top:this.RectClient.Top+this.HeaderHeight, Width:headerWidth };
|
|
141742
141743
|
rtRow.Bottom=rtRow.Top+this.HeaderHeight+this.RowHeight*this.RowCount+this.FixedRowHeight*this.FixedRowCount;
|
|
141743
141744
|
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
141744
141745
|
rtRow.Height=rtRow.Bottom-rtRow.Top;
|
|
@@ -146032,7 +146033,7 @@ function ScrollBarBGChart()
|
|
|
146032
146033
|
|
|
146033
146034
|
|
|
146034
146035
|
|
|
146035
|
-
var HQCHART_VERSION="1.1.
|
|
146036
|
+
var HQCHART_VERSION="1.1.14612";
|
|
146036
146037
|
|
|
146037
146038
|
function PrintHQChartVersion()
|
|
146038
146039
|
{
|
|
@@ -141782,7 +141782,8 @@ function ChartReport()
|
|
|
141782
141782
|
var clickData=drag.ClickData;
|
|
141783
141783
|
var rtHeader=clickData.Header.Rect;
|
|
141784
141784
|
var headerWidth=rtHeader.Right-rtHeader.Left;
|
|
141785
|
-
|
|
141785
|
+
|
|
141786
|
+
var rtRow={ Left:drag.MovePoint.X-headerWidth/2, Top:this.RectClient.Top+this.HeaderHeight, Width:headerWidth };
|
|
141786
141787
|
rtRow.Bottom=rtRow.Top+this.HeaderHeight+this.RowHeight*this.RowCount+this.FixedRowHeight*this.FixedRowCount;
|
|
141787
141788
|
rtRow.Right=rtRow.Left+rtRow.Width;
|
|
141788
141789
|
rtRow.Height=rtRow.Bottom-rtRow.Top;
|
|
@@ -156744,7 +156745,7 @@ function HQChartScriptWorker()
|
|
|
156744
156745
|
|
|
156745
156746
|
|
|
156746
156747
|
|
|
156747
|
-
var HQCHART_VERSION="1.1.
|
|
156748
|
+
var HQCHART_VERSION="1.1.14612";
|
|
156748
156749
|
|
|
156749
156750
|
function PrintHQChartVersion()
|
|
156750
156751
|
{
|