hqchart 1.1.14412 → 1.1.14416
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 +9 -10
- package/package.json +1 -1
- package/src/jscommon/umychart.js +24 -23
- package/src/jscommon/umychart.style.js +3 -3
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +28 -27
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +28 -27
package/lib/umychart.vue.js
CHANGED
|
@@ -2352,7 +2352,7 @@ this.YTextPosition=[0,0],//是坐标否强制画在内部 [0=左侧] [1=右侧]
|
|
|
2352
2352
|
this.YTextPadding=[g_JSChartResource.Frame.YTextPadding[0],g_JSChartResource.Frame.YTextPadding[1]],//Y轴文字和边框间距 [0=左侧] [1=右侧]
|
|
2353
2353
|
this.IsShowXLine=true;//是否显示X轴刻度线
|
|
2354
2354
|
this.IsShowYLine=true;this.YInsideOffset=0;this.YTextBaseline=0;//0=居中 1=上部 (目前就支持内部刻度)
|
|
2355
|
-
this.MultiTextFormat=0;//多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行
|
|
2355
|
+
this.MultiTextFormat=0;//多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行 3=多行输出(json格式)
|
|
2356
2356
|
this.RightTextMaxWidth=0;this.ShortYLineLength=5;this.ShortXLineLength=5;this.BeforeDrawXYCallback;//坐标绘制前回调,绘制深度图
|
|
2357
2357
|
this.GetEventCallback;//事件回调
|
|
2358
2358
|
//工具栏的按钮样式
|
|
@@ -5345,7 +5345,7 @@ this.DefaultSplitType=0;this.DefaultYMaxMin;//{ Max:null, Min:null }; //指
|
|
|
5345
5345
|
this.FixedYMaxMin;//{ Max, Min} 固定Y轴最大最小值
|
|
5346
5346
|
this.EnableZoomUpDown=false;//上下左右拖拽
|
|
5347
5347
|
this.LastMaxMin;//当前显示的最高最低范围
|
|
5348
|
-
this.PercentageTextFormat=0;//0=显示第1行 1=显示2行 2
|
|
5348
|
+
this.PercentageTextFormat=0;//0=显示第1行 1=单行格式: 价格/百分比, 2=显示2行 3=2行显示(json格式)
|
|
5349
5349
|
this.IsEnableDragY=function(){return this.CoordinateType==0||this.CoordinateType==1;};this.Operator=function(){var splitData={};splitData.Max=this.Frame.HorizontalMax;splitData.Min=this.Frame.HorizontalMin;splitData.Count=this.SplitCount;if(this.Frame.YMaxMin)//原始的数据范围
|
|
5350
5350
|
{var item=this.Frame.YMaxMin;if(IFrameSplitOperator.IsNumber(item.Max)&&IFrameSplitOperator.IsNumber(item.Min)){splitData.Max=item.Max;splitData.Min=item.Min;}}if(splitData.Max==splitData.Min)//如果一样上下扩大下
|
|
5351
5351
|
{splitData.Max+=splitData.Max*0.01;splitData.Min-=splitData.Min*0.01;}var isFixedMaxMin=this.FixedYMaxMin&&IFrameSplitOperator.IsNumber(this.FixedYMaxMin.Max)&&IFrameSplitOperator.IsNumber(this.FixedYMaxMin.Min);if(isFixedMaxMin){splitData.Max=this.FixedYMaxMin.Max;splitData.Min=this.FixedYMaxMin.Min;//JSConsole.Chart.Log(`[FrameSplitKLinePriceY::Operator] FixedYMaxMin.Max=${this.FixedYMaxMin.Max} FixedYMaxMin.Min=${this.FixedYMaxMin.Min} `);
|
|
@@ -5367,12 +5367,11 @@ if(this.SplitLogarithmic(splitData,defaultfloatPrecision)){bFilter=false;}else{t
|
|
|
5367
5367
|
*/this.ReservedHeight(splitData);//预留高度
|
|
5368
5368
|
JSConsole.Chart.Log('[FrameSplitKLinePriceY::Operator] fixed . Max='+splitData.Max+' Min='+splitData.Min+' Count='+splitData.Count);if(this.GetEventCallback){var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_SPLIT_YCOORDINATE);if(event&&event.Callback){var data={ID:this.Frame.Identify,Frame:this.Frame};event.Callback(event,data,this);}}};this.SplitTickData=function(splitData,floatPrecision){switch(this.CoordinateType){case 1://百分比
|
|
5369
5369
|
if(!this.SplitPercentage(splitData,floatPrecision,splitData.IsFixedMaxMin)){this.SplitDefault(splitData,floatPrecision,splitData.IsFixedMaxMin);}else{this.Frame.MultiTextFormat=this.PercentageTextFormat;splitData.IsFilter=false;}break;default:if(this.SplitType==3){this.SplitTickPrice(splitData,floatPrecision);}else{this.SplitDefault(splitData,floatPrecision,splitData.IsFixedMaxMin);}}};this.SplitTickPrice=function(splitData,floatPrecision){var aryPrice=this.KLineChart.GetAllPrice();this.Frame.HorizontalInfo=[];for(var i in aryPrice){var value=aryPrice[i];this.Frame.HorizontalInfo[i]=new CoordinateInfo();this.Frame.HorizontalInfo[i].Value=value;if(this.IsShowLeftText)this.Frame.HorizontalInfo[i].Message[0]=value.toFixed(floatPrecision);if(this.IsShowRightText)this.Frame.HorizontalInfo[i].Message[1]=value.toFixed(floatPrecision);}};this.SplitPercentage=function(splitData,floatPrecision,isFixedMaxMin)//百分比坐标
|
|
5370
|
-
{var firstOpenPrice=this.GetFirstOpenPrice();if(!IFrameSplitOperator.IsNumber(firstOpenPrice))return false;splitData.Max=(splitData.Max-firstOpenPrice)/firstOpenPrice;splitData.Min=(splitData.Min-firstOpenPrice)/firstOpenPrice;splitData.Interval=(splitData.Max-splitData.Min)/(splitData.Count-1);if(!isFixedMaxMin)this.IntegerCoordinateSplit2(splitData);var minValue=(1+splitData.Min)*firstOpenPrice;var maxValue=(1+splitData.Max)*firstOpenPrice;var textColor;if(g_JSChartResource.Frame&&g_JSChartResource.Frame.PercentageText){var item=g_JSChartResource.Frame.PercentageText;textColor={PriceColor:item.PriceColor,PercentageColor:item.PercentageColor,SplitColor:item.SplitColor,Font:item.Font};}var aryHorizontal=[];for(var value=0;value<=splitData.Max;value+=splitData.Interval){var price=(value+1)*firstOpenPrice;var item=new CoordinateInfo();item.Value=price;
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
splitData.Max=maxValue;return true;};//等比坐标 当前屏最后第2根K线的收盘加为基准, 上下涨幅10%分割
|
|
5370
|
+
{var firstOpenPrice=this.GetFirstOpenPrice();if(!IFrameSplitOperator.IsNumber(firstOpenPrice))return false;splitData.Max=(splitData.Max-firstOpenPrice)/firstOpenPrice;splitData.Min=(splitData.Min-firstOpenPrice)/firstOpenPrice;splitData.Interval=(splitData.Max-splitData.Min)/(splitData.Count-1);if(!isFixedMaxMin)this.IntegerCoordinateSplit2(splitData);var minValue=(1+splitData.Min)*firstOpenPrice;var maxValue=(1+splitData.Max)*firstOpenPrice;var textColor;if(g_JSChartResource.Frame&&g_JSChartResource.Frame.PercentageText){var item=g_JSChartResource.Frame.PercentageText;textColor={PriceColor:item.PriceColor,PercentageColor:item.PercentageColor,SplitColor:item.SplitColor,Font:item.Font};}var aryHorizontal=[];for(var value=0;value<=splitData.Max;value+=splitData.Interval){var price=(value+1)*firstOpenPrice;var item=new CoordinateInfo();item.Value=price;this.FormatPercentageItem(item,value,floatPrecision,textColor);aryHorizontal.push(item);}for(var value=-splitData.Interval;value>=splitData.Min;value-=splitData.Interval){var price=(value+1)*firstOpenPrice;if(price<minValue||price>maxValue)continue;var item=new CoordinateInfo();item.Value=price;this.FormatPercentageItem(item,value,floatPrecision,textColor);aryHorizontal.push(item);}aryHorizontal.sort(function(left,right){return left.Value-right.Value;});this.Frame.HorizontalInfo=aryHorizontal;splitData.Min=minValue;//最大最小值调整
|
|
5371
|
+
splitData.Max=maxValue;return true;};this.FormatPercentageItem=function(item,percentage,floatPrecision,textColor){var price=item.Value;var strPrice=price.toFixed(floatPrecision);if(this.IsShowLeftText)item.Message[0]=strPrice;//左边价格坐标
|
|
5372
|
+
if(this.IsShowRightText)//右侧 价格/百分比
|
|
5373
|
+
{var strPrcentage=IFrameSplitOperator.RemoveZero(percentage.toFixed(2))+'%';//右边百分比
|
|
5374
|
+
if(this.PercentageTextFormat==1)item.Message[1]=[{Text:strPrice,Color:textColor.PriceColor},{Text:"/",Color:textColor.PercentageColor},{Text:strPrcentage,Color:textColor.SplitColor}];else if(this.PercentageTextFormat==3)item.Message[1]=[{Text:strPrice,Color:textColor.PriceColor},{Text:strPrcentage,Color:textColor.PercentageColor}];else if(this.PercentageTextFormat==2)item.Message[1]=[strPrcentage,strPrice];else item.Message[1]=strPrcentage;}};//等比坐标 当前屏最后第2根K线的收盘加为基准, 上下涨幅10%分割
|
|
5376
5375
|
this.SplitIncrease=function(splitData,floatPrecision){var basePrice=this.GetLast2ndClose();if(!IFrameSplitOperator.IsNumber(basePrice))return false;this.IntegerCoordinateSplit(splitData);this.Frame.HorizontalInfo=[];var increase=g_JSChartResource.FrameSplitIncrease.Increase;var aryHorizontal=[];for(var price=basePrice;price<splitData.Max;price=price*(1+increase)){var item=new CoordinateInfo();item.Value=price;var text=price.toFixed(floatPrecision);if(this.IsShowLeftText)item.Message[0]=text;if(this.IsShowRightText)item.Message[1]=text;aryHorizontal.push(item);}for(var price=basePrice*0.9;price>splitData.Min;price=price*(1-increase)){var item=new CoordinateInfo();item.Value=price;var text=price.toFixed(floatPrecision);if(this.IsShowLeftText)item.Message[0]=text;if(this.IsShowRightText)item.Message[1]=text;aryHorizontal.push(item);}this.Frame.HorizontalInfo=aryHorizontal;return true;};//等分坐标:以画面显示的最高价、最低价为基准,对这个区域N等分,显示分割的数值线
|
|
5377
5376
|
this.SplitAverage=function(splitData,floatPrecision){var max=splitData.Max;var min=splitData.Min;//this.IntegerCoordinateSplit(splitData);
|
|
5378
5377
|
this.Frame.HorizontalInfo=[];var count=g_JSChartResource.FrameSplitAverage.Count;var interval=(max-min)/count;for(var i=0;i<=count;++i){var item=new CoordinateInfo();item.Value=min+interval*i;var text=item.Value.toFixed(floatPrecision);if(this.IsShowLeftText)item.Message[0]=text;if(this.IsShowRightText)item.Message[1]=text;this.Frame.HorizontalInfo[i]=item;}};this.SplitGoldenSection=function(splitData,floatPrecision){var max=splitData.Max;var min=splitData.Min;//this.IntegerCoordinateSplit(splitData);
|
|
@@ -12168,7 +12167,7 @@ FrameTitleBGColor:"rgb(0,0,0)",//标题栏背景色
|
|
|
12168
12167
|
OverlayIndexTitleBGColor:'rgba(0,0,0,0.7)',//叠加指标背景色
|
|
12169
12168
|
Frame:{XBottomOffset:2*GetDevicePixelRatio(),//X轴文字向下偏移
|
|
12170
12169
|
PercentageText://百分比坐标文字颜色
|
|
12171
|
-
{PriceColor:'rgb(
|
|
12170
|
+
{PriceColor:'rgb(220,220,220)',PercentageColor:"rgb(220,220,220)",SplitColor:"rgb(220,220,220)",Font:14*GetDevicePixelRatio()+"px 微软雅黑"}},//叠加指标框架
|
|
12172
12171
|
OverlayFrame:{BolderPen:'rgb(130,130,130)',//指标边框线
|
|
12173
12172
|
TitleColor:'rgb(181,181,181)',//指标名字颜色
|
|
12174
12173
|
TitleFont:11*GetDevicePixelRatio()+'px arial'//指标名字字体
|
|
@@ -14328,7 +14327,7 @@ hisData.Symbol=message.symbol;}var stockObj={HQDataType:HQ_DATA_TYPE.KLINE_ID,St
|
|
|
14328
14327
|
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);};}/********************************************************************************
|
|
14329
14328
|
* 版本信息输出
|
|
14330
14329
|
*
|
|
14331
|
-
*/var HQCHART_VERSION="1.1.
|
|
14330
|
+
*/var HQCHART_VERSION="1.1.14415";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();//把给外界调用的方法暴露出来
|
|
14332
14331
|
exports.default=(_jsChartInit$jsChartS={jsChartInit:JSChart.Init,jsChartStyle:JSChart.SetStyle,// IsIndexSymbol:IsIndexSymbol,
|
|
14333
14332
|
// BaseIndex:BaseIndex,
|
|
14334
14333
|
// ChartLine:ChartLine,
|
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -11712,7 +11712,7 @@ function AverageWidthFrame()
|
|
|
11712
11712
|
this.IsShowYLine=true;
|
|
11713
11713
|
this.YInsideOffset=0;
|
|
11714
11714
|
this.YTextBaseline=0; //0=居中 1=上部 (目前就支持内部刻度)
|
|
11715
|
-
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行
|
|
11715
|
+
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行 3=多行输出(json格式)
|
|
11716
11716
|
this.RightTextMaxWidth=0;
|
|
11717
11717
|
|
|
11718
11718
|
this.ShortYLineLength=5;
|
|
@@ -50844,7 +50844,7 @@ function FrameSplitKLinePriceY()
|
|
|
50844
50844
|
this.EnableZoomUpDown=false; //上下左右拖拽
|
|
50845
50845
|
this.LastMaxMin; //当前显示的最高最低范围
|
|
50846
50846
|
|
|
50847
|
-
this.PercentageTextFormat=0; //0=显示第1行 1=显示2行 2
|
|
50847
|
+
this.PercentageTextFormat=0; //0=显示第1行 1=单行格式: 价格/百分比, 2=显示2行 3=2行显示(json格式)
|
|
50848
50848
|
|
|
50849
50849
|
this.IsEnableDragY=function()
|
|
50850
50850
|
{
|
|
@@ -51076,17 +51076,7 @@ function FrameSplitKLinePriceY()
|
|
|
51076
51076
|
var price=(value+1)*firstOpenPrice;
|
|
51077
51077
|
var item=new CoordinateInfo();
|
|
51078
51078
|
item.Value=price;
|
|
51079
|
-
|
|
51080
|
-
|
|
51081
|
-
if (this.IsShowRightText)
|
|
51082
|
-
{
|
|
51083
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
51084
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
51085
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
51086
|
-
text+='%';
|
|
51087
|
-
item.Message[1]=[text,strPrice];
|
|
51088
|
-
item.ExtendData=textColor;
|
|
51089
|
-
}
|
|
51079
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
51090
51080
|
aryHorizontal.push(item);
|
|
51091
51081
|
}
|
|
51092
51082
|
|
|
@@ -51097,16 +51087,7 @@ function FrameSplitKLinePriceY()
|
|
|
51097
51087
|
|
|
51098
51088
|
var item=new CoordinateInfo();
|
|
51099
51089
|
item.Value=price;
|
|
51100
|
-
|
|
51101
|
-
if (this.IsShowRightText)
|
|
51102
|
-
{
|
|
51103
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
51104
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
51105
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
51106
|
-
text+='%';
|
|
51107
|
-
item.Message[1]=[text,strPrice];
|
|
51108
|
-
item.ExtendData=textColor;
|
|
51109
|
-
}
|
|
51090
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
51110
51091
|
aryHorizontal.push(item);
|
|
51111
51092
|
}
|
|
51112
51093
|
|
|
@@ -51122,6 +51103,26 @@ function FrameSplitKLinePriceY()
|
|
|
51122
51103
|
return true;
|
|
51123
51104
|
}
|
|
51124
51105
|
|
|
51106
|
+
this.FormatPercentageItem=function(item, percentage, floatPrecision, textColor)
|
|
51107
|
+
{
|
|
51108
|
+
var price=item.Value;
|
|
51109
|
+
var strPrice=price.toFixed(floatPrecision);
|
|
51110
|
+
if (this.IsShowLeftText) item.Message[0]=strPrice; //左边价格坐标
|
|
51111
|
+
|
|
51112
|
+
if (this.IsShowRightText) //右侧 价格/百分比
|
|
51113
|
+
{
|
|
51114
|
+
var strPrcentage=`${IFrameSplitOperator.RemoveZero(percentage.toFixed(2))}%`; //右边百分比
|
|
51115
|
+
if (this.PercentageTextFormat==1)
|
|
51116
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:"/", Color:textColor.PercentageColor}, {Text:strPrcentage, Color:textColor.SplitColor}];
|
|
51117
|
+
else if (this.PercentageTextFormat==3)
|
|
51118
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:strPrcentage, Color:textColor.PercentageColor}];
|
|
51119
|
+
else if (this.PercentageTextFormat==2)
|
|
51120
|
+
item.Message[1]=[strPrcentage, strPrice];
|
|
51121
|
+
else
|
|
51122
|
+
item.Message[1]=strPrcentage;
|
|
51123
|
+
}
|
|
51124
|
+
}
|
|
51125
|
+
|
|
51125
51126
|
//等比坐标 当前屏最后第2根K线的收盘加为基准, 上下涨幅10%分割
|
|
51126
51127
|
this.SplitIncrease=function(splitData,floatPrecision)
|
|
51127
51128
|
{
|
|
@@ -151,9 +151,9 @@ function GetBlackStyle()
|
|
|
151
151
|
|
|
152
152
|
PercentageText: //百分比坐标文字颜色
|
|
153
153
|
{
|
|
154
|
-
PriceColor:'rgb(
|
|
155
|
-
PercentageColor:"rgb(
|
|
156
|
-
SplitColor:"rgb(
|
|
154
|
+
PriceColor:'rgb(220,220,220)',
|
|
155
|
+
PercentageColor:"rgb(220,220,220)",
|
|
156
|
+
SplitColor:"rgb(220,220,220)",
|
|
157
157
|
Font:14*GetDevicePixelRatio() +"px 微软雅黑"
|
|
158
158
|
}
|
|
159
159
|
},
|
|
@@ -15637,7 +15637,7 @@ function AverageWidthFrame()
|
|
|
15637
15637
|
this.IsShowYLine=true;
|
|
15638
15638
|
this.YInsideOffset=0;
|
|
15639
15639
|
this.YTextBaseline=0; //0=居中 1=上部 (目前就支持内部刻度)
|
|
15640
|
-
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行
|
|
15640
|
+
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行 3=多行输出(json格式)
|
|
15641
15641
|
this.RightTextMaxWidth=0;
|
|
15642
15642
|
|
|
15643
15643
|
this.ShortYLineLength=5;
|
|
@@ -54769,7 +54769,7 @@ function FrameSplitKLinePriceY()
|
|
|
54769
54769
|
this.EnableZoomUpDown=false; //上下左右拖拽
|
|
54770
54770
|
this.LastMaxMin; //当前显示的最高最低范围
|
|
54771
54771
|
|
|
54772
|
-
this.PercentageTextFormat=0; //0=显示第1行 1=显示2行 2
|
|
54772
|
+
this.PercentageTextFormat=0; //0=显示第1行 1=单行格式: 价格/百分比, 2=显示2行 3=2行显示(json格式)
|
|
54773
54773
|
|
|
54774
54774
|
this.IsEnableDragY=function()
|
|
54775
54775
|
{
|
|
@@ -55001,17 +55001,7 @@ function FrameSplitKLinePriceY()
|
|
|
55001
55001
|
var price=(value+1)*firstOpenPrice;
|
|
55002
55002
|
var item=new CoordinateInfo();
|
|
55003
55003
|
item.Value=price;
|
|
55004
|
-
|
|
55005
|
-
|
|
55006
|
-
if (this.IsShowRightText)
|
|
55007
|
-
{
|
|
55008
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
55009
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
55010
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
55011
|
-
text+='%';
|
|
55012
|
-
item.Message[1]=[text,strPrice];
|
|
55013
|
-
item.ExtendData=textColor;
|
|
55014
|
-
}
|
|
55004
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
55015
55005
|
aryHorizontal.push(item);
|
|
55016
55006
|
}
|
|
55017
55007
|
|
|
@@ -55022,16 +55012,7 @@ function FrameSplitKLinePriceY()
|
|
|
55022
55012
|
|
|
55023
55013
|
var item=new CoordinateInfo();
|
|
55024
55014
|
item.Value=price;
|
|
55025
|
-
|
|
55026
|
-
if (this.IsShowRightText)
|
|
55027
|
-
{
|
|
55028
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
55029
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
55030
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
55031
|
-
text+='%';
|
|
55032
|
-
item.Message[1]=[text,strPrice];
|
|
55033
|
-
item.ExtendData=textColor;
|
|
55034
|
-
}
|
|
55015
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
55035
55016
|
aryHorizontal.push(item);
|
|
55036
55017
|
}
|
|
55037
55018
|
|
|
@@ -55047,6 +55028,26 @@ function FrameSplitKLinePriceY()
|
|
|
55047
55028
|
return true;
|
|
55048
55029
|
}
|
|
55049
55030
|
|
|
55031
|
+
this.FormatPercentageItem=function(item, percentage, floatPrecision, textColor)
|
|
55032
|
+
{
|
|
55033
|
+
var price=item.Value;
|
|
55034
|
+
var strPrice=price.toFixed(floatPrecision);
|
|
55035
|
+
if (this.IsShowLeftText) item.Message[0]=strPrice; //左边价格坐标
|
|
55036
|
+
|
|
55037
|
+
if (this.IsShowRightText) //右侧 价格/百分比
|
|
55038
|
+
{
|
|
55039
|
+
var strPrcentage=`${IFrameSplitOperator.RemoveZero(percentage.toFixed(2))}%`; //右边百分比
|
|
55040
|
+
if (this.PercentageTextFormat==1)
|
|
55041
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:"/", Color:textColor.PercentageColor}, {Text:strPrcentage, Color:textColor.SplitColor}];
|
|
55042
|
+
else if (this.PercentageTextFormat==3)
|
|
55043
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:strPrcentage, Color:textColor.PercentageColor}];
|
|
55044
|
+
else if (this.PercentageTextFormat==2)
|
|
55045
|
+
item.Message[1]=[strPrcentage, strPrice];
|
|
55046
|
+
else
|
|
55047
|
+
item.Message[1]=strPrcentage;
|
|
55048
|
+
}
|
|
55049
|
+
}
|
|
55050
|
+
|
|
55050
55051
|
//等比坐标 当前屏最后第2根K线的收盘加为基准, 上下涨幅10%分割
|
|
55051
55052
|
this.SplitIncrease=function(splitData,floatPrecision)
|
|
55052
55053
|
{
|
|
@@ -128455,9 +128456,9 @@ function GetBlackStyle()
|
|
|
128455
128456
|
|
|
128456
128457
|
PercentageText: //百分比坐标文字颜色
|
|
128457
128458
|
{
|
|
128458
|
-
PriceColor:'rgb(
|
|
128459
|
-
PercentageColor:"rgb(
|
|
128460
|
-
SplitColor:"rgb(
|
|
128459
|
+
PriceColor:'rgb(220,220,220)',
|
|
128460
|
+
PercentageColor:"rgb(220,220,220)",
|
|
128461
|
+
SplitColor:"rgb(220,220,220)",
|
|
128461
128462
|
Font:14*GetDevicePixelRatio() +"px 微软雅黑"
|
|
128462
128463
|
}
|
|
128463
128464
|
},
|
|
@@ -143404,7 +143405,7 @@ function ScrollBarBGChart()
|
|
|
143404
143405
|
|
|
143405
143406
|
|
|
143406
143407
|
|
|
143407
|
-
var HQCHART_VERSION="1.1.
|
|
143408
|
+
var HQCHART_VERSION="1.1.14415";
|
|
143408
143409
|
|
|
143409
143410
|
function PrintHQChartVersion()
|
|
143410
143411
|
{
|
|
@@ -15681,7 +15681,7 @@ function AverageWidthFrame()
|
|
|
15681
15681
|
this.IsShowYLine=true;
|
|
15682
15682
|
this.YInsideOffset=0;
|
|
15683
15683
|
this.YTextBaseline=0; //0=居中 1=上部 (目前就支持内部刻度)
|
|
15684
|
-
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行
|
|
15684
|
+
this.MultiTextFormat=0; //多行刻度信息显示模式 0=显示第1行 1=单行多个文本 2=显示2行 3=多行输出(json格式)
|
|
15685
15685
|
this.RightTextMaxWidth=0;
|
|
15686
15686
|
|
|
15687
15687
|
this.ShortYLineLength=5;
|
|
@@ -54813,7 +54813,7 @@ function FrameSplitKLinePriceY()
|
|
|
54813
54813
|
this.EnableZoomUpDown=false; //上下左右拖拽
|
|
54814
54814
|
this.LastMaxMin; //当前显示的最高最低范围
|
|
54815
54815
|
|
|
54816
|
-
this.PercentageTextFormat=0; //0=显示第1行 1=显示2行 2
|
|
54816
|
+
this.PercentageTextFormat=0; //0=显示第1行 1=单行格式: 价格/百分比, 2=显示2行 3=2行显示(json格式)
|
|
54817
54817
|
|
|
54818
54818
|
this.IsEnableDragY=function()
|
|
54819
54819
|
{
|
|
@@ -55045,17 +55045,7 @@ function FrameSplitKLinePriceY()
|
|
|
55045
55045
|
var price=(value+1)*firstOpenPrice;
|
|
55046
55046
|
var item=new CoordinateInfo();
|
|
55047
55047
|
item.Value=price;
|
|
55048
|
-
|
|
55049
|
-
|
|
55050
|
-
if (this.IsShowRightText)
|
|
55051
|
-
{
|
|
55052
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
55053
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
55054
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
55055
|
-
text+='%';
|
|
55056
|
-
item.Message[1]=[text,strPrice];
|
|
55057
|
-
item.ExtendData=textColor;
|
|
55058
|
-
}
|
|
55048
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
55059
55049
|
aryHorizontal.push(item);
|
|
55060
55050
|
}
|
|
55061
55051
|
|
|
@@ -55066,16 +55056,7 @@ function FrameSplitKLinePriceY()
|
|
|
55066
55056
|
|
|
55067
55057
|
var item=new CoordinateInfo();
|
|
55068
55058
|
item.Value=price;
|
|
55069
|
-
|
|
55070
|
-
if (this.IsShowRightText)
|
|
55071
|
-
{
|
|
55072
|
-
var strPrice=price.toFixed(floatPrecision);
|
|
55073
|
-
var text=(value*100).toFixed(2); //右边百分比
|
|
55074
|
-
text=IFrameSplitOperator.RemoveZero(text);
|
|
55075
|
-
text+='%';
|
|
55076
|
-
item.Message[1]=[text,strPrice];
|
|
55077
|
-
item.ExtendData=textColor;
|
|
55078
|
-
}
|
|
55059
|
+
this.FormatPercentageItem(item, value, floatPrecision,textColor);
|
|
55079
55060
|
aryHorizontal.push(item);
|
|
55080
55061
|
}
|
|
55081
55062
|
|
|
@@ -55091,6 +55072,26 @@ function FrameSplitKLinePriceY()
|
|
|
55091
55072
|
return true;
|
|
55092
55073
|
}
|
|
55093
55074
|
|
|
55075
|
+
this.FormatPercentageItem=function(item, percentage, floatPrecision, textColor)
|
|
55076
|
+
{
|
|
55077
|
+
var price=item.Value;
|
|
55078
|
+
var strPrice=price.toFixed(floatPrecision);
|
|
55079
|
+
if (this.IsShowLeftText) item.Message[0]=strPrice; //左边价格坐标
|
|
55080
|
+
|
|
55081
|
+
if (this.IsShowRightText) //右侧 价格/百分比
|
|
55082
|
+
{
|
|
55083
|
+
var strPrcentage=`${IFrameSplitOperator.RemoveZero(percentage.toFixed(2))}%`; //右边百分比
|
|
55084
|
+
if (this.PercentageTextFormat==1)
|
|
55085
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:"/", Color:textColor.PercentageColor}, {Text:strPrcentage, Color:textColor.SplitColor}];
|
|
55086
|
+
else if (this.PercentageTextFormat==3)
|
|
55087
|
+
item.Message[1]=[{ Text:strPrice, Color:textColor.PriceColor }, {Text:strPrcentage, Color:textColor.PercentageColor}];
|
|
55088
|
+
else if (this.PercentageTextFormat==2)
|
|
55089
|
+
item.Message[1]=[strPrcentage, strPrice];
|
|
55090
|
+
else
|
|
55091
|
+
item.Message[1]=strPrcentage;
|
|
55092
|
+
}
|
|
55093
|
+
}
|
|
55094
|
+
|
|
55094
55095
|
//等比坐标 当前屏最后第2根K线的收盘加为基准, 上下涨幅10%分割
|
|
55095
55096
|
this.SplitIncrease=function(splitData,floatPrecision)
|
|
55096
55097
|
{
|
|
@@ -128499,9 +128500,9 @@ function GetBlackStyle()
|
|
|
128499
128500
|
|
|
128500
128501
|
PercentageText: //百分比坐标文字颜色
|
|
128501
128502
|
{
|
|
128502
|
-
PriceColor:'rgb(
|
|
128503
|
-
PercentageColor:"rgb(
|
|
128504
|
-
SplitColor:"rgb(
|
|
128503
|
+
PriceColor:'rgb(220,220,220)',
|
|
128504
|
+
PercentageColor:"rgb(220,220,220)",
|
|
128505
|
+
SplitColor:"rgb(220,220,220)",
|
|
128505
128506
|
Font:14*GetDevicePixelRatio() +"px 微软雅黑"
|
|
128506
128507
|
}
|
|
128507
128508
|
},
|
|
@@ -153199,7 +153200,7 @@ function HQChartScriptWorker()
|
|
|
153199
153200
|
|
|
153200
153201
|
|
|
153201
153202
|
|
|
153202
|
-
var HQCHART_VERSION="1.1.
|
|
153203
|
+
var HQCHART_VERSION="1.1.14415";
|
|
153203
153204
|
|
|
153204
153205
|
function PrintHQChartVersion()
|
|
153205
153206
|
{
|