hqchart 1.1.12809 → 1.1.12820
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 +52 -34
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +4 -1
- package/src/jscommon/umychart.index.data.js +23 -0
- package/src/jscommon/umychart.js +72 -25
- package/src/jscommon/umychart.style.js +6 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +106 -27
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +106 -27
package/src/jscommon/umychart.js
CHANGED
|
@@ -47880,8 +47880,8 @@ function ChartSplashPaint()
|
|
|
47880
47880
|
{
|
|
47881
47881
|
this.Frame;
|
|
47882
47882
|
this.Canvas; //画布
|
|
47883
|
-
this.Font=g_JSChartResource.
|
|
47884
|
-
this.TextColor=g_JSChartResource.
|
|
47883
|
+
this.Font=g_JSChartResource.SplashScreen.Font; //字体
|
|
47884
|
+
this.TextColor=g_JSChartResource.SplashScreen.TextColor; //文本颜色
|
|
47885
47885
|
this.IsEnableSplash=false;
|
|
47886
47886
|
this.SplashTitle='数据加载中';
|
|
47887
47887
|
this.HQChart;
|
|
@@ -62064,7 +62064,9 @@ function JSChartResource()
|
|
|
62064
62064
|
this.SplashScreen=
|
|
62065
62065
|
{
|
|
62066
62066
|
BGColor:"rgba(112,128,144,0.5)",
|
|
62067
|
-
Title:"下载数据中......"
|
|
62067
|
+
Title:"下载数据中......",
|
|
62068
|
+
TextColor:"rgb(43,54,69)",
|
|
62069
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑'
|
|
62068
62070
|
}
|
|
62069
62071
|
|
|
62070
62072
|
this.HLCArea=
|
|
@@ -63145,6 +63147,8 @@ function JSChartResource()
|
|
|
63145
63147
|
var item=style.SplashScreen;
|
|
63146
63148
|
if (item.BGColor) this.SplashScreen.BGColor=item.BGColor;
|
|
63147
63149
|
if (item.Title) this.SplashScreen.Title=item.Title;
|
|
63150
|
+
if (item.TextColor) this.SplashScreen.TextColor=item.TextColor;
|
|
63151
|
+
if (item.Font) this.SplashScreen.Font=item.Font;
|
|
63148
63152
|
}
|
|
63149
63153
|
|
|
63150
63154
|
if (style.HLCArea)
|
|
@@ -67112,7 +67116,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
67112
67116
|
item.BindData(this,windowIndex,hisData);
|
|
67113
67117
|
}
|
|
67114
67118
|
|
|
67115
|
-
//叠加指标
|
|
67119
|
+
//叠加指标 option={ CheckRunCount:执行次数检测 ,SyncExecute:同步|异步检测 }
|
|
67116
67120
|
this.BindOverlayIndexData=function(overlayItem, windowIndex, hisData, option)
|
|
67117
67121
|
{
|
|
67118
67122
|
if (!overlayItem.Script) return;
|
|
@@ -67125,8 +67129,20 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
67125
67129
|
|
|
67126
67130
|
if (typeof(overlayItem.Script.ExecuteScript)=='function')
|
|
67127
67131
|
{
|
|
67128
|
-
if (option
|
|
67129
|
-
|
|
67132
|
+
if (option)
|
|
67133
|
+
{
|
|
67134
|
+
if (option.CheckRunCount) //检测执行次数
|
|
67135
|
+
{
|
|
67136
|
+
if (overlayItem.Script.IsExcessRunCount())
|
|
67137
|
+
return;
|
|
67138
|
+
}
|
|
67139
|
+
|
|
67140
|
+
if (IFrameSplitOperator.IsBool(option.SyncExecute)) //异步|同步
|
|
67141
|
+
{
|
|
67142
|
+
if (overlayItem.Script.IsSync!=option.SyncExecute)
|
|
67143
|
+
return;
|
|
67144
|
+
}
|
|
67145
|
+
}
|
|
67130
67146
|
|
|
67131
67147
|
overlayItem.Script.ExecuteScript(this,windowIndex,hisData);
|
|
67132
67148
|
return;
|
|
@@ -67302,7 +67318,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
67302
67318
|
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
67303
67319
|
{
|
|
67304
67320
|
var item=this.Frame.SubFrame[i];
|
|
67305
|
-
for(var j
|
|
67321
|
+
for(var j=0; j<item.OverlayIndex.length; ++j)
|
|
67306
67322
|
{
|
|
67307
67323
|
var overlayItem=item.OverlayIndex[j];
|
|
67308
67324
|
this.BindOverlayIndexData(overlayItem,i,hisData,option)
|
|
@@ -67385,12 +67401,14 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
67385
67401
|
|
|
67386
67402
|
if (page.Enable) page.Index=1; //第一页下载完成
|
|
67387
67403
|
|
|
67388
|
-
this.BindInstructionIndexData(bindData);
|
|
67404
|
+
this.BindInstructionIndexData(bindData); //执行指示脚本
|
|
67389
67405
|
for(var i=0; i<this.Frame.SubFrame.length; ++i) //执行指标
|
|
67390
67406
|
{
|
|
67391
67407
|
this.BindIndexData(i,bindData);
|
|
67392
67408
|
}
|
|
67393
67409
|
|
|
67410
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:true }); //同步模式叠加指标
|
|
67411
|
+
|
|
67394
67412
|
//刷新画图
|
|
67395
67413
|
this.UpdataDataoffset(); //更新数据偏移
|
|
67396
67414
|
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
@@ -67398,8 +67416,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
67398
67416
|
this.UpdatePointByCursorIndex(2); //取消十字光标
|
|
67399
67417
|
this.Draw();
|
|
67400
67418
|
|
|
67401
|
-
|
|
67402
|
-
this.BindAllOverlayIndexData(bindData);
|
|
67419
|
+
|
|
67420
|
+
this.BindAllOverlayIndexData(bindData,{ SyncExecute:false } ); //异步模式叠加指标
|
|
67403
67421
|
|
|
67404
67422
|
if (this.mapEvent.has(JSCHART_EVENT_ID.RECV_HISTROY_DATA))
|
|
67405
67423
|
{
|
|
@@ -67693,6 +67711,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
67693
67711
|
this.BindIndexData(i,bindData);
|
|
67694
67712
|
}
|
|
67695
67713
|
|
|
67714
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:true }); //同步模式叠加指标
|
|
67715
|
+
|
|
67696
67716
|
//刷新画图
|
|
67697
67717
|
this.UpdataDataoffset(); //更新数据偏移
|
|
67698
67718
|
this.UpdatePointByCursorIndex(2); //切换周期了取消十字光标
|
|
@@ -67701,7 +67721,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
67701
67721
|
this.Draw();
|
|
67702
67722
|
|
|
67703
67723
|
//叠加指标
|
|
67704
|
-
this.BindAllOverlayIndexData(bindData);
|
|
67724
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:false } ); //异步模式叠加指标
|
|
67705
67725
|
|
|
67706
67726
|
if (this.mapEvent.has(JSCHART_EVENT_ID.RECV_HISTROY_DATA))
|
|
67707
67727
|
{
|
|
@@ -67993,6 +68013,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
67993
68013
|
this.BindIndexData(i,bindData, { CheckRunCount:true });
|
|
67994
68014
|
}
|
|
67995
68015
|
|
|
68016
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true, SyncExecute:true }); //同步模式叠加指标
|
|
68017
|
+
|
|
67996
68018
|
//刷新画图
|
|
67997
68019
|
this.UpdataDataoffset(); //更新数据偏移
|
|
67998
68020
|
this.UpdatePointByCursorIndex(1); //更新十字光标位子
|
|
@@ -68000,10 +68022,10 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
68000
68022
|
this.Frame.SetSizeChage(true);
|
|
68001
68023
|
this.Draw();
|
|
68002
68024
|
|
|
68003
|
-
this.SendKLineUpdateEvent(bindData);
|
|
68025
|
+
this.SendKLineUpdateEvent(bindData);
|
|
68004
68026
|
|
|
68005
68027
|
//叠加指标计算
|
|
68006
|
-
this.BindAllOverlayIndexData(bindData,{ CheckRunCount:true });
|
|
68028
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true,SyncExecute:false }); //异步模式叠加指标
|
|
68007
68029
|
|
|
68008
68030
|
if (this.mapEvent.has(JSCHART_EVENT_ID.ON_RECV_REALTIME_DATA))
|
|
68009
68031
|
{
|
|
@@ -68241,6 +68263,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
68241
68263
|
this.BindIndexData(i,bindData);
|
|
68242
68264
|
}
|
|
68243
68265
|
|
|
68266
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true, SyncExecute:true }); //同步模式叠加指标
|
|
68267
|
+
|
|
68244
68268
|
//刷新画图
|
|
68245
68269
|
this.UpdataDataoffset(); //更新数据偏移
|
|
68246
68270
|
this.UpdatePointByCursorIndex(1); //更新十字光标位子
|
|
@@ -68251,7 +68275,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
68251
68275
|
this.SendKLineUpdateEvent(bindData);
|
|
68252
68276
|
|
|
68253
68277
|
//更新叠加指标
|
|
68254
|
-
this.BindAllOverlayIndexData(bindData);
|
|
68278
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true,SyncExecute:false }); //异步模式叠加指标
|
|
68255
68279
|
|
|
68256
68280
|
if (this.mapEvent.has(JSCHART_EVENT_ID.ON_RECV_REALTIME_DATA))
|
|
68257
68281
|
{
|
|
@@ -68317,6 +68341,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
68317
68341
|
this.BindIndexData(i,bindData);
|
|
68318
68342
|
}
|
|
68319
68343
|
|
|
68344
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true, SyncExecute:true }); //同步模式叠加指标
|
|
68345
|
+
|
|
68320
68346
|
//刷新画图
|
|
68321
68347
|
this.UpdataDataoffset(); //更新数据偏移
|
|
68322
68348
|
this.UpdatePointByCursorIndex(1); //更新十字光标位子
|
|
@@ -68327,7 +68353,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
68327
68353
|
this.SendKLineUpdateEvent(bindData);
|
|
68328
68354
|
|
|
68329
68355
|
//更新叠加指标
|
|
68330
|
-
this.BindAllOverlayIndexData(bindData);
|
|
68356
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true, SyncExecute:false }); //异步模式叠加指标
|
|
68331
68357
|
}
|
|
68332
68358
|
|
|
68333
68359
|
//更新当天的全量分钟数据
|
|
@@ -69262,7 +69288,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
69262
69288
|
|
|
69263
69289
|
if (IFrameSplitOperator.IsNumber(obj.FloatPrecision)) indexData.FloatPrecision=obj.FloatPrecision;
|
|
69264
69290
|
if (IFrameSplitOperator.IsNumber(obj.StringFormat)) indexData.StringFormat=obj.StringFormat;
|
|
69265
|
-
|
|
69291
|
+
if (IFrameSplitOperator.IsBool(obj.IsSync)) indexData.IsSync=obj.IsSync;
|
|
69266
69292
|
var scriptIndex=new OverlayScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData); //脚本执行
|
|
69267
69293
|
scriptIndex.OverlayIndex={ IsOverlay:true, Identify:overlayFrame.Identify, WindowIndex:windowIndex, Frame:overlayFrame }; //叠加指标信息
|
|
69268
69294
|
overlayFrame.Script=scriptIndex;
|
|
@@ -71776,6 +71802,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71776
71802
|
this.BindIndexData(i,bindData);
|
|
71777
71803
|
}
|
|
71778
71804
|
|
|
71805
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:true }); //同步模式叠加指标
|
|
71806
|
+
|
|
71779
71807
|
//刷新画图
|
|
71780
71808
|
this.UpdataDataoffset(); //更新数据偏移
|
|
71781
71809
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
@@ -71785,7 +71813,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71785
71813
|
this.Draw();
|
|
71786
71814
|
|
|
71787
71815
|
//叠加指标计算
|
|
71788
|
-
this.BindAllOverlayIndexData(bindData);
|
|
71816
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:false }); //异步模式叠加指标
|
|
71789
71817
|
}
|
|
71790
71818
|
|
|
71791
71819
|
this.RequestZoomMinuteData=function(requestData)
|
|
@@ -71944,6 +71972,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71944
71972
|
Explain:funcExplain,
|
|
71945
71973
|
Request:{ Url:url, Type:'POST' , Data: postData, Period:this.Period, Right:this.Right },
|
|
71946
71974
|
DragDownload:download,
|
|
71975
|
+
Option:option,
|
|
71947
71976
|
Self:this,
|
|
71948
71977
|
PreventDefault:false,
|
|
71949
71978
|
ZoomData:option.ZoomData
|
|
@@ -72021,6 +72050,12 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72021
72050
|
|
|
72022
72051
|
if (!this.IsApiPeriod)
|
|
72023
72052
|
{
|
|
72053
|
+
if (bindData.Right>0) //复权
|
|
72054
|
+
{
|
|
72055
|
+
var rightData=bindData.GetRightData(bindData.Right, { AlgorithmType: this.RightFormula });
|
|
72056
|
+
bindData.Data=rightData;
|
|
72057
|
+
}
|
|
72058
|
+
|
|
72024
72059
|
if (ChartData.IsDayPeriod(bindData.Period,false) || ChartData.IsMinutePeriod(bindData.Period,false)) //周期数据 (0= 日线,4=1分钟线 不需要处理)
|
|
72025
72060
|
{
|
|
72026
72061
|
var periodData=bindData.GetPeriodData(bindData.Period);
|
|
@@ -72038,12 +72073,20 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72038
72073
|
|
|
72039
72074
|
//绑定数据
|
|
72040
72075
|
this.UpdateMainData(bindData,lastDataCount);
|
|
72041
|
-
if (option
|
|
72076
|
+
if (option) //缩放需要调整当前屏的位置
|
|
72042
72077
|
{
|
|
72043
|
-
|
|
72044
|
-
|
|
72045
|
-
|
|
72046
|
-
|
|
72078
|
+
if (option.ZoomData)
|
|
72079
|
+
{
|
|
72080
|
+
var zoomData=option.ZoomData;
|
|
72081
|
+
var showCount=zoomData.PageSize-zoomData.RightSpaceCount; //一屏显示的数据个数
|
|
72082
|
+
bindData.DataOffset= bindData.Data.length-showCount;
|
|
72083
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
72084
|
+
}
|
|
72085
|
+
else if (IFrameSplitOperator.IsNumber(option.DataOffset))
|
|
72086
|
+
{
|
|
72087
|
+
bindData.DataOffset+=option.DataOffset;
|
|
72088
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
72089
|
+
}
|
|
72047
72090
|
}
|
|
72048
72091
|
|
|
72049
72092
|
this.UpdateOverlayDragDayData(data);
|
|
@@ -72054,6 +72097,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72054
72097
|
this.BindIndexData(i,bindData);
|
|
72055
72098
|
}
|
|
72056
72099
|
|
|
72100
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:true }); //同步模式叠加指标
|
|
72101
|
+
|
|
72057
72102
|
//刷新画图
|
|
72058
72103
|
this.UpdataDataoffset(); //更新数据偏移
|
|
72059
72104
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
@@ -72066,7 +72111,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72066
72111
|
this.ReqeustKLineInfoData( { FunctionName:option.RecvFuncName, StartDate:firstData.Date } );
|
|
72067
72112
|
|
|
72068
72113
|
//叠加指标计算
|
|
72069
|
-
this.BindAllOverlayIndexData(bindData);
|
|
72114
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:false }); //异步模式叠加指标
|
|
72070
72115
|
}
|
|
72071
72116
|
|
|
72072
72117
|
this.RequestZoomDayData=function(requestData)
|
|
@@ -72082,6 +72127,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72082
72127
|
RecvFuncName:"RecvZoomDayData",
|
|
72083
72128
|
Download:this.ZoomDownload.Day,
|
|
72084
72129
|
Url:this.ZoomKLineApiUrl,
|
|
72130
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
72085
72131
|
Count:count,
|
|
72086
72132
|
ZoomData:zoomData
|
|
72087
72133
|
};
|
|
@@ -72099,7 +72145,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72099
72145
|
RecvFuncName:"RecvDragDayData",
|
|
72100
72146
|
Download:this.DragDownload.Day,
|
|
72101
72147
|
Url:this.DragKLineApiUrl,
|
|
72102
|
-
Count:this.MaxRequestDataCount
|
|
72148
|
+
Count:this.MaxRequestDataCount,
|
|
72149
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
72103
72150
|
};
|
|
72104
72151
|
|
|
72105
72152
|
this.RequestPreviousDayData(option);
|
|
@@ -77312,7 +77359,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
77312
77359
|
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
77313
77360
|
{
|
|
77314
77361
|
var item=this.Frame.SubFrame[i];
|
|
77315
|
-
for(var j
|
|
77362
|
+
for(var j=0;j<item.OverlayIndex.length; ++j)
|
|
77316
77363
|
{
|
|
77317
77364
|
var overlayItem=item.OverlayIndex[j];
|
|
77318
77365
|
this.BindOverlayIndexData(overlayItem,i,hisData,option)
|
|
@@ -41,6 +41,12 @@ function GetBlackStyle()
|
|
|
41
41
|
UnchagneBarColor: "rgb(228,228,228)", //平盘
|
|
42
42
|
EmptyBarBGColor:'rgb(0,0,0)', //空心柱子背景色
|
|
43
43
|
|
|
44
|
+
SplashScreen:
|
|
45
|
+
{
|
|
46
|
+
BGColor:"rgba(112,128,144,0.5)",
|
|
47
|
+
TextColor:"rgb(230,230,230)",
|
|
48
|
+
},
|
|
49
|
+
|
|
44
50
|
HLCArea:
|
|
45
51
|
{
|
|
46
52
|
HighLineColor:'rgb(238,21,21)',
|
|
@@ -122,6 +122,7 @@ function JSIndexScript()
|
|
|
122
122
|
['神奇九转', this.NineTurns],
|
|
123
123
|
['EMA', this.EMA3], ['EMA4', this.EMA4], ['EMA5', this.EMA5],['EMA6', this.EMA6],
|
|
124
124
|
["ICHIMOKU",this.ICHIMOKU],["CDP-STD", this.CDP_STD],["TBP-STD",this.TBP_STD],
|
|
125
|
+
["ADX", this.ADX],
|
|
125
126
|
|
|
126
127
|
//通达信特色指标
|
|
127
128
|
["散户线", this.ShareholderCount],["NXTS", this.NXTS],["FKX", this.FKX],["两融资金", this.Margin4],
|
|
@@ -4126,6 +4127,28 @@ TBP:REF(REF(C,1)+IF(DIRECT0>50,MIN(MF0,MF1),MAX(MF0,MF1)),1);\n\
|
|
|
4126
4127
|
return data;
|
|
4127
4128
|
}
|
|
4128
4129
|
|
|
4130
|
+
JSIndexScript.prototype.ADX = function ()
|
|
4131
|
+
{
|
|
4132
|
+
let data =
|
|
4133
|
+
{
|
|
4134
|
+
Name: 'ADX', Description: '均趋向指标', IsMainIndex: true,
|
|
4135
|
+
Args: [{ Name: 'N', Value: 14 }],
|
|
4136
|
+
Script: //脚本
|
|
4137
|
+
`TR1:=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N,1);
|
|
4138
|
+
HD:=HIGH-REF(HIGH,1);
|
|
4139
|
+
LD:=REF(LOW,1)-LOW;
|
|
4140
|
+
DMP:=SMA(IF(HD>0 AND HD>LD,HD,0),N,1);
|
|
4141
|
+
DMM:=SMA(IF(LD>0 AND LD>HD,LD,0),N,1);
|
|
4142
|
+
PDI:DMP*100/TR1,COLORRED,DOTLINE;
|
|
4143
|
+
MDI:DMM*100/TR1,COLORGREEN,DOTLINE;
|
|
4144
|
+
ADX:SMA(ABS(MDI-PDI)/(MDI+PDI)*100,N,1),COLORYELLOW,LINETHICK2;
|
|
4145
|
+
20;
|
|
4146
|
+
40;`
|
|
4147
|
+
};
|
|
4148
|
+
|
|
4149
|
+
return data;
|
|
4150
|
+
}
|
|
4151
|
+
|
|
4129
4152
|
|
|
4130
4153
|
JSIndexScript.prototype.TEST = function ()
|
|
4131
4154
|
{
|
|
@@ -52024,8 +52047,8 @@ function ChartSplashPaint()
|
|
|
52024
52047
|
{
|
|
52025
52048
|
this.Frame;
|
|
52026
52049
|
this.Canvas; //画布
|
|
52027
|
-
this.Font=g_JSChartResource.
|
|
52028
|
-
this.TextColor=g_JSChartResource.
|
|
52050
|
+
this.Font=g_JSChartResource.SplashScreen.Font; //字体
|
|
52051
|
+
this.TextColor=g_JSChartResource.SplashScreen.TextColor; //文本颜色
|
|
52029
52052
|
this.IsEnableSplash=false;
|
|
52030
52053
|
this.SplashTitle='数据加载中';
|
|
52031
52054
|
this.HQChart;
|
|
@@ -66208,7 +66231,9 @@ function JSChartResource()
|
|
|
66208
66231
|
this.SplashScreen=
|
|
66209
66232
|
{
|
|
66210
66233
|
BGColor:"rgba(112,128,144,0.5)",
|
|
66211
|
-
Title:"下载数据中......"
|
|
66234
|
+
Title:"下载数据中......",
|
|
66235
|
+
TextColor:"rgb(43,54,69)",
|
|
66236
|
+
Font:14*GetDevicePixelRatio() +'px 微软雅黑'
|
|
66212
66237
|
}
|
|
66213
66238
|
|
|
66214
66239
|
this.HLCArea=
|
|
@@ -67289,6 +67314,8 @@ function JSChartResource()
|
|
|
67289
67314
|
var item=style.SplashScreen;
|
|
67290
67315
|
if (item.BGColor) this.SplashScreen.BGColor=item.BGColor;
|
|
67291
67316
|
if (item.Title) this.SplashScreen.Title=item.Title;
|
|
67317
|
+
if (item.TextColor) this.SplashScreen.TextColor=item.TextColor;
|
|
67318
|
+
if (item.Font) this.SplashScreen.Font=item.Font;
|
|
67292
67319
|
}
|
|
67293
67320
|
|
|
67294
67321
|
if (style.HLCArea)
|
|
@@ -71256,7 +71283,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71256
71283
|
item.BindData(this,windowIndex,hisData);
|
|
71257
71284
|
}
|
|
71258
71285
|
|
|
71259
|
-
//叠加指标
|
|
71286
|
+
//叠加指标 option={ CheckRunCount:执行次数检测 ,SyncExecute:同步|异步检测 }
|
|
71260
71287
|
this.BindOverlayIndexData=function(overlayItem, windowIndex, hisData, option)
|
|
71261
71288
|
{
|
|
71262
71289
|
if (!overlayItem.Script) return;
|
|
@@ -71269,8 +71296,20 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71269
71296
|
|
|
71270
71297
|
if (typeof(overlayItem.Script.ExecuteScript)=='function')
|
|
71271
71298
|
{
|
|
71272
|
-
if (option
|
|
71273
|
-
|
|
71299
|
+
if (option)
|
|
71300
|
+
{
|
|
71301
|
+
if (option.CheckRunCount) //检测执行次数
|
|
71302
|
+
{
|
|
71303
|
+
if (overlayItem.Script.IsExcessRunCount())
|
|
71304
|
+
return;
|
|
71305
|
+
}
|
|
71306
|
+
|
|
71307
|
+
if (IFrameSplitOperator.IsBool(option.SyncExecute)) //异步|同步
|
|
71308
|
+
{
|
|
71309
|
+
if (overlayItem.Script.IsSync!=option.SyncExecute)
|
|
71310
|
+
return;
|
|
71311
|
+
}
|
|
71312
|
+
}
|
|
71274
71313
|
|
|
71275
71314
|
overlayItem.Script.ExecuteScript(this,windowIndex,hisData);
|
|
71276
71315
|
return;
|
|
@@ -71446,7 +71485,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71446
71485
|
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
71447
71486
|
{
|
|
71448
71487
|
var item=this.Frame.SubFrame[i];
|
|
71449
|
-
for(var j
|
|
71488
|
+
for(var j=0; j<item.OverlayIndex.length; ++j)
|
|
71450
71489
|
{
|
|
71451
71490
|
var overlayItem=item.OverlayIndex[j];
|
|
71452
71491
|
this.BindOverlayIndexData(overlayItem,i,hisData,option)
|
|
@@ -71529,12 +71568,14 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71529
71568
|
|
|
71530
71569
|
if (page.Enable) page.Index=1; //第一页下载完成
|
|
71531
71570
|
|
|
71532
|
-
this.BindInstructionIndexData(bindData);
|
|
71571
|
+
this.BindInstructionIndexData(bindData); //执行指示脚本
|
|
71533
71572
|
for(var i=0; i<this.Frame.SubFrame.length; ++i) //执行指标
|
|
71534
71573
|
{
|
|
71535
71574
|
this.BindIndexData(i,bindData);
|
|
71536
71575
|
}
|
|
71537
71576
|
|
|
71577
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:true }); //同步模式叠加指标
|
|
71578
|
+
|
|
71538
71579
|
//刷新画图
|
|
71539
71580
|
this.UpdataDataoffset(); //更新数据偏移
|
|
71540
71581
|
this.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
@@ -71542,8 +71583,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71542
71583
|
this.UpdatePointByCursorIndex(2); //取消十字光标
|
|
71543
71584
|
this.Draw();
|
|
71544
71585
|
|
|
71545
|
-
|
|
71546
|
-
this.BindAllOverlayIndexData(bindData);
|
|
71586
|
+
|
|
71587
|
+
this.BindAllOverlayIndexData(bindData,{ SyncExecute:false } ); //异步模式叠加指标
|
|
71547
71588
|
|
|
71548
71589
|
if (this.mapEvent.has(JSCHART_EVENT_ID.RECV_HISTROY_DATA))
|
|
71549
71590
|
{
|
|
@@ -71837,6 +71878,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71837
71878
|
this.BindIndexData(i,bindData);
|
|
71838
71879
|
}
|
|
71839
71880
|
|
|
71881
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:true }); //同步模式叠加指标
|
|
71882
|
+
|
|
71840
71883
|
//刷新画图
|
|
71841
71884
|
this.UpdataDataoffset(); //更新数据偏移
|
|
71842
71885
|
this.UpdatePointByCursorIndex(2); //切换周期了取消十字光标
|
|
@@ -71845,7 +71888,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71845
71888
|
this.Draw();
|
|
71846
71889
|
|
|
71847
71890
|
//叠加指标
|
|
71848
|
-
this.BindAllOverlayIndexData(bindData);
|
|
71891
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:false } ); //异步模式叠加指标
|
|
71849
71892
|
|
|
71850
71893
|
if (this.mapEvent.has(JSCHART_EVENT_ID.RECV_HISTROY_DATA))
|
|
71851
71894
|
{
|
|
@@ -72137,6 +72180,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72137
72180
|
this.BindIndexData(i,bindData, { CheckRunCount:true });
|
|
72138
72181
|
}
|
|
72139
72182
|
|
|
72183
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true, SyncExecute:true }); //同步模式叠加指标
|
|
72184
|
+
|
|
72140
72185
|
//刷新画图
|
|
72141
72186
|
this.UpdataDataoffset(); //更新数据偏移
|
|
72142
72187
|
this.UpdatePointByCursorIndex(1); //更新十字光标位子
|
|
@@ -72144,10 +72189,10 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72144
72189
|
this.Frame.SetSizeChage(true);
|
|
72145
72190
|
this.Draw();
|
|
72146
72191
|
|
|
72147
|
-
this.SendKLineUpdateEvent(bindData);
|
|
72192
|
+
this.SendKLineUpdateEvent(bindData);
|
|
72148
72193
|
|
|
72149
72194
|
//叠加指标计算
|
|
72150
|
-
this.BindAllOverlayIndexData(bindData,{ CheckRunCount:true });
|
|
72195
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true,SyncExecute:false }); //异步模式叠加指标
|
|
72151
72196
|
|
|
72152
72197
|
if (this.mapEvent.has(JSCHART_EVENT_ID.ON_RECV_REALTIME_DATA))
|
|
72153
72198
|
{
|
|
@@ -72385,6 +72430,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72385
72430
|
this.BindIndexData(i,bindData);
|
|
72386
72431
|
}
|
|
72387
72432
|
|
|
72433
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true, SyncExecute:true }); //同步模式叠加指标
|
|
72434
|
+
|
|
72388
72435
|
//刷新画图
|
|
72389
72436
|
this.UpdataDataoffset(); //更新数据偏移
|
|
72390
72437
|
this.UpdatePointByCursorIndex(1); //更新十字光标位子
|
|
@@ -72395,7 +72442,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72395
72442
|
this.SendKLineUpdateEvent(bindData);
|
|
72396
72443
|
|
|
72397
72444
|
//更新叠加指标
|
|
72398
|
-
this.BindAllOverlayIndexData(bindData);
|
|
72445
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true,SyncExecute:false }); //异步模式叠加指标
|
|
72399
72446
|
|
|
72400
72447
|
if (this.mapEvent.has(JSCHART_EVENT_ID.ON_RECV_REALTIME_DATA))
|
|
72401
72448
|
{
|
|
@@ -72461,6 +72508,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72461
72508
|
this.BindIndexData(i,bindData);
|
|
72462
72509
|
}
|
|
72463
72510
|
|
|
72511
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true, SyncExecute:true }); //同步模式叠加指标
|
|
72512
|
+
|
|
72464
72513
|
//刷新画图
|
|
72465
72514
|
this.UpdataDataoffset(); //更新数据偏移
|
|
72466
72515
|
this.UpdatePointByCursorIndex(1); //更新十字光标位子
|
|
@@ -72471,7 +72520,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
72471
72520
|
this.SendKLineUpdateEvent(bindData);
|
|
72472
72521
|
|
|
72473
72522
|
//更新叠加指标
|
|
72474
|
-
this.BindAllOverlayIndexData(bindData);
|
|
72523
|
+
this.BindAllOverlayIndexData(bindData, { CheckRunCount:true, SyncExecute:false }); //异步模式叠加指标
|
|
72475
72524
|
}
|
|
72476
72525
|
|
|
72477
72526
|
//更新当天的全量分钟数据
|
|
@@ -73406,7 +73455,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
73406
73455
|
|
|
73407
73456
|
if (IFrameSplitOperator.IsNumber(obj.FloatPrecision)) indexData.FloatPrecision=obj.FloatPrecision;
|
|
73408
73457
|
if (IFrameSplitOperator.IsNumber(obj.StringFormat)) indexData.StringFormat=obj.StringFormat;
|
|
73409
|
-
|
|
73458
|
+
if (IFrameSplitOperator.IsBool(obj.IsSync)) indexData.IsSync=obj.IsSync;
|
|
73410
73459
|
var scriptIndex=new OverlayScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData); //脚本执行
|
|
73411
73460
|
scriptIndex.OverlayIndex={ IsOverlay:true, Identify:overlayFrame.Identify, WindowIndex:windowIndex, Frame:overlayFrame }; //叠加指标信息
|
|
73412
73461
|
overlayFrame.Script=scriptIndex;
|
|
@@ -75920,6 +75969,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75920
75969
|
this.BindIndexData(i,bindData);
|
|
75921
75970
|
}
|
|
75922
75971
|
|
|
75972
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:true }); //同步模式叠加指标
|
|
75973
|
+
|
|
75923
75974
|
//刷新画图
|
|
75924
75975
|
this.UpdataDataoffset(); //更新数据偏移
|
|
75925
75976
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
@@ -75929,7 +75980,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75929
75980
|
this.Draw();
|
|
75930
75981
|
|
|
75931
75982
|
//叠加指标计算
|
|
75932
|
-
this.BindAllOverlayIndexData(bindData);
|
|
75983
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:false }); //异步模式叠加指标
|
|
75933
75984
|
}
|
|
75934
75985
|
|
|
75935
75986
|
this.RequestZoomMinuteData=function(requestData)
|
|
@@ -76088,6 +76139,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
76088
76139
|
Explain:funcExplain,
|
|
76089
76140
|
Request:{ Url:url, Type:'POST' , Data: postData, Period:this.Period, Right:this.Right },
|
|
76090
76141
|
DragDownload:download,
|
|
76142
|
+
Option:option,
|
|
76091
76143
|
Self:this,
|
|
76092
76144
|
PreventDefault:false,
|
|
76093
76145
|
ZoomData:option.ZoomData
|
|
@@ -76165,6 +76217,12 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
76165
76217
|
|
|
76166
76218
|
if (!this.IsApiPeriod)
|
|
76167
76219
|
{
|
|
76220
|
+
if (bindData.Right>0) //复权
|
|
76221
|
+
{
|
|
76222
|
+
var rightData=bindData.GetRightData(bindData.Right, { AlgorithmType: this.RightFormula });
|
|
76223
|
+
bindData.Data=rightData;
|
|
76224
|
+
}
|
|
76225
|
+
|
|
76168
76226
|
if (ChartData.IsDayPeriod(bindData.Period,false) || ChartData.IsMinutePeriod(bindData.Period,false)) //周期数据 (0= 日线,4=1分钟线 不需要处理)
|
|
76169
76227
|
{
|
|
76170
76228
|
var periodData=bindData.GetPeriodData(bindData.Period);
|
|
@@ -76182,12 +76240,20 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
76182
76240
|
|
|
76183
76241
|
//绑定数据
|
|
76184
76242
|
this.UpdateMainData(bindData,lastDataCount);
|
|
76185
|
-
if (option
|
|
76243
|
+
if (option) //缩放需要调整当前屏的位置
|
|
76186
76244
|
{
|
|
76187
|
-
|
|
76188
|
-
|
|
76189
|
-
|
|
76190
|
-
|
|
76245
|
+
if (option.ZoomData)
|
|
76246
|
+
{
|
|
76247
|
+
var zoomData=option.ZoomData;
|
|
76248
|
+
var showCount=zoomData.PageSize-zoomData.RightSpaceCount; //一屏显示的数据个数
|
|
76249
|
+
bindData.DataOffset= bindData.Data.length-showCount;
|
|
76250
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
76251
|
+
}
|
|
76252
|
+
else if (IFrameSplitOperator.IsNumber(option.DataOffset))
|
|
76253
|
+
{
|
|
76254
|
+
bindData.DataOffset+=option.DataOffset;
|
|
76255
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
76256
|
+
}
|
|
76191
76257
|
}
|
|
76192
76258
|
|
|
76193
76259
|
this.UpdateOverlayDragDayData(data);
|
|
@@ -76198,6 +76264,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
76198
76264
|
this.BindIndexData(i,bindData);
|
|
76199
76265
|
}
|
|
76200
76266
|
|
|
76267
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:true }); //同步模式叠加指标
|
|
76268
|
+
|
|
76201
76269
|
//刷新画图
|
|
76202
76270
|
this.UpdataDataoffset(); //更新数据偏移
|
|
76203
76271
|
this.UpdatePointByCursorIndex(); //更新十字光标位子
|
|
@@ -76210,7 +76278,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
76210
76278
|
this.ReqeustKLineInfoData( { FunctionName:option.RecvFuncName, StartDate:firstData.Date } );
|
|
76211
76279
|
|
|
76212
76280
|
//叠加指标计算
|
|
76213
|
-
this.BindAllOverlayIndexData(bindData);
|
|
76281
|
+
this.BindAllOverlayIndexData(bindData, { SyncExecute:false }); //异步模式叠加指标
|
|
76214
76282
|
}
|
|
76215
76283
|
|
|
76216
76284
|
this.RequestZoomDayData=function(requestData)
|
|
@@ -76226,6 +76294,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
76226
76294
|
RecvFuncName:"RecvZoomDayData",
|
|
76227
76295
|
Download:this.ZoomDownload.Day,
|
|
76228
76296
|
Url:this.ZoomKLineApiUrl,
|
|
76297
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
76229
76298
|
Count:count,
|
|
76230
76299
|
ZoomData:zoomData
|
|
76231
76300
|
};
|
|
@@ -76243,7 +76312,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
76243
76312
|
RecvFuncName:"RecvDragDayData",
|
|
76244
76313
|
Download:this.DragDownload.Day,
|
|
76245
76314
|
Url:this.DragKLineApiUrl,
|
|
76246
|
-
Count:this.MaxRequestDataCount
|
|
76315
|
+
Count:this.MaxRequestDataCount,
|
|
76316
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
76247
76317
|
};
|
|
76248
76318
|
|
|
76249
76319
|
this.RequestPreviousDayData(option);
|
|
@@ -81456,7 +81526,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81456
81526
|
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
81457
81527
|
{
|
|
81458
81528
|
var item=this.Frame.SubFrame[i];
|
|
81459
|
-
for(var j
|
|
81529
|
+
for(var j=0;j<item.OverlayIndex.length; ++j)
|
|
81460
81530
|
{
|
|
81461
81531
|
var overlayItem=item.OverlayIndex[j];
|
|
81462
81532
|
this.BindOverlayIndexData(overlayItem,i,hisData,option)
|
|
@@ -112344,6 +112414,7 @@ function JSExecute(ast,option)
|
|
|
112344
112414
|
outVar=this.SymbolData.GetOtherSymolCacheData({ Literal:outVar });
|
|
112345
112415
|
varName="__temp_li_"+i+"__";
|
|
112346
112416
|
var type=0;
|
|
112417
|
+
if (!Array.isArray(outVar)) outVar=this.SingleDataToArrayData(outVar);
|
|
112347
112418
|
this.OutVarTable.push({Name:varName, Data:outVar, Type:type, NoneName:true});
|
|
112348
112419
|
}
|
|
112349
112420
|
else if (item.Expression.Type==Syntax.BinaryExpression)
|
|
@@ -117110,7 +117181,9 @@ function OverlayScriptIndex(name,script,args,option)
|
|
|
117110
117181
|
|
|
117111
117182
|
param.HQChart.UpdataDataoffset(); //更新数据偏移
|
|
117112
117183
|
param.HQChart.UpdateFrameMaxMin(); //调整坐标最大 最小值
|
|
117113
|
-
|
|
117184
|
+
|
|
117185
|
+
if (param.Self.IsSync===false) //异步需要马上刷新,同步主图数据更新的时候会刷新的
|
|
117186
|
+
param.HQChart.Draw();
|
|
117114
117187
|
|
|
117115
117188
|
var event=hqChart.GetOverlayIndexEvent(); //指标计算完成回调
|
|
117116
117189
|
if (event)
|
|
@@ -120820,6 +120893,12 @@ function GetBlackStyle()
|
|
|
120820
120893
|
UnchagneBarColor: "rgb(228,228,228)", //平盘
|
|
120821
120894
|
EmptyBarBGColor:'rgb(0,0,0)', //空心柱子背景色
|
|
120822
120895
|
|
|
120896
|
+
SplashScreen:
|
|
120897
|
+
{
|
|
120898
|
+
BGColor:"rgba(112,128,144,0.5)",
|
|
120899
|
+
TextColor:"rgb(230,230,230)",
|
|
120900
|
+
},
|
|
120901
|
+
|
|
120823
120902
|
HLCArea:
|
|
120824
120903
|
{
|
|
120825
120904
|
HighLineColor:'rgb(238,21,21)',
|
|
@@ -131675,7 +131754,7 @@ function ScrollBarBGChart()
|
|
|
131675
131754
|
|
|
131676
131755
|
|
|
131677
131756
|
|
|
131678
|
-
var HQCHART_VERSION="1.1.
|
|
131757
|
+
var HQCHART_VERSION="1.1.12819";
|
|
131679
131758
|
|
|
131680
131759
|
function PrintHQChartVersion()
|
|
131681
131760
|
{
|