hqchart 1.1.14771 → 1.1.14773
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
|
@@ -13662,7 +13662,7 @@ this.Canvas.fillStyle=this.DragRowColor;this.Canvas.fillRect(rtRow.Left,rtRow.To
|
|
|
13662
13662
|
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);//小数位数
|
|
13663
13663
|
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();//固定列
|
|
13664
13664
|
for(var i=0;i<this.FixedColumn&&i<this.Column.length;++i){var item=this.Column[i];if(item.EnableDragWidth===true){var header={Right:textLeft+item.Width,Top:top,Bottom:bottom};header.Left=header.Right-dragBarWidth;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;if(item.EnableDragWidth===true){var header={Right:textLeft+item.Width,Top:top,Bottom:bottom};header.Left=header.Right-dragBarWidth;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;};//设置选中行 option={ Symbol:, AutoYScroll:true/false Y滚动条自定定位 }
|
|
13665
|
-
this.SetSelectedRow=function(option){if(!option)return false;if(this.SelectedModel===0)return false;if(option.Symbol){var symbol=option.Symbol;var bFinder=false;for(var i=0;i<this.Data.Data.length;++i){var item=this.Data.Data[i];if(symbol==item){this.SelectedRow=i;bFinder=true;break;}}if(!bFinder)return false;if(option.AutoYScroll===true){this.UpdatePageYOffset({SelectedRow:this.SelectedRow});}return bFinder;}return false;};this.UpdatePageYOffset=function(option){if(!option)return;var selectedRow=option.SelectedRow;if(selectedRow<0)return;var pageStatus=this.GetCurrentPageStatus();if(pageStatus.IsSinglePage)return;if(selectedRow>=pageStatus.Start&&selectedRow<=pageStatus.End)return;this.Data.YOffset=selectedRow;//选中行不在当前屏 设置为第1行
|
|
13665
|
+
this.SetSelectedRow=function(option){if(!option)return false;if(this.SelectedModel===0)return false;if(!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))return false;if(option.Symbol){var symbol=option.Symbol;var bFinder=false;if(this.SelectedRow>=0){var item=this.Data.Data[this.SelectedRow];if(symbol==item)bFinder=true;}if(!bFinder){for(var i=0;i<this.Data.Data.length;++i){var item=this.Data.Data[i];if(symbol==item){this.SelectedRow=i;bFinder=true;break;}}}if(!bFinder)return false;if(option.AutoYScroll===true){this.UpdatePageYOffset({SelectedRow:this.SelectedRow});}return bFinder;}return false;};this.UpdatePageYOffset=function(option){if(!option)return;var selectedRow=option.SelectedRow;if(selectedRow<0)return;var pageStatus=this.GetCurrentPageStatus();if(pageStatus.IsSinglePage)return;if(selectedRow>=pageStatus.Start&&selectedRow<=pageStatus.End)return;this.Data.YOffset=selectedRow;//选中行不在当前屏 设置为第1行
|
|
13666
13666
|
};}//报价列表底部tab和横向滚动条
|
|
13667
13667
|
function ChartReportTab(){this.Canvas;//画布
|
|
13668
13668
|
this.ChartBorder;//边框信息
|
|
@@ -14971,7 +14971,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14971
14971
|
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);};}/********************************************************************************
|
|
14972
14972
|
* 版本信息输出
|
|
14973
14973
|
*
|
|
14974
|
-
*/var HQCHART_VERSION="1.1.
|
|
14974
|
+
*/var HQCHART_VERSION="1.1.14772";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();//把给外界调用的方法暴露出来
|
|
14975
14975
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14976
14976
|
// BaseIndex:BaseIndex,
|
|
14977
14977
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
|
@@ -8887,19 +8887,30 @@ function ChartReport()
|
|
|
8887
8887
|
{
|
|
8888
8888
|
if (!option) return false;
|
|
8889
8889
|
if (this.SelectedModel===0) return false;
|
|
8890
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return false;
|
|
8890
8891
|
|
|
8891
8892
|
if (option.Symbol)
|
|
8892
8893
|
{
|
|
8893
8894
|
var symbol=option.Symbol;
|
|
8894
8895
|
var bFinder=false;
|
|
8895
|
-
|
|
8896
|
+
|
|
8897
|
+
if (this.SelectedRow>=0)
|
|
8896
8898
|
{
|
|
8897
|
-
var item=this.Data.Data[
|
|
8898
|
-
if (symbol==item)
|
|
8899
|
+
var item=this.Data.Data[this.SelectedRow];
|
|
8900
|
+
if (symbol==item) bFinder=true;
|
|
8901
|
+
}
|
|
8902
|
+
|
|
8903
|
+
if (!bFinder)
|
|
8904
|
+
{
|
|
8905
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
8899
8906
|
{
|
|
8900
|
-
this.
|
|
8901
|
-
|
|
8902
|
-
|
|
8907
|
+
var item=this.Data.Data[i];
|
|
8908
|
+
if (symbol==item)
|
|
8909
|
+
{
|
|
8910
|
+
this.SelectedRow=i;
|
|
8911
|
+
bFinder=true;
|
|
8912
|
+
break;
|
|
8913
|
+
}
|
|
8903
8914
|
}
|
|
8904
8915
|
}
|
|
8905
8916
|
|
|
@@ -144721,19 +144721,30 @@ function ChartReport()
|
|
|
144721
144721
|
{
|
|
144722
144722
|
if (!option) return false;
|
|
144723
144723
|
if (this.SelectedModel===0) return false;
|
|
144724
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return false;
|
|
144724
144725
|
|
|
144725
144726
|
if (option.Symbol)
|
|
144726
144727
|
{
|
|
144727
144728
|
var symbol=option.Symbol;
|
|
144728
144729
|
var bFinder=false;
|
|
144729
|
-
|
|
144730
|
+
|
|
144731
|
+
if (this.SelectedRow>=0)
|
|
144730
144732
|
{
|
|
144731
|
-
var item=this.Data.Data[
|
|
144732
|
-
if (symbol==item)
|
|
144733
|
+
var item=this.Data.Data[this.SelectedRow];
|
|
144734
|
+
if (symbol==item) bFinder=true;
|
|
144735
|
+
}
|
|
144736
|
+
|
|
144737
|
+
if (!bFinder)
|
|
144738
|
+
{
|
|
144739
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
144733
144740
|
{
|
|
144734
|
-
this.
|
|
144735
|
-
|
|
144736
|
-
|
|
144741
|
+
var item=this.Data.Data[i];
|
|
144742
|
+
if (symbol==item)
|
|
144743
|
+
{
|
|
144744
|
+
this.SelectedRow=i;
|
|
144745
|
+
bFinder=true;
|
|
144746
|
+
break;
|
|
144747
|
+
}
|
|
144737
144748
|
}
|
|
144738
144749
|
}
|
|
144739
144750
|
|
|
@@ -148888,7 +148899,7 @@ function ScrollBarBGChart()
|
|
|
148888
148899
|
|
|
148889
148900
|
|
|
148890
148901
|
|
|
148891
|
-
var HQCHART_VERSION="1.1.
|
|
148902
|
+
var HQCHART_VERSION="1.1.14772";
|
|
148892
148903
|
|
|
148893
148904
|
function PrintHQChartVersion()
|
|
148894
148905
|
{
|
|
@@ -144765,19 +144765,30 @@ function ChartReport()
|
|
|
144765
144765
|
{
|
|
144766
144766
|
if (!option) return false;
|
|
144767
144767
|
if (this.SelectedModel===0) return false;
|
|
144768
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Data.Data)) return false;
|
|
144768
144769
|
|
|
144769
144770
|
if (option.Symbol)
|
|
144770
144771
|
{
|
|
144771
144772
|
var symbol=option.Symbol;
|
|
144772
144773
|
var bFinder=false;
|
|
144773
|
-
|
|
144774
|
+
|
|
144775
|
+
if (this.SelectedRow>=0)
|
|
144774
144776
|
{
|
|
144775
|
-
var item=this.Data.Data[
|
|
144776
|
-
if (symbol==item)
|
|
144777
|
+
var item=this.Data.Data[this.SelectedRow];
|
|
144778
|
+
if (symbol==item) bFinder=true;
|
|
144779
|
+
}
|
|
144780
|
+
|
|
144781
|
+
if (!bFinder)
|
|
144782
|
+
{
|
|
144783
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
144777
144784
|
{
|
|
144778
|
-
this.
|
|
144779
|
-
|
|
144780
|
-
|
|
144785
|
+
var item=this.Data.Data[i];
|
|
144786
|
+
if (symbol==item)
|
|
144787
|
+
{
|
|
144788
|
+
this.SelectedRow=i;
|
|
144789
|
+
bFinder=true;
|
|
144790
|
+
break;
|
|
144791
|
+
}
|
|
144781
144792
|
}
|
|
144782
144793
|
}
|
|
144783
144794
|
|
|
@@ -159835,7 +159846,7 @@ function HQChartScriptWorker()
|
|
|
159835
159846
|
|
|
159836
159847
|
|
|
159837
159848
|
|
|
159838
|
-
var HQCHART_VERSION="1.1.
|
|
159849
|
+
var HQCHART_VERSION="1.1.14772";
|
|
159839
159850
|
|
|
159840
159851
|
function PrintHQChartVersion()
|
|
159841
159852
|
{
|