hqchart 1.1.12905 → 1.1.12928
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.NetworkFilterTest.vue.js +2 -2
- package/lib/umychart.vue.js +31 -24
- package/package.json +2 -1
- package/src/jscommon/umychart.NetworkFilterTest.js +21 -0
- package/src/jscommon/umychart.complier.js +30 -2
- package/src/jscommon/umychart.index.data.js +3 -2
- package/src/jscommon/umychart.js +73 -45
- package/src/jscommon/umychart.node/umychart.node.js +11661 -8473
- package/src/jscommon/umychart.testdata/000001.sz.minute.kline.js +2681 -0
- package/src/jscommon/umychart.testdata/000151.sz.day.kline.js +6084 -0
- package/src/jscommon/umychart.testdata.js +21 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +107 -50
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +21 -0
- package/src/jscommon/umychart.vue/umychart.vue.js +107 -50
package/src/jscommon/umychart.js
CHANGED
|
@@ -622,6 +622,14 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
622
622
|
chart.WindowIndex[i] = new ScriptIndex(indexInfo.Name, indexInfo.Script, args,indexInfo); //脚本执行
|
|
623
623
|
if (item.StringFormat>0) chart.WindowIndex[i].StringFormat=item.StringFormat;
|
|
624
624
|
if (item.FloatPrecision>=0) chart.WindowIndex[i].FloatPrecision=item.FloatPrecision;
|
|
625
|
+
|
|
626
|
+
if (item.YAxis)
|
|
627
|
+
{
|
|
628
|
+
if (!indexInfo.YAxis) indexInfo.YAxis={ };
|
|
629
|
+
if (IFrameSplitOperator.IsNumber(item.YAxis.FloatPrecision)) indexInfo.YAxis.FloatPrecision=item.YAxis.FloatPrecision;
|
|
630
|
+
if (IFrameSplitOperator.IsNumber(item.YAxis.StringFormat)) indexInfo.YAxis.StringFormat=item.YAxis.StringFormat;
|
|
631
|
+
if (IFrameSplitOperator.IsBool(item.YAxis.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=item.YAxis.EnableRemoveZero;
|
|
632
|
+
}
|
|
625
633
|
}
|
|
626
634
|
|
|
627
635
|
}
|
|
@@ -8062,7 +8070,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8062
8070
|
subFrame.Frame.IsShowYText[1]=option.IsShowRightText;
|
|
8063
8071
|
subFrame.Frame.YSplitOperator.IsShowRightText=option.IsShowRightText; //显示右边刻度
|
|
8064
8072
|
}
|
|
8065
|
-
|
|
8066
8073
|
}
|
|
8067
8074
|
|
|
8068
8075
|
this.AddNewSubFrame=function(option)
|
|
@@ -8110,24 +8117,22 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8110
8117
|
this.RemoveMinSizeWindows(); //清空隐藏的指标
|
|
8111
8118
|
var index=this.AddNewSubFrame(option);
|
|
8112
8119
|
|
|
8113
|
-
var indexData =
|
|
8114
|
-
{
|
|
8115
|
-
Name:indexInfo.Name, Script:indexInfo.Script, Args: indexInfo.Args, ID:indexName ,
|
|
8116
|
-
//扩展属性 可以是空
|
|
8117
|
-
KLineType:indexInfo.KLineType, YSpecificMaxMin:indexInfo.YSpecificMaxMin, YSplitScale:indexInfo.YSplitScale,
|
|
8118
|
-
FloatPrecision:indexInfo.FloatPrecision, Condition:indexInfo.Condition,StringFormat:indexInfo.StringFormat,
|
|
8119
|
-
OutName:indexInfo.OutName
|
|
8120
|
-
};
|
|
8121
|
-
|
|
8122
8120
|
if (option)
|
|
8123
8121
|
{
|
|
8124
|
-
if (option.FloatPrecision>=0)
|
|
8125
|
-
if (option.StringFormat>0)
|
|
8126
|
-
if (option.Args)
|
|
8127
|
-
if (option.Lock)
|
|
8122
|
+
if (option.FloatPrecision>=0) indexInfo.FloatPrecision=option.FloatPrecision;
|
|
8123
|
+
if (option.StringFormat>0) indexInfo.StringFormat=option.StringFormat;
|
|
8124
|
+
if (option.Args) indexInfo.Args=option.Args;
|
|
8125
|
+
if (option.Lock) indexInfo.Lock=option.Lock;
|
|
8126
|
+
if (option.YAxis)
|
|
8127
|
+
{
|
|
8128
|
+
indexInfo.YAxis={ };
|
|
8129
|
+
if (IFrameSplitOperator.IsNumber(option.YAxis.FloatPrecision)) indexInfo.YAxis.FloatPrecision=option.YAxis.FloatPrecision;
|
|
8130
|
+
if (IFrameSplitOperator.IsNumber(option.YAxis.StringFormat)) indexInfo.YAxis.StringFormat=option.YAxis.StringFormat;
|
|
8131
|
+
if (IFrameSplitOperator.IsBool(option.YAxis.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=option.YAxis.EnableRemoveZero;
|
|
8132
|
+
}
|
|
8128
8133
|
}
|
|
8129
8134
|
|
|
8130
|
-
this.WindowIndex[index] = new ScriptIndex(
|
|
8135
|
+
this.WindowIndex[index] = new ScriptIndex(indexInfo.Name, indexInfo.Script, indexInfo.Args,indexInfo); //脚本执行
|
|
8131
8136
|
if (this.ClassName=="MinuteChartContainer" || this.ClassName=="MinuteChartHScreenContainer")
|
|
8132
8137
|
var bindData=this.SourceData;
|
|
8133
8138
|
else
|
|
@@ -14377,8 +14382,10 @@ function KLineFrame()
|
|
|
14377
14382
|
{
|
|
14378
14383
|
if (this.XSplit)
|
|
14379
14384
|
{
|
|
14380
|
-
if (this.XSplitOperator
|
|
14385
|
+
if (this.XSplitOperator) this.XSplitOperator.Operator();
|
|
14386
|
+
if (this.YSplitOperator && this.YSplitOperator.CustomCoordinate) this.YSplitOperator.CustomCoordinate();
|
|
14381
14387
|
}
|
|
14388
|
+
|
|
14382
14389
|
return;
|
|
14383
14390
|
}
|
|
14384
14391
|
|
|
@@ -40734,7 +40741,8 @@ function RectSelectPaint()
|
|
|
40734
40741
|
};
|
|
40735
40742
|
|
|
40736
40743
|
this.BorderCache;
|
|
40737
|
-
this.IsOnlyOnePoint=false;
|
|
40744
|
+
this.IsOnlyOnePoint=false; //空格选中区间,单点模式
|
|
40745
|
+
this.IsFullFrame=false; //区间选择包含子窗口
|
|
40738
40746
|
|
|
40739
40747
|
//设置参数接口
|
|
40740
40748
|
this.SetOption=function(option)
|
|
@@ -41145,6 +41153,7 @@ function RectSelectPaint()
|
|
|
41145
41153
|
else
|
|
41146
41154
|
{
|
|
41147
41155
|
var border=subFrame.GetBorder();
|
|
41156
|
+
if (this.IsFullFrame) border=this.ChartFrame.ChartBorder.GetBorder(); //全部指标窗口选中
|
|
41148
41157
|
var xOffset=border.LeftEx+distanceWidth/2.0+g_JSChartResource.FrameLeftMargin;
|
|
41149
41158
|
var chartright=border.RightEx;
|
|
41150
41159
|
var drawHeight=border.ChartHeight-border.TopTitle-5*GetDevicePixelRatio();
|
|
@@ -42773,7 +42782,7 @@ function IFrameSplitOperator()
|
|
|
42773
42782
|
this.Frame; //框架信息
|
|
42774
42783
|
this.FrameSplitData; //坐标轴分割方法
|
|
42775
42784
|
this.SplitCount=5; //刻度个数
|
|
42776
|
-
this.StringFormat=0; //刻度字符串格式
|
|
42785
|
+
this.StringFormat=0; //刻度字符串格式 2=原始格式
|
|
42777
42786
|
this.IsShowLeftText=true; //显示左边刻度
|
|
42778
42787
|
this.IsShowRightText=true; //显示右边刻度
|
|
42779
42788
|
this.LanguageID=JSCHART_LANGUAGE_ID.LANGUAGE_CHINESE_ID;
|
|
@@ -43116,6 +43125,11 @@ function IFrameSplitOperator()
|
|
|
43116
43125
|
|
|
43117
43126
|
return data;
|
|
43118
43127
|
}
|
|
43128
|
+
|
|
43129
|
+
this.Reset=function() //重置
|
|
43130
|
+
{
|
|
43131
|
+
|
|
43132
|
+
}
|
|
43119
43133
|
}
|
|
43120
43134
|
|
|
43121
43135
|
//字符串格式化 千分位分割
|
|
@@ -44115,6 +44129,16 @@ function FrameSplitKLinePriceY()
|
|
|
44115
44129
|
|
|
44116
44130
|
this.CustomCoordinate=function(floatPrecision)
|
|
44117
44131
|
{
|
|
44132
|
+
if (!IFrameSplitOperator.IsNumber(floatPrecision))
|
|
44133
|
+
{
|
|
44134
|
+
var pixelTatio = GetDevicePixelRatio(); //获取设备的分辨率
|
|
44135
|
+
var width=this.Frame.ChartBorder.GetChartWidth(); //画布的宽度
|
|
44136
|
+
var isPhoneModel=width<450*pixelTatio;
|
|
44137
|
+
floatPrecision=GetfloatPrecision(this.Symbol);
|
|
44138
|
+
if (isPhoneModel && MARKET_SUFFIX_NAME.IsSHSZIndex(this.Symbol)) floatPrecision = 0; //手机端指数不显示小数位数,太长了
|
|
44139
|
+
if (this.FloatPrecision!=null) floatPrecision=this.FloatPrecision;
|
|
44140
|
+
}
|
|
44141
|
+
|
|
44118
44142
|
this.Frame.CustomHorizontalInfo=[];
|
|
44119
44143
|
|
|
44120
44144
|
var data=this.InvokeCustomYCoordinateCallback();
|
|
@@ -44580,6 +44604,10 @@ function FrameSplitY()
|
|
|
44580
44604
|
if (IFrameSplitOperator.IsNumber(value) && Math.abs(value) > 1000) floatPrecision=0;
|
|
44581
44605
|
text=IFrameSplitOperator.FormatValueString(value,floatPrecision,this.LanguageID);
|
|
44582
44606
|
}
|
|
44607
|
+
else if (this.StringFormat==2) //原始数据输出
|
|
44608
|
+
{
|
|
44609
|
+
text=`${value.toFixed(this.FloatPrecision)}`;
|
|
44610
|
+
}
|
|
44583
44611
|
else
|
|
44584
44612
|
{
|
|
44585
44613
|
var absValue=Math.abs(value);
|
|
@@ -67764,6 +67792,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
67764
67792
|
this.Draw();
|
|
67765
67793
|
}
|
|
67766
67794
|
|
|
67795
|
+
|
|
67767
67796
|
this.OnKLinePageChange=function(eventid)
|
|
67768
67797
|
{
|
|
67769
67798
|
if (!this.ChartPaint[0]) return;
|
|
@@ -67989,21 +68018,19 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
67989
68018
|
}
|
|
67990
68019
|
else if (indexInfo)
|
|
67991
68020
|
{
|
|
67992
|
-
|
|
67993
|
-
if (obj.
|
|
67994
|
-
|
|
67995
|
-
|
|
67996
|
-
|
|
67997
|
-
|
|
67998
|
-
|
|
67999
|
-
|
|
68000
|
-
|
|
68001
|
-
|
|
68021
|
+
if (obj.Args) indexInfo.Args=obj.Args; //外部可以设置参数
|
|
68022
|
+
if (IFrameSplitOperator.IsNumber(obj.FloatPrecision)) indexInfo.FloatPrecision=obj.FloatPrecision;
|
|
68023
|
+
if (IFrameSplitOperator.IsNumber(obj.StringFormat)) indexInfo.StringFormat=obj.StringFormat;
|
|
68024
|
+
if (IFrameSplitOperator.IsBool(obj.IsSync)) indexInfo.IsSync=obj.IsSync;
|
|
68025
|
+
if (obj.YAxis)
|
|
68026
|
+
{
|
|
68027
|
+
if (!indexInfo.YAxis) indexInfo.YAxis={ };
|
|
68028
|
+
if (IFrameSplitOperator.IsNumber(obj.YAxis.FloatPrecision)) indexInfo.YAxis.FloatPrecision=obj.YAxis.FloatPrecision;
|
|
68029
|
+
if (IFrameSplitOperator.IsNumber(obj.YAxis.StringFormat)) indexInfo.YAxis.StringFormat=obj.YAxis.StringFormat;
|
|
68030
|
+
if (IFrameSplitOperator.IsBool(obj.YAxis.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=obj.YAxis.EnableRemoveZero;
|
|
68031
|
+
}
|
|
68002
68032
|
|
|
68003
|
-
|
|
68004
|
-
if (IFrameSplitOperator.IsNumber(obj.StringFormat)) indexData.StringFormat=obj.StringFormat;
|
|
68005
|
-
if (IFrameSplitOperator.IsBool(obj.IsSync)) indexData.IsSync=obj.IsSync;
|
|
68006
|
-
var scriptIndex=new OverlayScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData); //脚本执行
|
|
68033
|
+
var scriptIndex=new OverlayScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
|
|
68007
68034
|
scriptIndex.OverlayIndex={ IsOverlay:true, Identify:overlayFrame.Identify, WindowIndex:windowIndex, Frame:overlayFrame }; //叠加指标信息
|
|
68008
68035
|
overlayFrame.Script=scriptIndex;
|
|
68009
68036
|
}
|
|
@@ -68374,17 +68401,18 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
68374
68401
|
{
|
|
68375
68402
|
var args=indexInfo.Args;
|
|
68376
68403
|
if (option.Windows[i].Args) args=option.Windows[i].Args;
|
|
68377
|
-
|
|
68378
|
-
|
|
68379
|
-
|
|
68380
|
-
|
|
68381
|
-
|
|
68382
|
-
|
|
68383
|
-
|
|
68384
|
-
|
|
68385
|
-
|
|
68404
|
+
if (item.TitleFont) indexInfo.TitleFont=item.TitleFont;
|
|
68405
|
+
if (item.IsShortTitle) indexInfo.IsShortTitle=item.IsShortTitle;
|
|
68406
|
+
if (IFrameSplitOperator.IsBool(item.IsSync)) indexInfo.IsSync=item.IsSync;
|
|
68407
|
+
|
|
68408
|
+
if (item.YAxis)
|
|
68409
|
+
{
|
|
68410
|
+
if (!indexInfo.YAxis) indexInfo.YAxis={ };
|
|
68411
|
+
if (IFrameSplitOperator.IsNumber(item.YAxis.FloatPrecision)) indexInfo.YAxis.FloatPrecision=item.YAxis.FloatPrecision;
|
|
68412
|
+
if (IFrameSplitOperator.IsNumber(item.YAxis.StringFormat)) indexInfo.YAxis.StringFormat=item.YAxis.StringFormat;
|
|
68413
|
+
}
|
|
68386
68414
|
|
|
68387
|
-
this.WindowIndex[i]=new ScriptIndex(
|
|
68415
|
+
this.WindowIndex[i]=new ScriptIndex(indexInfo.Name,indexInfo.Script,args,indexInfo); //脚本执行
|
|
68388
68416
|
}
|
|
68389
68417
|
}
|
|
68390
68418
|
}
|
|
@@ -69024,7 +69052,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
69024
69052
|
this.Draw();
|
|
69025
69053
|
}
|
|
69026
69054
|
|
|
69027
|
-
//增加叠加股票
|
|
69055
|
+
//增加叠加股票
|
|
69028
69056
|
this.OverlaySymbol=function(symbol,option)
|
|
69029
69057
|
{
|
|
69030
69058
|
for(var i in this.OverlayChartPaint)
|
|
@@ -84740,8 +84768,8 @@ var MARKET_SUFFIX_NAME=
|
|
|
84740
84768
|
SZO:".SZO", //深证交易所 股票期权
|
|
84741
84769
|
HK:'.HK', //港股
|
|
84742
84770
|
FHK:'.FHK', //港股期货
|
|
84743
|
-
SHFE: '.SHF', //上期所 (Shanghai Futures Exchange)
|
|
84744
|
-
SHFE2:'.SHFE', //上期所 (Shanghai Futures Exchange)
|
|
84771
|
+
SHFE: '.SHF', //上期所 (Shanghai Futures Exchange) | 上期所-能源
|
|
84772
|
+
SHFE2:'.SHFE', //上期所 (Shanghai Futures Exchange) | 上期所-能源
|
|
84745
84773
|
CFFEX: '.CFE', //中期所 (China Financial Futures Exchange)
|
|
84746
84774
|
DCE: '.DCE', //大连商品交易所(Dalian Commodity Exchange)
|
|
84747
84775
|
CZCE: '.CZC', //郑州期货交易所
|