hqchart 1.1.14404 → 1.1.14406
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,58 @@ 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
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;}}var pixelTatio=GetDevicePixelRatio();//获取设备的分辨率
|
|
5498
5495
|
var width=this.Frame.ChartBorder.GetChartWidth();//画布的宽度
|
|
5499
5496
|
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<
|
|
5497
|
+
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;});/*
|
|
5498
|
+
for(var i=0;i<showCount;++i)
|
|
5499
|
+
{
|
|
5500
|
+
var price=min+(distance*i);
|
|
5501
|
+
var coordinate=new CoordinateInfo();
|
|
5502
|
+
this.Frame.HorizontalInfo[i]=coordinate
|
|
5503
|
+
coordinate.Value=price;
|
|
5504
|
+
var strPrice=price.toFixed(defaultfloatPrecision); //价格刻度字符串
|
|
5505
|
+
if (this.IsShowLeftText) coordinate.Message[0]=strPrice
|
|
5506
|
+
|
|
5507
|
+
if (IFrameSplitOperator.IsNumber(this.YClose) && this.YClose!=0)
|
|
5508
|
+
{
|
|
5509
|
+
var per=(price/this.YClose-1)*100;
|
|
5510
|
+
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
5511
|
+
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
5512
|
+
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
5513
|
+
if (this.IsShowRightText)
|
|
5514
|
+
{
|
|
5515
|
+
if (this.RightTextFormat==1)
|
|
5516
|
+
{
|
|
5517
|
+
coordinate.Message[1]=strPrice;
|
|
5518
|
+
}
|
|
5519
|
+
else if (this.RightTextFormat==2) //价格/百分比
|
|
5520
|
+
{
|
|
5521
|
+
coordinate.Message[1]=[strPer,strPrice];
|
|
5522
|
+
}
|
|
5523
|
+
else
|
|
5524
|
+
{
|
|
5525
|
+
coordinate.Message[1]=strPer; //百分比
|
|
5526
|
+
}
|
|
5527
|
+
}
|
|
5528
|
+
|
|
5529
|
+
if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
|
|
5530
|
+
{
|
|
5531
|
+
coordinate.LineType=2;//中间的线画虚线
|
|
5532
|
+
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
5533
|
+
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
5534
|
+
}
|
|
5535
|
+
}
|
|
5536
|
+
}*/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
5537
|
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
5538
|
{coordinate.Message[1]=[strPer,strPrice];}else{coordinate.Message[1]=strPer;//百分比
|
|
5503
5539
|
}}if(Math.abs(price-this.YClose)<0.00000000001)//小数有精度问题 使用差值
|
|
5504
5540
|
{coordinate.LineType=2;//中间的线画虚线
|
|
5505
|
-
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;if(g_JSChartResource.FrameDotSplitPen)coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;}}}
|
|
5541
|
+
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;if(g_JSChartResource.FrameDotSplitPen)coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;}}};}function FrameSplitMinuteX(){this.newMethod=IFrameSplitOperator;//派生
|
|
5506
5542
|
this.newMethod();delete this.newMethod;this.ShowText=true;//是否显示坐标信息
|
|
5507
5543
|
this.Symbol=null;//股票代码 x轴刻度根据股票类型来调整
|
|
5508
5544
|
this.DayCount=1;this.DateFormat=0;//0=MM-DD 1=MM/DD 2=MM/DD/Week
|
|
@@ -14324,7 +14360,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14324
14360
|
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
14361
|
* 版本信息输出
|
|
14326
14362
|
*
|
|
14327
|
-
*/var HQCHART_VERSION="1.1.
|
|
14363
|
+
*/var HQCHART_VERSION="1.1.14405";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
14364
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14329
14365
|
// BaseIndex:BaseIndex,
|
|
14330
14366
|
// 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
|
|
|
@@ -52886,6 +52861,27 @@ function FrameSplitMinutePriceY()
|
|
|
52886
52861
|
min=this.YClose-(distance*(showCount-1)/2);
|
|
52887
52862
|
}
|
|
52888
52863
|
|
|
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)
|
|
52875
|
+
{
|
|
52876
|
+
var coordinate=new CoordinateInfo();
|
|
52877
|
+
coordinate.Value=price;
|
|
52878
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
52879
|
+
aryCoordinate.push(coordinate);
|
|
52880
|
+
}
|
|
52881
|
+
|
|
52882
|
+
aryCoordinate.sort((left,right)=>{ return left.Value-right.Value; })
|
|
52883
|
+
|
|
52884
|
+
/*
|
|
52889
52885
|
for(var i=0;i<showCount;++i)
|
|
52890
52886
|
{
|
|
52891
52887
|
var price=min+(distance*i);
|
|
@@ -52924,13 +52920,51 @@ function FrameSplitMinutePriceY()
|
|
|
52924
52920
|
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
52925
52921
|
}
|
|
52926
52922
|
}
|
|
52927
|
-
|
|
52928
|
-
}
|
|
52923
|
+
}*/
|
|
52929
52924
|
|
|
52925
|
+
this.Frame.HorizontalInfo=aryCoordinate;
|
|
52930
52926
|
this.Frame.HorizontalMax=max;
|
|
52931
52927
|
this.Frame.HorizontalMin=min;
|
|
52932
52928
|
}
|
|
52933
52929
|
|
|
52930
|
+
this.FormatCoordinate=function(coordinate, defaultfloatPrecision)
|
|
52931
|
+
{
|
|
52932
|
+
var price=coordinate.Value;
|
|
52933
|
+
var strPrice=price.toFixed(defaultfloatPrecision); //价格刻度字符串
|
|
52934
|
+
if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
|
|
52935
|
+
|
|
52936
|
+
if (IFrameSplitOperator.IsNumber(this.YClose) && this.YClose!=0)
|
|
52937
|
+
{
|
|
52938
|
+
var per=(price/this.YClose-1)*100;
|
|
52939
|
+
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
52940
|
+
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
52941
|
+
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
52942
|
+
|
|
52943
|
+
if (this.IsShowRightText)
|
|
52944
|
+
{
|
|
52945
|
+
if (this.RightTextFormat==1)
|
|
52946
|
+
{
|
|
52947
|
+
coordinate.Message[1]=strPrice;
|
|
52948
|
+
}
|
|
52949
|
+
else if (this.RightTextFormat==2) //价格/百分比
|
|
52950
|
+
{
|
|
52951
|
+
coordinate.Message[1]=[strPer,strPrice];
|
|
52952
|
+
}
|
|
52953
|
+
else
|
|
52954
|
+
{
|
|
52955
|
+
coordinate.Message[1]=strPer; //百分比
|
|
52956
|
+
}
|
|
52957
|
+
}
|
|
52958
|
+
|
|
52959
|
+
if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
|
|
52960
|
+
{
|
|
52961
|
+
coordinate.LineType=2;//中间的线画虚线
|
|
52962
|
+
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
52963
|
+
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
52964
|
+
}
|
|
52965
|
+
}
|
|
52966
|
+
}
|
|
52967
|
+
|
|
52934
52968
|
}
|
|
52935
52969
|
|
|
52936
52970
|
function FrameSplitMinuteX()
|
|
@@ -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
|
|
|
@@ -56811,6 +56786,27 @@ function FrameSplitMinutePriceY()
|
|
|
56811
56786
|
min=this.YClose-(distance*(showCount-1)/2);
|
|
56812
56787
|
}
|
|
56813
56788
|
|
|
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)
|
|
56800
|
+
{
|
|
56801
|
+
var coordinate=new CoordinateInfo();
|
|
56802
|
+
coordinate.Value=price;
|
|
56803
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
56804
|
+
aryCoordinate.push(coordinate);
|
|
56805
|
+
}
|
|
56806
|
+
|
|
56807
|
+
aryCoordinate.sort((left,right)=>{ return left.Value-right.Value; })
|
|
56808
|
+
|
|
56809
|
+
/*
|
|
56814
56810
|
for(var i=0;i<showCount;++i)
|
|
56815
56811
|
{
|
|
56816
56812
|
var price=min+(distance*i);
|
|
@@ -56849,13 +56845,51 @@ function FrameSplitMinutePriceY()
|
|
|
56849
56845
|
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
56850
56846
|
}
|
|
56851
56847
|
}
|
|
56852
|
-
|
|
56853
|
-
}
|
|
56848
|
+
}*/
|
|
56854
56849
|
|
|
56850
|
+
this.Frame.HorizontalInfo=aryCoordinate;
|
|
56855
56851
|
this.Frame.HorizontalMax=max;
|
|
56856
56852
|
this.Frame.HorizontalMin=min;
|
|
56857
56853
|
}
|
|
56858
56854
|
|
|
56855
|
+
this.FormatCoordinate=function(coordinate, defaultfloatPrecision)
|
|
56856
|
+
{
|
|
56857
|
+
var price=coordinate.Value;
|
|
56858
|
+
var strPrice=price.toFixed(defaultfloatPrecision); //价格刻度字符串
|
|
56859
|
+
if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
|
|
56860
|
+
|
|
56861
|
+
if (IFrameSplitOperator.IsNumber(this.YClose) && this.YClose!=0)
|
|
56862
|
+
{
|
|
56863
|
+
var per=(price/this.YClose-1)*100;
|
|
56864
|
+
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
56865
|
+
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
56866
|
+
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
56867
|
+
|
|
56868
|
+
if (this.IsShowRightText)
|
|
56869
|
+
{
|
|
56870
|
+
if (this.RightTextFormat==1)
|
|
56871
|
+
{
|
|
56872
|
+
coordinate.Message[1]=strPrice;
|
|
56873
|
+
}
|
|
56874
|
+
else if (this.RightTextFormat==2) //价格/百分比
|
|
56875
|
+
{
|
|
56876
|
+
coordinate.Message[1]=[strPer,strPrice];
|
|
56877
|
+
}
|
|
56878
|
+
else
|
|
56879
|
+
{
|
|
56880
|
+
coordinate.Message[1]=strPer; //百分比
|
|
56881
|
+
}
|
|
56882
|
+
}
|
|
56883
|
+
|
|
56884
|
+
if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
|
|
56885
|
+
{
|
|
56886
|
+
coordinate.LineType=2;//中间的线画虚线
|
|
56887
|
+
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
56888
|
+
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
56889
|
+
}
|
|
56890
|
+
}
|
|
56891
|
+
}
|
|
56892
|
+
|
|
56859
56893
|
}
|
|
56860
56894
|
|
|
56861
56895
|
function FrameSplitMinuteX()
|
|
@@ -143358,7 +143392,7 @@ function ScrollBarBGChart()
|
|
|
143358
143392
|
|
|
143359
143393
|
|
|
143360
143394
|
|
|
143361
|
-
var HQCHART_VERSION="1.1.
|
|
143395
|
+
var HQCHART_VERSION="1.1.14405";
|
|
143362
143396
|
|
|
143363
143397
|
function PrintHQChartVersion()
|
|
143364
143398
|
{
|
|
@@ -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
|
|
|
@@ -56855,6 +56830,27 @@ function FrameSplitMinutePriceY()
|
|
|
56855
56830
|
min=this.YClose-(distance*(showCount-1)/2);
|
|
56856
56831
|
}
|
|
56857
56832
|
|
|
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)
|
|
56844
|
+
{
|
|
56845
|
+
var coordinate=new CoordinateInfo();
|
|
56846
|
+
coordinate.Value=price;
|
|
56847
|
+
this.FormatCoordinate(coordinate,defaultfloatPrecision);
|
|
56848
|
+
aryCoordinate.push(coordinate);
|
|
56849
|
+
}
|
|
56850
|
+
|
|
56851
|
+
aryCoordinate.sort((left,right)=>{ return left.Value-right.Value; })
|
|
56852
|
+
|
|
56853
|
+
/*
|
|
56858
56854
|
for(var i=0;i<showCount;++i)
|
|
56859
56855
|
{
|
|
56860
56856
|
var price=min+(distance*i);
|
|
@@ -56893,13 +56889,51 @@ function FrameSplitMinutePriceY()
|
|
|
56893
56889
|
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
56894
56890
|
}
|
|
56895
56891
|
}
|
|
56896
|
-
|
|
56897
|
-
}
|
|
56892
|
+
}*/
|
|
56898
56893
|
|
|
56894
|
+
this.Frame.HorizontalInfo=aryCoordinate;
|
|
56899
56895
|
this.Frame.HorizontalMax=max;
|
|
56900
56896
|
this.Frame.HorizontalMin=min;
|
|
56901
56897
|
}
|
|
56902
56898
|
|
|
56899
|
+
this.FormatCoordinate=function(coordinate, defaultfloatPrecision)
|
|
56900
|
+
{
|
|
56901
|
+
var price=coordinate.Value;
|
|
56902
|
+
var strPrice=price.toFixed(defaultfloatPrecision); //价格刻度字符串
|
|
56903
|
+
if (this.IsShowLeftText) coordinate.Message[0]=strPrice;
|
|
56904
|
+
|
|
56905
|
+
if (IFrameSplitOperator.IsNumber(this.YClose) && this.YClose!=0)
|
|
56906
|
+
{
|
|
56907
|
+
var per=(price/this.YClose-1)*100;
|
|
56908
|
+
if (per>0) coordinate.TextColor=g_JSChartResource.UpTextColor;
|
|
56909
|
+
else if (per<0) coordinate.TextColor=g_JSChartResource.DownTextColor;
|
|
56910
|
+
var strPer=`${IFrameSplitOperator.FormatValueString(per,2)}%`;
|
|
56911
|
+
|
|
56912
|
+
if (this.IsShowRightText)
|
|
56913
|
+
{
|
|
56914
|
+
if (this.RightTextFormat==1)
|
|
56915
|
+
{
|
|
56916
|
+
coordinate.Message[1]=strPrice;
|
|
56917
|
+
}
|
|
56918
|
+
else if (this.RightTextFormat==2) //价格/百分比
|
|
56919
|
+
{
|
|
56920
|
+
coordinate.Message[1]=[strPer,strPrice];
|
|
56921
|
+
}
|
|
56922
|
+
else
|
|
56923
|
+
{
|
|
56924
|
+
coordinate.Message[1]=strPer; //百分比
|
|
56925
|
+
}
|
|
56926
|
+
}
|
|
56927
|
+
|
|
56928
|
+
if (Math.abs(price-this.YClose) <0.00000000001) //小数有精度问题 使用差值
|
|
56929
|
+
{
|
|
56930
|
+
coordinate.LineType=2;//中间的线画虚线
|
|
56931
|
+
coordinate.TextColor=g_JSChartResource.UnchagneTextColor;
|
|
56932
|
+
if (g_JSChartResource.FrameDotSplitPen) coordinate.LineColor=g_JSChartResource.FrameDotSplitPen;
|
|
56933
|
+
}
|
|
56934
|
+
}
|
|
56935
|
+
}
|
|
56936
|
+
|
|
56903
56937
|
}
|
|
56904
56938
|
|
|
56905
56939
|
function FrameSplitMinuteX()
|
|
@@ -153153,7 +153187,7 @@ function HQChartScriptWorker()
|
|
|
153153
153187
|
|
|
153154
153188
|
|
|
153155
153189
|
|
|
153156
|
-
var HQCHART_VERSION="1.1.
|
|
153190
|
+
var HQCHART_VERSION="1.1.14405";
|
|
153157
153191
|
|
|
153158
153192
|
function PrintHQChartVersion()
|
|
153159
153193
|
{
|