hqchart 1.1.14404 → 1.1.14408
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
|
@@ -5487,22 +5487,20 @@ this.GetOverlayMaxMin=function(){if(!this.HQChart)return null;if(!this.HQChart.F
|
|
|
5487
5487
|
for(var j=0;j<item.ChartPaint.length;++j){var paint=item.ChartPaint[j];if(paint.IsShow==false)continue;var value=paint.GetMaxMin();if(value==null||value.Max==null||value.Min==null)continue;if(range.Max==null||range.Max<value.Max)range.Max=value.Max;if(range.Min==null||range.Min>value.Min)range.Min=value.Min;}}return range;};this.USASplit=function(range){var max=range.Max;var min=range.Min;if(max==min){max=max+max*0.1;min=min-min*0.1;}else{var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
5488
5488
|
var height=this.Frame.ChartBorder.GetHeight();//画布的高度
|
|
5489
5489
|
var spacePrice=5*pixelTatio*(max-min)/height;max+=spacePrice;min-=spacePrice;if(min<0)min=range.Min;}var showCount=this.SplitCount;var distance=(max-min)/(showCount-1);var minDistance=[1,0.1,0.01,0.001,0.0001];var defaultfloatPrecision=GetfloatPrecision(this.Symbol);if(distance<minDistance[defaultfloatPrecision]){distance=minDistance[defaultfloatPrecision];max=min+distance*showCount;//min=this.YClose-(distance*(showCount-1)/2);
|
|
5490
|
-
}for(var i=0;i<showCount;++i){var price=min+distance*i;if(this.YClose&&price==this.YClose)continue;var coordinate=new CoordinateInfo();coordinate.Value=price;
|
|
5491
|
-
if(this.IsShowLeftText)coordinate.Message[0]=strPrice;if(this.YClose&&this.YClose!=0){var per=(price/this.YClose-1)*100;if(per>0)coordinate.TextColor=g_JSChartResource.UpTextColor;else if(per<0)coordinate.TextColor=g_JSChartResource.DownTextColor;var strPer=IFrameSplitOperator.FormatValueString(per,2)+'%';if(this.IsShowRightText){if(this.RightTextFormat==1){coordinate.Message[1]=strPrice;}else if(this.RightTextFormat==2)//价格/百分比
|
|
5492
|
-
{coordinate.Message[1]=[strPrice,strPer];}else{coordinate.Message[1]=strPer;//百分比
|
|
5493
|
-
}}}this.Frame.HorizontalInfo.push(coordinate);}if(this.YClose>min&&this.YClose<max)//前收盘线
|
|
5490
|
+
}for(var i=0;i<showCount;++i){var price=min+distance*i;if(this.YClose&&price==this.YClose)continue;var coordinate=new CoordinateInfo();coordinate.Value=price;this.FormatCoordinate(coordinate,defaultfloatPrecision);this.Frame.HorizontalInfo.push(coordinate);}if(this.YClose>min&&this.YClose<max)//前收盘线
|
|
5494
5491
|
{var coordinate=new CoordinateInfo();coordinate.Value=this.YClose;coordinate.LineType=2;//中间的线画虚线
|
|
5495
5492
|
if(g_JSChartResource.FrameDotSplitPen)coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;var strPrice=this.YClose.toFixed(defaultfloatPrecision);//价格刻度字符串
|
|
5496
5493
|
if(this.IsShowLeftText)coordinate.Message[0]=strPrice;if(this.IsShowRightText){if(this.RightTextFormat==1)coordinate.Message[1]=strPrice;else coordinate.Message[1]='0.00%';//百分比
|
|
5497
|
-
}this.Frame.HorizontalInfo.push(coordinate);}this.Frame.HorizontalInfo.sort(function(a,b){return a.Value-b.Value;});this.Frame.HorizontalMax=max;this.Frame.HorizontalMin=min;};this.DefaultSplit=function(range,isFixedMaxMin){var max=range.Max;var min=range.Min;if(!isFixedMaxMin){if(this.YClose==max&&this.YClose==min){max=this.YClose+this.YClose*0.1;min=this.YClose-this.YClose*0.1;}else{var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));max=this.YClose+distanceValue;min=this.YClose-distanceValue
|
|
5494
|
+
}this.Frame.HorizontalInfo.push(coordinate);}this.Frame.HorizontalInfo.sort(function(a,b){return a.Value-b.Value;});this.Frame.HorizontalMax=max;this.Frame.HorizontalMin=min;};this.DefaultSplit=function(range,isFixedMaxMin){var max=range.Max;var min=range.Min;if(!isFixedMaxMin){if(this.YClose==max&&this.YClose==min){max=this.YClose+this.YClose*0.1;min=this.YClose-this.YClose*0.1;}else{var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));max=this.YClose+distanceValue;min=this.YClose-distanceValue;//if (min<0) min=range.Min;
|
|
5495
|
+
}}var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
5498
5496
|
var width=this.Frame.ChartBorder.GetChartWidth();//画布的宽度
|
|
5499
5497
|
var isPhoneModel=width<450*pixelTatio;JSConsole.Chart.Log('[FrameSplitMinutePriceY]'+'max='+max+' min='+min+' isPhoneModel='+isPhoneModel);var showCount=this.SplitCount;var distance=(max-min)/(showCount-1);var minDistance=[1,0.1,0.01,0.001,0.0001];var defaultfloatPrecision=GetfloatPrecision(this.Symbol);if(isPhoneModel&&MARKET_SUFFIX_NAME.IsSHSZIndex(this.Symbol))defaultfloatPrecision=0;//手机端指数不显示小数位数,太长了
|
|
5500
|
-
if(distance<minDistance[defaultfloatPrecision]&&!isFixedMaxMin){distance=minDistance[defaultfloatPrecision];max=this.YClose+distance*(showCount-1)/2;min=this.YClose-distance*(showCount-1)/2;}for(var i=0;i<
|
|
5498
|
+
if(distance<minDistance[defaultfloatPrecision]&&!isFixedMaxMin){distance=minDistance[defaultfloatPrecision];max=this.YClose+distance*(showCount-1)/2;min=this.YClose-distance*(showCount-1)/2;}var aryCoordinate=[];var extendValue=distance*0.5;for(var price=this.YClose,i=0;price<=max+extendValue&&i<30;price+=distance,++i){var coordinate=new CoordinateInfo();coordinate.Value=price;this.FormatCoordinate(coordinate,defaultfloatPrecision);aryCoordinate.push(coordinate);}for(var price=this.YClose-distance,i=0;price>=min-extendValue&&i<30;price-=distance,++i){var coordinate=new CoordinateInfo();coordinate.Value=price;this.FormatCoordinate(coordinate,defaultfloatPrecision);aryCoordinate.push(coordinate);}aryCoordinate.sort(function(left,right){return left.Value-right.Value;});this.Frame.HorizontalInfo=aryCoordinate;this.Frame.HorizontalMax=max;this.Frame.HorizontalMin=min;};this.FormatCoordinate=function(coordinate,defaultfloatPrecision){var price=coordinate.Value;var strPrice=price.toFixed(defaultfloatPrecision);//价格刻度字符串
|
|
5501
5499
|
if(this.IsShowLeftText)coordinate.Message[0]=strPrice;if(IFrameSplitOperator.IsNumber(this.YClose)&&this.YClose!=0){var per=(price/this.YClose-1)*100;if(per>0)coordinate.TextColor=g_JSChartResource.UpTextColor;else if(per<0)coordinate.TextColor=g_JSChartResource.DownTextColor;var strPer=IFrameSplitOperator.FormatValueString(per,2)+'%';if(this.IsShowRightText){if(this.RightTextFormat==1){coordinate.Message[1]=strPrice;}else if(this.RightTextFormat==2)//价格/百分比
|
|
5502
5500
|
{coordinate.Message[1]=[strPer,strPrice];}else{coordinate.Message[1]=strPer;//百分比
|
|
5503
5501
|
}}if(Math.abs(price-this.YClose)<0.00000000001)//小数有精度问题 使用差值
|
|
5504
5502
|
{coordinate.LineType=2;//中间的线画虚线
|
|
5505
|
-
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;if(g_JSChartResource.FrameDotSplitPen)coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;}}}
|
|
5503
|
+
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;if(g_JSChartResource.FrameDotSplitPen)coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;}}};}function FrameSplitMinuteX(){this.newMethod=IFrameSplitOperator;//派生
|
|
5506
5504
|
this.newMethod();delete this.newMethod;this.ShowText=true;//是否显示坐标信息
|
|
5507
5505
|
this.Symbol=null;//股票代码 x轴刻度根据股票类型来调整
|
|
5508
5506
|
this.DayCount=1;this.DateFormat=0;//0=MM-DD 1=MM/DD 2=MM/DD/Week
|
|
@@ -14324,7 +14322,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14324
14322
|
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);};}/********************************************************************************
|
|
14325
14323
|
* 版本信息输出
|
|
14326
14324
|
*
|
|
14327
|
-
*/var HQCHART_VERSION="1.1.
|
|
14325
|
+
*/var HQCHART_VERSION="1.1.14407";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();//把给外界调用的方法暴露出来
|
|
14328
14326
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14329
14327
|
// BaseIndex:BaseIndex,
|
|
14330
14328
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -52794,32 +52794,7 @@ function FrameSplitMinutePriceY()
|
|
|
52794
52794
|
if (this.YClose && price==this.YClose) continue;
|
|
52795
52795
|
var coordinate=new CoordinateInfo();
|
|
52796
52796
|
coordinate.Value=price;
|
|
52797
|
-
|
|
52798
|
-
if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
|
|
52799
|
-
|
|
52800
|
-
if (this.YClose && this.YClose!=0)
|
|
52801
|
-
{
|
|
52802
|
-
var per=(price/this.YClose-1)*100;
|
|
52803
|
-
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
52804
|
-
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
52805
|
-
var strPer=IFrameSplitOperator.FormatValueString(per,2)+'%';
|
|
52806
|
-
if (this.IsShowRightText)
|
|
52807
|
-
{
|
|
52808
|
-
if (this.RightTextFormat==1)
|
|
52809
|
-
{
|
|
52810
|
-
coordinate.Message[1]=strPrice;
|
|
52811
|
-
}
|
|
52812
|
-
else if (this.RightTextFormat==2) //价格/百分比
|
|
52813
|
-
{
|
|
52814
|
-
coordinate.Message[1]=[strPrice,strPer];
|
|
52815
|
-
}
|
|
52816
|
-
else
|
|
52817
|
-
{
|
|
52818
|
-
coordinate.Message[1]=strPer; //百分比
|
|
52819
|
-
}
|
|
52820
|
-
}
|
|
52821
|
-
}
|
|
52822
|
-
|
|
52797
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
52823
52798
|
this.Frame.HorizontalInfo.push(coordinate);
|
|
52824
52799
|
}
|
|
52825
52800
|
|
|
@@ -52865,7 +52840,7 @@ function FrameSplitMinutePriceY()
|
|
|
52865
52840
|
var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
|
|
52866
52841
|
max=this.YClose+distanceValue;
|
|
52867
52842
|
min=this.YClose-distanceValue;
|
|
52868
|
-
if (min<0) min=range.Min;
|
|
52843
|
+
//if (min<0) min=range.Min;
|
|
52869
52844
|
}
|
|
52870
52845
|
}
|
|
52871
52846
|
|
|
@@ -52886,49 +52861,67 @@ function FrameSplitMinutePriceY()
|
|
|
52886
52861
|
min=this.YClose-(distance*(showCount-1)/2);
|
|
52887
52862
|
}
|
|
52888
52863
|
|
|
52889
|
-
|
|
52864
|
+
var aryCoordinate=[];
|
|
52865
|
+
var extendValue=distance*0.5;
|
|
52866
|
+
for(var price=this.YClose, i=0; price<=max+extendValue && i<30; price+=distance, ++i)
|
|
52867
|
+
{
|
|
52868
|
+
var coordinate=new CoordinateInfo();
|
|
52869
|
+
coordinate.Value=price;
|
|
52870
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
52871
|
+
aryCoordinate.push(coordinate);
|
|
52872
|
+
}
|
|
52873
|
+
|
|
52874
|
+
for(var price=this.YClose-distance, i=0; price>=min-extendValue && i<30; price-=distance, ++i)
|
|
52890
52875
|
{
|
|
52891
|
-
var price=min+(distance*i);
|
|
52892
52876
|
var coordinate=new CoordinateInfo();
|
|
52893
|
-
this.Frame.HorizontalInfo[i]=coordinate
|
|
52894
52877
|
coordinate.Value=price;
|
|
52895
|
-
|
|
52896
|
-
|
|
52878
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
52879
|
+
aryCoordinate.push(coordinate);
|
|
52880
|
+
}
|
|
52881
|
+
|
|
52882
|
+
aryCoordinate.sort((left,right)=>{ return left.Value-right.Value; })
|
|
52883
|
+
|
|
52884
|
+
this.Frame.HorizontalInfo=aryCoordinate;
|
|
52885
|
+
this.Frame.HorizontalMax=max;
|
|
52886
|
+
this.Frame.HorizontalMin=min;
|
|
52887
|
+
}
|
|
52888
|
+
|
|
52889
|
+
this.FormatCoordinate=function(coordinate, defaultfloatPrecision)
|
|
52890
|
+
{
|
|
52891
|
+
var price=coordinate.Value;
|
|
52892
|
+
var strPrice=price.toFixed(defaultfloatPrecision); //价格刻度字符串
|
|
52893
|
+
if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
|
|
52897
52894
|
|
|
52898
|
-
|
|
52895
|
+
if (IFrameSplitOperator.IsNumber(this.YClose) && this.YClose!=0)
|
|
52896
|
+
{
|
|
52897
|
+
var per=(price/this.YClose-1)*100;
|
|
52898
|
+
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
52899
|
+
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
52900
|
+
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
52901
|
+
|
|
52902
|
+
if (this.IsShowRightText)
|
|
52899
52903
|
{
|
|
52900
|
-
|
|
52901
|
-
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
52902
|
-
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
52903
|
-
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
52904
|
-
if (this.IsShowRightText)
|
|
52904
|
+
if (this.RightTextFormat==1)
|
|
52905
52905
|
{
|
|
52906
|
-
|
|
52907
|
-
{
|
|
52908
|
-
coordinate.Message[1]=strPrice;
|
|
52909
|
-
}
|
|
52910
|
-
else if (this.RightTextFormat==2) //价格/百分比
|
|
52911
|
-
{
|
|
52912
|
-
coordinate.Message[1]=[strPer,strPrice];
|
|
52913
|
-
}
|
|
52914
|
-
else
|
|
52915
|
-
{
|
|
52916
|
-
coordinate.Message[1]=strPer; //百分比
|
|
52917
|
-
}
|
|
52906
|
+
coordinate.Message[1]=strPrice;
|
|
52918
52907
|
}
|
|
52919
|
-
|
|
52920
|
-
|
|
52908
|
+
else if (this.RightTextFormat==2) //价格/百分比
|
|
52909
|
+
{
|
|
52910
|
+
coordinate.Message[1]=[strPer,strPrice];
|
|
52911
|
+
}
|
|
52912
|
+
else
|
|
52921
52913
|
{
|
|
52922
|
-
coordinate.
|
|
52923
|
-
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
52924
|
-
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
52914
|
+
coordinate.Message[1]=strPer; //百分比
|
|
52925
52915
|
}
|
|
52926
52916
|
}
|
|
52927
|
-
|
|
52928
|
-
}
|
|
52929
52917
|
|
|
52930
|
-
|
|
52931
|
-
|
|
52918
|
+
if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
|
|
52919
|
+
{
|
|
52920
|
+
coordinate.LineType=2;//中间的线画虚线
|
|
52921
|
+
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
52922
|
+
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
52923
|
+
}
|
|
52924
|
+
}
|
|
52932
52925
|
}
|
|
52933
52926
|
|
|
52934
52927
|
}
|
|
@@ -56719,32 +56719,7 @@ function FrameSplitMinutePriceY()
|
|
|
56719
56719
|
if (this.YClose && price==this.YClose) continue;
|
|
56720
56720
|
var coordinate=new CoordinateInfo();
|
|
56721
56721
|
coordinate.Value=price;
|
|
56722
|
-
|
|
56723
|
-
if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
|
|
56724
|
-
|
|
56725
|
-
if (this.YClose && this.YClose!=0)
|
|
56726
|
-
{
|
|
56727
|
-
var per=(price/this.YClose-1)*100;
|
|
56728
|
-
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
56729
|
-
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
56730
|
-
var strPer=IFrameSplitOperator.FormatValueString(per,2)+'%';
|
|
56731
|
-
if (this.IsShowRightText)
|
|
56732
|
-
{
|
|
56733
|
-
if (this.RightTextFormat==1)
|
|
56734
|
-
{
|
|
56735
|
-
coordinate.Message[1]=strPrice;
|
|
56736
|
-
}
|
|
56737
|
-
else if (this.RightTextFormat==2) //价格/百分比
|
|
56738
|
-
{
|
|
56739
|
-
coordinate.Message[1]=[strPrice,strPer];
|
|
56740
|
-
}
|
|
56741
|
-
else
|
|
56742
|
-
{
|
|
56743
|
-
coordinate.Message[1]=strPer; //百分比
|
|
56744
|
-
}
|
|
56745
|
-
}
|
|
56746
|
-
}
|
|
56747
|
-
|
|
56722
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
56748
56723
|
this.Frame.HorizontalInfo.push(coordinate);
|
|
56749
56724
|
}
|
|
56750
56725
|
|
|
@@ -56790,7 +56765,7 @@ function FrameSplitMinutePriceY()
|
|
|
56790
56765
|
var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
|
|
56791
56766
|
max=this.YClose+distanceValue;
|
|
56792
56767
|
min=this.YClose-distanceValue;
|
|
56793
|
-
if (min<0) min=range.Min;
|
|
56768
|
+
//if (min<0) min=range.Min;
|
|
56794
56769
|
}
|
|
56795
56770
|
}
|
|
56796
56771
|
|
|
@@ -56811,49 +56786,67 @@ function FrameSplitMinutePriceY()
|
|
|
56811
56786
|
min=this.YClose-(distance*(showCount-1)/2);
|
|
56812
56787
|
}
|
|
56813
56788
|
|
|
56814
|
-
|
|
56789
|
+
var aryCoordinate=[];
|
|
56790
|
+
var extendValue=distance*0.5;
|
|
56791
|
+
for(var price=this.YClose, i=0; price<=max+extendValue && i<30; price+=distance, ++i)
|
|
56792
|
+
{
|
|
56793
|
+
var coordinate=new CoordinateInfo();
|
|
56794
|
+
coordinate.Value=price;
|
|
56795
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
56796
|
+
aryCoordinate.push(coordinate);
|
|
56797
|
+
}
|
|
56798
|
+
|
|
56799
|
+
for(var price=this.YClose-distance, i=0; price>=min-extendValue && i<30; price-=distance, ++i)
|
|
56815
56800
|
{
|
|
56816
|
-
var price=min+(distance*i);
|
|
56817
56801
|
var coordinate=new CoordinateInfo();
|
|
56818
|
-
this.Frame.HorizontalInfo[i]=coordinate
|
|
56819
56802
|
coordinate.Value=price;
|
|
56820
|
-
|
|
56821
|
-
|
|
56803
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
56804
|
+
aryCoordinate.push(coordinate);
|
|
56805
|
+
}
|
|
56806
|
+
|
|
56807
|
+
aryCoordinate.sort((left,right)=>{ return left.Value-right.Value; })
|
|
56808
|
+
|
|
56809
|
+
this.Frame.HorizontalInfo=aryCoordinate;
|
|
56810
|
+
this.Frame.HorizontalMax=max;
|
|
56811
|
+
this.Frame.HorizontalMin=min;
|
|
56812
|
+
}
|
|
56813
|
+
|
|
56814
|
+
this.FormatCoordinate=function(coordinate, defaultfloatPrecision)
|
|
56815
|
+
{
|
|
56816
|
+
var price=coordinate.Value;
|
|
56817
|
+
var strPrice=price.toFixed(defaultfloatPrecision); //价格刻度字符串
|
|
56818
|
+
if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
|
|
56822
56819
|
|
|
56823
|
-
|
|
56820
|
+
if (IFrameSplitOperator.IsNumber(this.YClose) && this.YClose!=0)
|
|
56821
|
+
{
|
|
56822
|
+
var per=(price/this.YClose-1)*100;
|
|
56823
|
+
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
56824
|
+
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
56825
|
+
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
56826
|
+
|
|
56827
|
+
if (this.IsShowRightText)
|
|
56824
56828
|
{
|
|
56825
|
-
|
|
56826
|
-
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
56827
|
-
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
56828
|
-
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
56829
|
-
if (this.IsShowRightText)
|
|
56829
|
+
if (this.RightTextFormat==1)
|
|
56830
56830
|
{
|
|
56831
|
-
|
|
56832
|
-
{
|
|
56833
|
-
coordinate.Message[1]=strPrice;
|
|
56834
|
-
}
|
|
56835
|
-
else if (this.RightTextFormat==2) //价格/百分比
|
|
56836
|
-
{
|
|
56837
|
-
coordinate.Message[1]=[strPer,strPrice];
|
|
56838
|
-
}
|
|
56839
|
-
else
|
|
56840
|
-
{
|
|
56841
|
-
coordinate.Message[1]=strPer; //百分比
|
|
56842
|
-
}
|
|
56831
|
+
coordinate.Message[1]=strPrice;
|
|
56843
56832
|
}
|
|
56844
|
-
|
|
56845
|
-
|
|
56833
|
+
else if (this.RightTextFormat==2) //价格/百分比
|
|
56834
|
+
{
|
|
56835
|
+
coordinate.Message[1]=[strPer,strPrice];
|
|
56836
|
+
}
|
|
56837
|
+
else
|
|
56846
56838
|
{
|
|
56847
|
-
coordinate.
|
|
56848
|
-
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
56849
|
-
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
56839
|
+
coordinate.Message[1]=strPer; //百分比
|
|
56850
56840
|
}
|
|
56851
56841
|
}
|
|
56852
|
-
|
|
56853
|
-
}
|
|
56854
56842
|
|
|
56855
|
-
|
|
56856
|
-
|
|
56843
|
+
if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
|
|
56844
|
+
{
|
|
56845
|
+
coordinate.LineType=2;//中间的线画虚线
|
|
56846
|
+
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
56847
|
+
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
56848
|
+
}
|
|
56849
|
+
}
|
|
56857
56850
|
}
|
|
56858
56851
|
|
|
56859
56852
|
}
|
|
@@ -143358,7 +143351,7 @@ function ScrollBarBGChart()
|
|
|
143358
143351
|
|
|
143359
143352
|
|
|
143360
143353
|
|
|
143361
|
-
var HQCHART_VERSION="1.1.
|
|
143354
|
+
var HQCHART_VERSION="1.1.14407";
|
|
143362
143355
|
|
|
143363
143356
|
function PrintHQChartVersion()
|
|
143364
143357
|
{
|
|
@@ -56763,32 +56763,7 @@ function FrameSplitMinutePriceY()
|
|
|
56763
56763
|
if (this.YClose && price==this.YClose) continue;
|
|
56764
56764
|
var coordinate=new CoordinateInfo();
|
|
56765
56765
|
coordinate.Value=price;
|
|
56766
|
-
|
|
56767
|
-
if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
|
|
56768
|
-
|
|
56769
|
-
if (this.YClose && this.YClose!=0)
|
|
56770
|
-
{
|
|
56771
|
-
var per=(price/this.YClose-1)*100;
|
|
56772
|
-
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
56773
|
-
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
56774
|
-
var strPer=IFrameSplitOperator.FormatValueString(per,2)+'%';
|
|
56775
|
-
if (this.IsShowRightText)
|
|
56776
|
-
{
|
|
56777
|
-
if (this.RightTextFormat==1)
|
|
56778
|
-
{
|
|
56779
|
-
coordinate.Message[1]=strPrice;
|
|
56780
|
-
}
|
|
56781
|
-
else if (this.RightTextFormat==2) //价格/百分比
|
|
56782
|
-
{
|
|
56783
|
-
coordinate.Message[1]=[strPrice,strPer];
|
|
56784
|
-
}
|
|
56785
|
-
else
|
|
56786
|
-
{
|
|
56787
|
-
coordinate.Message[1]=strPer; //百分比
|
|
56788
|
-
}
|
|
56789
|
-
}
|
|
56790
|
-
}
|
|
56791
|
-
|
|
56766
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
56792
56767
|
this.Frame.HorizontalInfo.push(coordinate);
|
|
56793
56768
|
}
|
|
56794
56769
|
|
|
@@ -56834,7 +56809,7 @@ function FrameSplitMinutePriceY()
|
|
|
56834
56809
|
var distanceValue=Math.max(Math.abs(this.YClose-max),Math.abs(this.YClose-min));
|
|
56835
56810
|
max=this.YClose+distanceValue;
|
|
56836
56811
|
min=this.YClose-distanceValue;
|
|
56837
|
-
if (min<0) min=range.Min;
|
|
56812
|
+
//if (min<0) min=range.Min;
|
|
56838
56813
|
}
|
|
56839
56814
|
}
|
|
56840
56815
|
|
|
@@ -56855,49 +56830,67 @@ function FrameSplitMinutePriceY()
|
|
|
56855
56830
|
min=this.YClose-(distance*(showCount-1)/2);
|
|
56856
56831
|
}
|
|
56857
56832
|
|
|
56858
|
-
|
|
56833
|
+
var aryCoordinate=[];
|
|
56834
|
+
var extendValue=distance*0.5;
|
|
56835
|
+
for(var price=this.YClose, i=0; price<=max+extendValue && i<30; price+=distance, ++i)
|
|
56836
|
+
{
|
|
56837
|
+
var coordinate=new CoordinateInfo();
|
|
56838
|
+
coordinate.Value=price;
|
|
56839
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
56840
|
+
aryCoordinate.push(coordinate);
|
|
56841
|
+
}
|
|
56842
|
+
|
|
56843
|
+
for(var price=this.YClose-distance, i=0; price>=min-extendValue && i<30; price-=distance, ++i)
|
|
56859
56844
|
{
|
|
56860
|
-
var price=min+(distance*i);
|
|
56861
56845
|
var coordinate=new CoordinateInfo();
|
|
56862
|
-
this.Frame.HorizontalInfo[i]=coordinate
|
|
56863
56846
|
coordinate.Value=price;
|
|
56864
|
-
|
|
56865
|
-
|
|
56847
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
56848
|
+
aryCoordinate.push(coordinate);
|
|
56849
|
+
}
|
|
56850
|
+
|
|
56851
|
+
aryCoordinate.sort((left,right)=>{ return left.Value-right.Value; })
|
|
56852
|
+
|
|
56853
|
+
this.Frame.HorizontalInfo=aryCoordinate;
|
|
56854
|
+
this.Frame.HorizontalMax=max;
|
|
56855
|
+
this.Frame.HorizontalMin=min;
|
|
56856
|
+
}
|
|
56857
|
+
|
|
56858
|
+
this.FormatCoordinate=function(coordinate, defaultfloatPrecision)
|
|
56859
|
+
{
|
|
56860
|
+
var price=coordinate.Value;
|
|
56861
|
+
var strPrice=price.toFixed(defaultfloatPrecision); //价格刻度字符串
|
|
56862
|
+
if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
|
|
56866
56863
|
|
|
56867
|
-
|
|
56864
|
+
if (IFrameSplitOperator.IsNumber(this.YClose) && this.YClose!=0)
|
|
56865
|
+
{
|
|
56866
|
+
var per=(price/this.YClose-1)*100;
|
|
56867
|
+
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
56868
|
+
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
56869
|
+
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
56870
|
+
|
|
56871
|
+
if (this.IsShowRightText)
|
|
56868
56872
|
{
|
|
56869
|
-
|
|
56870
|
-
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
56871
|
-
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
56872
|
-
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
56873
|
-
if (this.IsShowRightText)
|
|
56873
|
+
if (this.RightTextFormat==1)
|
|
56874
56874
|
{
|
|
56875
|
-
|
|
56876
|
-
{
|
|
56877
|
-
coordinate.Message[1]=strPrice;
|
|
56878
|
-
}
|
|
56879
|
-
else if (this.RightTextFormat==2) //价格/百分比
|
|
56880
|
-
{
|
|
56881
|
-
coordinate.Message[1]=[strPer,strPrice];
|
|
56882
|
-
}
|
|
56883
|
-
else
|
|
56884
|
-
{
|
|
56885
|
-
coordinate.Message[1]=strPer; //百分比
|
|
56886
|
-
}
|
|
56875
|
+
coordinate.Message[1]=strPrice;
|
|
56887
56876
|
}
|
|
56888
|
-
|
|
56889
|
-
|
|
56877
|
+
else if (this.RightTextFormat==2) //价格/百分比
|
|
56878
|
+
{
|
|
56879
|
+
coordinate.Message[1]=[strPer,strPrice];
|
|
56880
|
+
}
|
|
56881
|
+
else
|
|
56890
56882
|
{
|
|
56891
|
-
coordinate.
|
|
56892
|
-
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
56893
|
-
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
56883
|
+
coordinate.Message[1]=strPer; //百分比
|
|
56894
56884
|
}
|
|
56895
56885
|
}
|
|
56896
|
-
|
|
56897
|
-
}
|
|
56898
56886
|
|
|
56899
|
-
|
|
56900
|
-
|
|
56887
|
+
if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
|
|
56888
|
+
{
|
|
56889
|
+
coordinate.LineType=2;//中间的线画虚线
|
|
56890
|
+
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
56891
|
+
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
56892
|
+
}
|
|
56893
|
+
}
|
|
56901
56894
|
}
|
|
56902
56895
|
|
|
56903
56896
|
}
|
|
@@ -153153,7 +153146,7 @@ function HQChartScriptWorker()
|
|
|
153153
153146
|
|
|
153154
153147
|
|
|
153155
153148
|
|
|
153156
|
-
var HQCHART_VERSION="1.1.
|
|
153149
|
+
var HQCHART_VERSION="1.1.14407";
|
|
153157
153150
|
|
|
153158
153151
|
function PrintHQChartVersion()
|
|
153159
153152
|
{
|