hqchart 1.1.13638 → 1.1.13640
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
|
@@ -2063,7 +2063,12 @@ return fixValue;}function ToFixedRect(value){// With a bitwise or.
|
|
|
2063
2063
|
//value*=GetDevicePixelRatio();
|
|
2064
2064
|
var rounded;return rounded=0.5+value<<0;}//深拷贝
|
|
2065
2065
|
function CloneData(data){if(!data)return null;var strData=(0,_stringify2.default)(data);var item=JSON.parse(strData);return item;}function IsRecvOverlap(rect1,rect2){return Math.max(rect1.Left,rect2.Left)<Math.min(rect1.Right,rect2.Right)&&Math.max(rect1.Top,rect2.Top)<Math.min(rect1.Bottom,rect2.Bottom);}function CopyMarginConfig(dest,src){if(!src||!dest)return;if(IFrameSplitOperator.IsNumber(src.Left))dest.Left=src.Left;if(IFrameSplitOperator.IsNumber(src.Top))dest.Top=src.Top;if(IFrameSplitOperator.IsNumber(src.Right))dest.Right=src.Right;if(IFrameSplitOperator.IsNumber(src.Bottom))dest.Bottom=src.Bottom;}//兼容老版本
|
|
2066
|
-
function CopyMerginConfig(dest,src){CopyMarginConfig(dest,src);}
|
|
2066
|
+
function CopyMerginConfig(dest,src){CopyMarginConfig(dest,src);}//数值比较
|
|
2067
|
+
function NumberCompare(){}//<
|
|
2068
|
+
NumberCompare.LT=function(left,right){if(IFrameSplitOperator.IsNumberV2(left,right)){//==
|
|
2069
|
+
if(Math.abs(left-right)<0.0000001)return false;}return left<right;};//>
|
|
2070
|
+
NumberCompare.GT=function(left,right){if(IFrameSplitOperator.IsNumberV2(left,right)){//==
|
|
2071
|
+
if(Math.abs(left-right)<0.0000001)return false;}return left>right;};function Point(){this.X;this.Y;}function SelectRectData(){this.Data;//主数据
|
|
2067
2072
|
this.JSChartContainer;//行情控件
|
|
2068
2073
|
this.Start;//数据起始位子
|
|
2069
2074
|
this.End;//数据结束位置
|
|
@@ -2235,7 +2240,7 @@ var leftExtendText=null;//左侧文字设置
|
|
|
2235
2240
|
if(IFrameSplitOperator.IsNonEmptyArray(this.YTextExtend)){leftExtendText=this.YTextExtend[0];rightExtendText=this.YTextExtend[1];}var yPrev=null;//上一个坐标y的值
|
|
2236
2241
|
var pixelRatio=GetDevicePixelRatio();var itemHeight=(border.BottomEx-border.TopEx)/this.HorizontalInfo.length;var aryMultiText=[];var rtPreRight,rtRight,rtLeft,rtPreLeft;var textBaseline=0;//0=上 1=中 2=下
|
|
2237
2242
|
for(var i=this.HorizontalInfo.length-1;i>=0;--i)//从上往下画分割线
|
|
2238
|
-
{var item=this.HorizontalInfo[i];if(!IFrameSplitOperator.IsNumber(item.Value))continue;if(item.Value
|
|
2243
|
+
{var item=this.HorizontalInfo[i];if(!IFrameSplitOperator.IsNumber(item.Value))continue;if(NumberCompare.GT(item.Value,this.HorizontalMax)||NumberCompare.LT(item.Value,this.HorizontalMin))continue;var y=this.GetYFromData(item.Value);if(y!=null&&yPrev!=null&&Math.abs(y-yPrev)<this.MinYDistance)continue;//两个坐标在近了 就不画了
|
|
2239
2244
|
var yFixed=ToFixedPoint(y);//绘制刻度线
|
|
2240
2245
|
if(y!=bottom&&this.IsShowYLine){var bChangeLineWidth=false;if(IFrameSplitOperator.IsPlusNumber(item.LineWidth))//刻度线宽度
|
|
2241
2246
|
{this.Canvas.lineWidth=item.LineWidth*pixelRatio;bChangeLineWidth=true;}this.Canvas.strokeStyle=item.LineColor;if(item.LineType==2){this.Canvas.save();if(item.LineDash)this.Canvas.setLineDash(item.LineDash);else this.Canvas.setLineDash([5*pixelRatio,5*pixelRatio]);//虚线
|
|
@@ -13424,7 +13429,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
13424
13429
|
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);};}/********************************************************************************
|
|
13425
13430
|
* 版本信息输出
|
|
13426
13431
|
*
|
|
13427
|
-
*/var HQCHART_VERSION="1.1.
|
|
13432
|
+
*/var HQCHART_VERSION="1.1.13639";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();//把给外界调用的方法暴露出来
|
|
13428
13433
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
13429
13434
|
// BaseIndex:BaseIndex,
|
|
13430
13435
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -9933,6 +9933,36 @@ function CopyMarginConfig(dest,src)
|
|
|
9933
9933
|
function CopyMerginConfig(dest,src) { CopyMarginConfig(dest,src); }
|
|
9934
9934
|
|
|
9935
9935
|
|
|
9936
|
+
//数值比较
|
|
9937
|
+
function NumberCompare() { }
|
|
9938
|
+
|
|
9939
|
+
//<
|
|
9940
|
+
NumberCompare.LT=function(left, right)
|
|
9941
|
+
{
|
|
9942
|
+
if (IFrameSplitOperator.IsNumberV2(left, right))
|
|
9943
|
+
{
|
|
9944
|
+
//==
|
|
9945
|
+
if (Math.abs(left - right)< 0.0000001) return false;
|
|
9946
|
+
}
|
|
9947
|
+
|
|
9948
|
+
return left<right;
|
|
9949
|
+
}
|
|
9950
|
+
|
|
9951
|
+
//>
|
|
9952
|
+
NumberCompare.GT=function(left, right)
|
|
9953
|
+
{
|
|
9954
|
+
if (IFrameSplitOperator.IsNumberV2(left, right))
|
|
9955
|
+
{
|
|
9956
|
+
//==
|
|
9957
|
+
if (Math.abs(left - right)< 0.0000001) return false;
|
|
9958
|
+
}
|
|
9959
|
+
|
|
9960
|
+
return left>right;
|
|
9961
|
+
}
|
|
9962
|
+
|
|
9963
|
+
|
|
9964
|
+
|
|
9965
|
+
|
|
9936
9966
|
function Point()
|
|
9937
9967
|
{
|
|
9938
9968
|
this.X;
|
|
@@ -11091,7 +11121,8 @@ function AverageWidthFrame()
|
|
|
11091
11121
|
{
|
|
11092
11122
|
var item=this.HorizontalInfo[i];
|
|
11093
11123
|
if (!IFrameSplitOperator.IsNumber(item.Value)) continue;
|
|
11094
|
-
if (item.Value
|
|
11124
|
+
if (NumberCompare.GT(item.Value,this.HorizontalMax) || NumberCompare.LT(item.Value,this.HorizontalMin))
|
|
11125
|
+
continue;
|
|
11095
11126
|
|
|
11096
11127
|
var y=this.GetYFromData(item.Value);
|
|
11097
11128
|
if (y!=null && yPrev!=null && Math.abs(y-yPrev)<this.MinYDistance) continue; //两个坐标在近了 就不画了
|
|
@@ -13858,6 +13858,36 @@ function CopyMarginConfig(dest,src)
|
|
|
13858
13858
|
function CopyMerginConfig(dest,src) { CopyMarginConfig(dest,src); }
|
|
13859
13859
|
|
|
13860
13860
|
|
|
13861
|
+
//数值比较
|
|
13862
|
+
function NumberCompare() { }
|
|
13863
|
+
|
|
13864
|
+
//<
|
|
13865
|
+
NumberCompare.LT=function(left, right)
|
|
13866
|
+
{
|
|
13867
|
+
if (IFrameSplitOperator.IsNumberV2(left, right))
|
|
13868
|
+
{
|
|
13869
|
+
//==
|
|
13870
|
+
if (Math.abs(left - right)< 0.0000001) return false;
|
|
13871
|
+
}
|
|
13872
|
+
|
|
13873
|
+
return left<right;
|
|
13874
|
+
}
|
|
13875
|
+
|
|
13876
|
+
//>
|
|
13877
|
+
NumberCompare.GT=function(left, right)
|
|
13878
|
+
{
|
|
13879
|
+
if (IFrameSplitOperator.IsNumberV2(left, right))
|
|
13880
|
+
{
|
|
13881
|
+
//==
|
|
13882
|
+
if (Math.abs(left - right)< 0.0000001) return false;
|
|
13883
|
+
}
|
|
13884
|
+
|
|
13885
|
+
return left>right;
|
|
13886
|
+
}
|
|
13887
|
+
|
|
13888
|
+
|
|
13889
|
+
|
|
13890
|
+
|
|
13861
13891
|
function Point()
|
|
13862
13892
|
{
|
|
13863
13893
|
this.X;
|
|
@@ -15016,7 +15046,8 @@ function AverageWidthFrame()
|
|
|
15016
15046
|
{
|
|
15017
15047
|
var item=this.HorizontalInfo[i];
|
|
15018
15048
|
if (!IFrameSplitOperator.IsNumber(item.Value)) continue;
|
|
15019
|
-
if (item.Value
|
|
15049
|
+
if (NumberCompare.GT(item.Value,this.HorizontalMax) || NumberCompare.LT(item.Value,this.HorizontalMin))
|
|
15050
|
+
continue;
|
|
15020
15051
|
|
|
15021
15052
|
var y=this.GetYFromData(item.Value);
|
|
15022
15053
|
if (y!=null && yPrev!=null && Math.abs(y-yPrev)<this.MinYDistance) continue; //两个坐标在近了 就不画了
|
|
@@ -137410,7 +137441,7 @@ function ScrollBarBGChart()
|
|
|
137410
137441
|
|
|
137411
137442
|
|
|
137412
137443
|
|
|
137413
|
-
var HQCHART_VERSION="1.1.
|
|
137444
|
+
var HQCHART_VERSION="1.1.13639";
|
|
137414
137445
|
|
|
137415
137446
|
function PrintHQChartVersion()
|
|
137416
137447
|
{
|
|
@@ -13902,6 +13902,36 @@ function CopyMarginConfig(dest,src)
|
|
|
13902
13902
|
function CopyMerginConfig(dest,src) { CopyMarginConfig(dest,src); }
|
|
13903
13903
|
|
|
13904
13904
|
|
|
13905
|
+
//数值比较
|
|
13906
|
+
function NumberCompare() { }
|
|
13907
|
+
|
|
13908
|
+
//<
|
|
13909
|
+
NumberCompare.LT=function(left, right)
|
|
13910
|
+
{
|
|
13911
|
+
if (IFrameSplitOperator.IsNumberV2(left, right))
|
|
13912
|
+
{
|
|
13913
|
+
//==
|
|
13914
|
+
if (Math.abs(left - right)< 0.0000001) return false;
|
|
13915
|
+
}
|
|
13916
|
+
|
|
13917
|
+
return left<right;
|
|
13918
|
+
}
|
|
13919
|
+
|
|
13920
|
+
//>
|
|
13921
|
+
NumberCompare.GT=function(left, right)
|
|
13922
|
+
{
|
|
13923
|
+
if (IFrameSplitOperator.IsNumberV2(left, right))
|
|
13924
|
+
{
|
|
13925
|
+
//==
|
|
13926
|
+
if (Math.abs(left - right)< 0.0000001) return false;
|
|
13927
|
+
}
|
|
13928
|
+
|
|
13929
|
+
return left>right;
|
|
13930
|
+
}
|
|
13931
|
+
|
|
13932
|
+
|
|
13933
|
+
|
|
13934
|
+
|
|
13905
13935
|
function Point()
|
|
13906
13936
|
{
|
|
13907
13937
|
this.X;
|
|
@@ -15060,7 +15090,8 @@ function AverageWidthFrame()
|
|
|
15060
15090
|
{
|
|
15061
15091
|
var item=this.HorizontalInfo[i];
|
|
15062
15092
|
if (!IFrameSplitOperator.IsNumber(item.Value)) continue;
|
|
15063
|
-
if (item.Value
|
|
15093
|
+
if (NumberCompare.GT(item.Value,this.HorizontalMax) || NumberCompare.LT(item.Value,this.HorizontalMin))
|
|
15094
|
+
continue;
|
|
15064
15095
|
|
|
15065
15096
|
var y=this.GetYFromData(item.Value);
|
|
15066
15097
|
if (y!=null && yPrev!=null && Math.abs(y-yPrev)<this.MinYDistance) continue; //两个坐标在近了 就不画了
|
|
@@ -141368,7 +141399,7 @@ function HQChartScriptWorker()
|
|
|
141368
141399
|
|
|
141369
141400
|
|
|
141370
141401
|
|
|
141371
|
-
var HQCHART_VERSION="1.1.
|
|
141402
|
+
var HQCHART_VERSION="1.1.13639";
|
|
141372
141403
|
|
|
141373
141404
|
function PrintHQChartVersion()
|
|
141374
141405
|
{
|