hqchart 1.1.12798 → 1.1.12809
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 +20 -19
- package/package.json +1 -1
- package/src/jscommon/umychart.js +125 -19
- package/src/jscommon/umychart.testdata/if2206.cf.1minute.kline.js +287504 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +126 -20
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +126 -20
|
@@ -6295,12 +6295,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
6295
6295
|
}
|
|
6296
6296
|
}
|
|
6297
6297
|
|
|
6298
|
-
this.EnableSplashScreen=function(option)
|
|
6298
|
+
this.EnableSplashScreen=function(enable, option)
|
|
6299
6299
|
{
|
|
6300
6300
|
if(this.JSChartContainer && typeof(this.JSChartContainer.EnableSplashScreen)=='function')
|
|
6301
6301
|
{
|
|
6302
6302
|
JSConsole.Chart.Log('[JSChart:EnableSplashScreen] ');
|
|
6303
|
-
this.JSChartContainer.EnableSplashScreen(option);
|
|
6303
|
+
this.JSChartContainer.EnableSplashScreen(enable, option);
|
|
6304
6304
|
}
|
|
6305
6305
|
}
|
|
6306
6306
|
|
|
@@ -6694,6 +6694,8 @@ var JSCHART_EVENT_ID=
|
|
|
6694
6694
|
ON_CREATE_OVERLAY_FRAME:118, //创建叠加框架回调
|
|
6695
6695
|
|
|
6696
6696
|
ON_CREATE_CUSTOM_Y_COORDINATE:119, //自定义Y轴刻度
|
|
6697
|
+
|
|
6698
|
+
ON_BEFORE_DRAW_SPLASH_SCREEN:120,
|
|
6697
6699
|
}
|
|
6698
6700
|
|
|
6699
6701
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7265,6 +7267,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7265
7267
|
|
|
7266
7268
|
this.UIOnDblClick=function(e)
|
|
7267
7269
|
{
|
|
7270
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash) return;
|
|
7271
|
+
|
|
7268
7272
|
var pixelTatio = GetDevicePixelRatio();
|
|
7269
7273
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
7270
7274
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
@@ -9140,7 +9144,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9140
9144
|
|
|
9141
9145
|
this.Draw=function()
|
|
9142
9146
|
{
|
|
9143
|
-
|
|
9144
9147
|
if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
|
|
9145
9148
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
9146
9149
|
|
|
@@ -9161,6 +9164,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9161
9164
|
|
|
9162
9165
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
9163
9166
|
{
|
|
9167
|
+
var data=this.InvokeBeforeDrawSplashScreenCallback();
|
|
9168
|
+
if (data && data.PreventDefault===true) return;
|
|
9169
|
+
|
|
9164
9170
|
this.Frame.ClearCoordinateText();
|
|
9165
9171
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
9166
9172
|
this.ChartSplashPaint.Draw();
|
|
@@ -9590,6 +9596,48 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9590
9596
|
|
|
9591
9597
|
return status;
|
|
9592
9598
|
}
|
|
9599
|
+
|
|
9600
|
+
this.InvokeBeforeDrawSplashScreenCallback=function()
|
|
9601
|
+
{
|
|
9602
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW_SPLASH_SCREEN);
|
|
9603
|
+
if (!event || !event.Callback) return null;
|
|
9604
|
+
|
|
9605
|
+
var data={ PreventDefault:false };
|
|
9606
|
+
event.Callback(event,data,this);
|
|
9607
|
+
|
|
9608
|
+
return data;
|
|
9609
|
+
}
|
|
9610
|
+
|
|
9611
|
+
this.DrawSplashScreen=function(option)
|
|
9612
|
+
{
|
|
9613
|
+
var data=this.InvokeBeforeDrawSplashScreenCallback();
|
|
9614
|
+
if (data && data.PreventDefault===true) return;
|
|
9615
|
+
|
|
9616
|
+
if (this.Frame.ScreenImageData==null && !this.CacheCanvas) return;
|
|
9617
|
+
|
|
9618
|
+
if (this.Frame.ScreenImageData)
|
|
9619
|
+
{
|
|
9620
|
+
this.Canvas.putImageData(this.Frame.ScreenImageData,0,0);
|
|
9621
|
+
}
|
|
9622
|
+
else if (this.CacheCanvas)
|
|
9623
|
+
{
|
|
9624
|
+
this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height)
|
|
9625
|
+
this.Canvas.drawImage(this.CacheElement,0,0);
|
|
9626
|
+
}
|
|
9627
|
+
|
|
9628
|
+
var bgColor=g_JSChartResource.SplashScreen.BGColor;
|
|
9629
|
+
this.Canvas.fillStyle=bgColor;
|
|
9630
|
+
this.Canvas.fillRect(0,0,this.UIElement.width,this.UIElement.height)
|
|
9631
|
+
|
|
9632
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
9633
|
+
{
|
|
9634
|
+
var title=g_JSChartResource.SplashScreen.Title;
|
|
9635
|
+
if (option && option.Title) title=option.Title;
|
|
9636
|
+
this.ChartSplashPaint.SetTitle(title);
|
|
9637
|
+
this.ChartSplashPaint.Draw();
|
|
9638
|
+
}
|
|
9639
|
+
}
|
|
9640
|
+
|
|
9593
9641
|
//画动态信息
|
|
9594
9642
|
this.DrawDynamicInfo=function(option)
|
|
9595
9643
|
{
|
|
@@ -10295,14 +10343,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10295
10343
|
var cursorIndex={ ZoomType:this.ZoomType ,IsLockRight:this.IsZoomLockRight };
|
|
10296
10344
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
10297
10345
|
if (!this.Frame.ZoomDown(cursorIndex, { ZoomDownloadDataCallback:(requestData)=>{ this.ZoomDownloadData(requestData) } })) break;
|
|
10346
|
+
|
|
10298
10347
|
this.CursorIndex=cursorIndex.Index;
|
|
10299
10348
|
this.UpdataDataoffset();
|
|
10300
10349
|
this.UpdatePointByCursorIndex();
|
|
10301
10350
|
this.UpdateFrameMaxMin();
|
|
10302
10351
|
this.ResetFrameXSplit();
|
|
10303
|
-
this.
|
|
10352
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
10353
|
+
{
|
|
10354
|
+
|
|
10355
|
+
}
|
|
10356
|
+
else
|
|
10357
|
+
{
|
|
10358
|
+
this.Draw();
|
|
10359
|
+
}
|
|
10304
10360
|
this.ShowTooltipByKeyDown();
|
|
10305
10361
|
this.OnKLinePageChange("keydown");
|
|
10362
|
+
|
|
10306
10363
|
break;
|
|
10307
10364
|
case 46: //del
|
|
10308
10365
|
if (this.SelectChartDrawPicture)
|
|
@@ -12127,16 +12184,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12127
12184
|
}
|
|
12128
12185
|
|
|
12129
12186
|
//全屏提示信息 { Title:提示信息, Draw:false/true 是否立即重绘, }
|
|
12130
|
-
this.EnableSplashScreen=function(option)
|
|
12187
|
+
this.EnableSplashScreen=function(enable, option)
|
|
12131
12188
|
{
|
|
12132
12189
|
if (!this.ChartSplashPaint) return;
|
|
12133
|
-
if (!option) return;
|
|
12134
12190
|
|
|
12135
|
-
|
|
12136
|
-
this.ChartSplashPaint.EnableSplash(true);
|
|
12191
|
+
this.ChartSplashPaint.EnableSplash(enable);
|
|
12137
12192
|
|
|
12138
|
-
if (option.Draw===false) return;
|
|
12139
|
-
|
|
12193
|
+
if (option && option.Draw===false) return;
|
|
12194
|
+
|
|
12195
|
+
if (enable) this.DrawSplashScreen(option);
|
|
12196
|
+
else this.Draw();
|
|
12140
12197
|
}
|
|
12141
12198
|
|
|
12142
12199
|
//设置指标窗口属性 windowItem=SetOption.Windows[i], frameItem=SetOption.Frames[i];
|
|
@@ -21885,6 +21942,18 @@ function HQTradeFrame()
|
|
|
21885
21942
|
return result;
|
|
21886
21943
|
}
|
|
21887
21944
|
|
|
21945
|
+
this.GetXShowCount=function()
|
|
21946
|
+
{
|
|
21947
|
+
var xPointcount=-1;
|
|
21948
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.SubFrame)) return xPointcount;
|
|
21949
|
+
|
|
21950
|
+
var subFrame=this.SubFrame[0];
|
|
21951
|
+
if (!subFrame.Frame) return xPointcount;
|
|
21952
|
+
|
|
21953
|
+
xPointcount=subFrame.Frame.XPointCount;
|
|
21954
|
+
return xPointcount;
|
|
21955
|
+
}
|
|
21956
|
+
|
|
21888
21957
|
this.XCoordinateZoom=function(step, isMoveLeft)
|
|
21889
21958
|
{
|
|
21890
21959
|
var result=this.SubFrame[0].Frame.XCoordinateZoom(step, isMoveLeft);
|
|
@@ -66136,6 +66205,12 @@ function JSChartResource()
|
|
|
66136
66205
|
this.EmptyBarBGColor="rgb(255,255,255)"; //空心柱子背景色
|
|
66137
66206
|
this.HighLowBarColor='rgb(41,98,255)'; //high low bar 颜色
|
|
66138
66207
|
|
|
66208
|
+
this.SplashScreen=
|
|
66209
|
+
{
|
|
66210
|
+
BGColor:"rgba(112,128,144,0.5)",
|
|
66211
|
+
Title:"下载数据中......"
|
|
66212
|
+
}
|
|
66213
|
+
|
|
66139
66214
|
this.HLCArea=
|
|
66140
66215
|
{
|
|
66141
66216
|
HighLineColor:'rgb(242,54,69)',
|
|
@@ -67209,6 +67284,13 @@ function JSChartResource()
|
|
|
67209
67284
|
if (style.EmptyBarBGColor) this.EmptyBarBGColor=style.EmptyBarBGColor;
|
|
67210
67285
|
if (style.HighLowBarColor) this.HighLowBarColor=style.HighLowBarColor;
|
|
67211
67286
|
|
|
67287
|
+
if (style.SplashScreen)
|
|
67288
|
+
{
|
|
67289
|
+
var item=style.SplashScreen;
|
|
67290
|
+
if (item.BGColor) this.SplashScreen.BGColor=item.BGColor;
|
|
67291
|
+
if (item.Title) this.SplashScreen.Title=item.Title;
|
|
67292
|
+
}
|
|
67293
|
+
|
|
67212
67294
|
if (style.HLCArea)
|
|
67213
67295
|
{
|
|
67214
67296
|
var item=style.HLCArea;
|
|
@@ -70388,7 +70470,14 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
70388
70470
|
this.UpdatePointByCursorIndex();
|
|
70389
70471
|
this.UpdateFrameMaxMin();
|
|
70390
70472
|
this.ResetFrameXSplit();
|
|
70391
|
-
this.
|
|
70473
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
70474
|
+
{
|
|
70475
|
+
|
|
70476
|
+
}
|
|
70477
|
+
else
|
|
70478
|
+
{
|
|
70479
|
+
this.Draw();
|
|
70480
|
+
}
|
|
70392
70481
|
this.OnKLinePageChange("wheel");
|
|
70393
70482
|
}
|
|
70394
70483
|
}
|
|
@@ -75743,6 +75832,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75743
75832
|
{
|
|
75744
75833
|
download.IsEnd=true;
|
|
75745
75834
|
JSConsole.Chart.Log(`[KLineChartContainer.RecvPreviousMinuteData] ${this.Symbol} data end. FuncName=${option.FuncName}`);
|
|
75835
|
+
this.Draw();
|
|
75746
75836
|
return;
|
|
75747
75837
|
}
|
|
75748
75838
|
|
|
@@ -75783,6 +75873,12 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75783
75873
|
|
|
75784
75874
|
if (!this.IsApiPeriod)
|
|
75785
75875
|
{
|
|
75876
|
+
if (bindData.Right>0 && this.RightFormula>=1) //复权
|
|
75877
|
+
{
|
|
75878
|
+
var rightData=bindData.GetRightData(bindData.Right, { AlgorithmType: this.RightFormula } );
|
|
75879
|
+
bindData.Data=rightData;
|
|
75880
|
+
}
|
|
75881
|
+
|
|
75786
75882
|
if (ChartData.IsDayPeriod(bindData.Period,false) || ChartData.IsMinutePeriod(bindData.Period,false)) //周期数据 (0= 日线,4=1分钟线 不需要处理)
|
|
75787
75883
|
{
|
|
75788
75884
|
var periodData=bindData.GetPeriodData(bindData.Period);
|
|
@@ -75800,12 +75896,20 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75800
75896
|
|
|
75801
75897
|
//绑定数据
|
|
75802
75898
|
this.UpdateMainData(bindData,lastDataCount);
|
|
75803
|
-
if (option
|
|
75899
|
+
if (option) //缩放需要调整当前屏的位置
|
|
75804
75900
|
{
|
|
75805
|
-
|
|
75806
|
-
|
|
75807
|
-
|
|
75808
|
-
|
|
75901
|
+
if (option.ZoomData)
|
|
75902
|
+
{
|
|
75903
|
+
var zoomData=option.ZoomData;
|
|
75904
|
+
var showCount=zoomData.PageSize-zoomData.RightSpaceCount; //一屏显示的数据个数
|
|
75905
|
+
bindData.DataOffset= bindData.Data.length-showCount;
|
|
75906
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
75907
|
+
}
|
|
75908
|
+
else if (IFrameSplitOperator.IsNumber(option.DataOffset))
|
|
75909
|
+
{
|
|
75910
|
+
bindData.DataOffset+=option.DataOffset;
|
|
75911
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
75912
|
+
}
|
|
75809
75913
|
}
|
|
75810
75914
|
|
|
75811
75915
|
this.UpdateOverlayDragMinuteData(data);
|
|
@@ -75828,7 +75932,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75828
75932
|
this.BindAllOverlayIndexData(bindData);
|
|
75829
75933
|
}
|
|
75830
75934
|
|
|
75831
|
-
this.RequestZoomMinuteData=function()
|
|
75935
|
+
this.RequestZoomMinuteData=function(requestData)
|
|
75832
75936
|
{
|
|
75833
75937
|
var zoomData={ PageSize:requestData.PageSize, DataCount:requestData.DataCount, RightSpaceCount:requestData.RightSpaceCount };
|
|
75834
75938
|
|
|
@@ -75837,9 +75941,10 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75837
75941
|
FuncName:'KLineChartContainer::RequestZoomMinuteData',
|
|
75838
75942
|
FuncExplain:"缩放分钟|秒K线数据下载",
|
|
75839
75943
|
RecvFuncName:"RecvZoomMinuteData",
|
|
75840
|
-
Download:this.
|
|
75944
|
+
Download:this.ZoomDownload.Minute,
|
|
75841
75945
|
Url:this.ZoomMinuteKLineApiUrl,
|
|
75842
75946
|
Count:this.MaxRequestMinuteDayCount,
|
|
75947
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
75843
75948
|
ZoomData:zoomData
|
|
75844
75949
|
};
|
|
75845
75950
|
|
|
@@ -75855,7 +75960,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75855
75960
|
RecvFuncName:"RecvDragMinuteData",
|
|
75856
75961
|
Download:this.DragDownload.Minute,
|
|
75857
75962
|
Url:this.DragMinuteKLineApiUrl,
|
|
75858
|
-
Count:this.MaxRequestMinuteDayCount
|
|
75963
|
+
Count:this.MaxRequestMinuteDayCount,
|
|
75964
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
75859
75965
|
};
|
|
75860
75966
|
|
|
75861
75967
|
this.RequestPreviousMinuteData(option);
|
|
@@ -131569,7 +131675,7 @@ function ScrollBarBGChart()
|
|
|
131569
131675
|
|
|
131570
131676
|
|
|
131571
131677
|
|
|
131572
|
-
var HQCHART_VERSION="1.1.
|
|
131678
|
+
var HQCHART_VERSION="1.1.12808";
|
|
131573
131679
|
|
|
131574
131680
|
function PrintHQChartVersion()
|
|
131575
131681
|
{
|
|
@@ -6339,12 +6339,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
6339
6339
|
}
|
|
6340
6340
|
}
|
|
6341
6341
|
|
|
6342
|
-
this.EnableSplashScreen=function(option)
|
|
6342
|
+
this.EnableSplashScreen=function(enable, option)
|
|
6343
6343
|
{
|
|
6344
6344
|
if(this.JSChartContainer && typeof(this.JSChartContainer.EnableSplashScreen)=='function')
|
|
6345
6345
|
{
|
|
6346
6346
|
JSConsole.Chart.Log('[JSChart:EnableSplashScreen] ');
|
|
6347
|
-
this.JSChartContainer.EnableSplashScreen(option);
|
|
6347
|
+
this.JSChartContainer.EnableSplashScreen(enable, option);
|
|
6348
6348
|
}
|
|
6349
6349
|
}
|
|
6350
6350
|
|
|
@@ -6738,6 +6738,8 @@ var JSCHART_EVENT_ID=
|
|
|
6738
6738
|
ON_CREATE_OVERLAY_FRAME:118, //创建叠加框架回调
|
|
6739
6739
|
|
|
6740
6740
|
ON_CREATE_CUSTOM_Y_COORDINATE:119, //自定义Y轴刻度
|
|
6741
|
+
|
|
6742
|
+
ON_BEFORE_DRAW_SPLASH_SCREEN:120,
|
|
6741
6743
|
}
|
|
6742
6744
|
|
|
6743
6745
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7309,6 +7311,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7309
7311
|
|
|
7310
7312
|
this.UIOnDblClick=function(e)
|
|
7311
7313
|
{
|
|
7314
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash) return;
|
|
7315
|
+
|
|
7312
7316
|
var pixelTatio = GetDevicePixelRatio();
|
|
7313
7317
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
7314
7318
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
@@ -9184,7 +9188,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9184
9188
|
|
|
9185
9189
|
this.Draw=function()
|
|
9186
9190
|
{
|
|
9187
|
-
|
|
9188
9191
|
if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
|
|
9189
9192
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
9190
9193
|
|
|
@@ -9205,6 +9208,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9205
9208
|
|
|
9206
9209
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
9207
9210
|
{
|
|
9211
|
+
var data=this.InvokeBeforeDrawSplashScreenCallback();
|
|
9212
|
+
if (data && data.PreventDefault===true) return;
|
|
9213
|
+
|
|
9208
9214
|
this.Frame.ClearCoordinateText();
|
|
9209
9215
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
9210
9216
|
this.ChartSplashPaint.Draw();
|
|
@@ -9634,6 +9640,48 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9634
9640
|
|
|
9635
9641
|
return status;
|
|
9636
9642
|
}
|
|
9643
|
+
|
|
9644
|
+
this.InvokeBeforeDrawSplashScreenCallback=function()
|
|
9645
|
+
{
|
|
9646
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW_SPLASH_SCREEN);
|
|
9647
|
+
if (!event || !event.Callback) return null;
|
|
9648
|
+
|
|
9649
|
+
var data={ PreventDefault:false };
|
|
9650
|
+
event.Callback(event,data,this);
|
|
9651
|
+
|
|
9652
|
+
return data;
|
|
9653
|
+
}
|
|
9654
|
+
|
|
9655
|
+
this.DrawSplashScreen=function(option)
|
|
9656
|
+
{
|
|
9657
|
+
var data=this.InvokeBeforeDrawSplashScreenCallback();
|
|
9658
|
+
if (data && data.PreventDefault===true) return;
|
|
9659
|
+
|
|
9660
|
+
if (this.Frame.ScreenImageData==null && !this.CacheCanvas) return;
|
|
9661
|
+
|
|
9662
|
+
if (this.Frame.ScreenImageData)
|
|
9663
|
+
{
|
|
9664
|
+
this.Canvas.putImageData(this.Frame.ScreenImageData,0,0);
|
|
9665
|
+
}
|
|
9666
|
+
else if (this.CacheCanvas)
|
|
9667
|
+
{
|
|
9668
|
+
this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height)
|
|
9669
|
+
this.Canvas.drawImage(this.CacheElement,0,0);
|
|
9670
|
+
}
|
|
9671
|
+
|
|
9672
|
+
var bgColor=g_JSChartResource.SplashScreen.BGColor;
|
|
9673
|
+
this.Canvas.fillStyle=bgColor;
|
|
9674
|
+
this.Canvas.fillRect(0,0,this.UIElement.width,this.UIElement.height)
|
|
9675
|
+
|
|
9676
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
9677
|
+
{
|
|
9678
|
+
var title=g_JSChartResource.SplashScreen.Title;
|
|
9679
|
+
if (option && option.Title) title=option.Title;
|
|
9680
|
+
this.ChartSplashPaint.SetTitle(title);
|
|
9681
|
+
this.ChartSplashPaint.Draw();
|
|
9682
|
+
}
|
|
9683
|
+
}
|
|
9684
|
+
|
|
9637
9685
|
//画动态信息
|
|
9638
9686
|
this.DrawDynamicInfo=function(option)
|
|
9639
9687
|
{
|
|
@@ -10339,14 +10387,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10339
10387
|
var cursorIndex={ ZoomType:this.ZoomType ,IsLockRight:this.IsZoomLockRight };
|
|
10340
10388
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
10341
10389
|
if (!this.Frame.ZoomDown(cursorIndex, { ZoomDownloadDataCallback:(requestData)=>{ this.ZoomDownloadData(requestData) } })) break;
|
|
10390
|
+
|
|
10342
10391
|
this.CursorIndex=cursorIndex.Index;
|
|
10343
10392
|
this.UpdataDataoffset();
|
|
10344
10393
|
this.UpdatePointByCursorIndex();
|
|
10345
10394
|
this.UpdateFrameMaxMin();
|
|
10346
10395
|
this.ResetFrameXSplit();
|
|
10347
|
-
this.
|
|
10396
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
10397
|
+
{
|
|
10398
|
+
|
|
10399
|
+
}
|
|
10400
|
+
else
|
|
10401
|
+
{
|
|
10402
|
+
this.Draw();
|
|
10403
|
+
}
|
|
10348
10404
|
this.ShowTooltipByKeyDown();
|
|
10349
10405
|
this.OnKLinePageChange("keydown");
|
|
10406
|
+
|
|
10350
10407
|
break;
|
|
10351
10408
|
case 46: //del
|
|
10352
10409
|
if (this.SelectChartDrawPicture)
|
|
@@ -12171,16 +12228,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12171
12228
|
}
|
|
12172
12229
|
|
|
12173
12230
|
//全屏提示信息 { Title:提示信息, Draw:false/true 是否立即重绘, }
|
|
12174
|
-
this.EnableSplashScreen=function(option)
|
|
12231
|
+
this.EnableSplashScreen=function(enable, option)
|
|
12175
12232
|
{
|
|
12176
12233
|
if (!this.ChartSplashPaint) return;
|
|
12177
|
-
if (!option) return;
|
|
12178
12234
|
|
|
12179
|
-
|
|
12180
|
-
this.ChartSplashPaint.EnableSplash(true);
|
|
12235
|
+
this.ChartSplashPaint.EnableSplash(enable);
|
|
12181
12236
|
|
|
12182
|
-
if (option.Draw===false) return;
|
|
12183
|
-
|
|
12237
|
+
if (option && option.Draw===false) return;
|
|
12238
|
+
|
|
12239
|
+
if (enable) this.DrawSplashScreen(option);
|
|
12240
|
+
else this.Draw();
|
|
12184
12241
|
}
|
|
12185
12242
|
|
|
12186
12243
|
//设置指标窗口属性 windowItem=SetOption.Windows[i], frameItem=SetOption.Frames[i];
|
|
@@ -21929,6 +21986,18 @@ function HQTradeFrame()
|
|
|
21929
21986
|
return result;
|
|
21930
21987
|
}
|
|
21931
21988
|
|
|
21989
|
+
this.GetXShowCount=function()
|
|
21990
|
+
{
|
|
21991
|
+
var xPointcount=-1;
|
|
21992
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.SubFrame)) return xPointcount;
|
|
21993
|
+
|
|
21994
|
+
var subFrame=this.SubFrame[0];
|
|
21995
|
+
if (!subFrame.Frame) return xPointcount;
|
|
21996
|
+
|
|
21997
|
+
xPointcount=subFrame.Frame.XPointCount;
|
|
21998
|
+
return xPointcount;
|
|
21999
|
+
}
|
|
22000
|
+
|
|
21932
22001
|
this.XCoordinateZoom=function(step, isMoveLeft)
|
|
21933
22002
|
{
|
|
21934
22003
|
var result=this.SubFrame[0].Frame.XCoordinateZoom(step, isMoveLeft);
|
|
@@ -66180,6 +66249,12 @@ function JSChartResource()
|
|
|
66180
66249
|
this.EmptyBarBGColor="rgb(255,255,255)"; //空心柱子背景色
|
|
66181
66250
|
this.HighLowBarColor='rgb(41,98,255)'; //high low bar 颜色
|
|
66182
66251
|
|
|
66252
|
+
this.SplashScreen=
|
|
66253
|
+
{
|
|
66254
|
+
BGColor:"rgba(112,128,144,0.5)",
|
|
66255
|
+
Title:"下载数据中......"
|
|
66256
|
+
}
|
|
66257
|
+
|
|
66183
66258
|
this.HLCArea=
|
|
66184
66259
|
{
|
|
66185
66260
|
HighLineColor:'rgb(242,54,69)',
|
|
@@ -67253,6 +67328,13 @@ function JSChartResource()
|
|
|
67253
67328
|
if (style.EmptyBarBGColor) this.EmptyBarBGColor=style.EmptyBarBGColor;
|
|
67254
67329
|
if (style.HighLowBarColor) this.HighLowBarColor=style.HighLowBarColor;
|
|
67255
67330
|
|
|
67331
|
+
if (style.SplashScreen)
|
|
67332
|
+
{
|
|
67333
|
+
var item=style.SplashScreen;
|
|
67334
|
+
if (item.BGColor) this.SplashScreen.BGColor=item.BGColor;
|
|
67335
|
+
if (item.Title) this.SplashScreen.Title=item.Title;
|
|
67336
|
+
}
|
|
67337
|
+
|
|
67256
67338
|
if (style.HLCArea)
|
|
67257
67339
|
{
|
|
67258
67340
|
var item=style.HLCArea;
|
|
@@ -70432,7 +70514,14 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
70432
70514
|
this.UpdatePointByCursorIndex();
|
|
70433
70515
|
this.UpdateFrameMaxMin();
|
|
70434
70516
|
this.ResetFrameXSplit();
|
|
70435
|
-
this.
|
|
70517
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
70518
|
+
{
|
|
70519
|
+
|
|
70520
|
+
}
|
|
70521
|
+
else
|
|
70522
|
+
{
|
|
70523
|
+
this.Draw();
|
|
70524
|
+
}
|
|
70436
70525
|
this.OnKLinePageChange("wheel");
|
|
70437
70526
|
}
|
|
70438
70527
|
}
|
|
@@ -75787,6 +75876,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75787
75876
|
{
|
|
75788
75877
|
download.IsEnd=true;
|
|
75789
75878
|
JSConsole.Chart.Log(`[KLineChartContainer.RecvPreviousMinuteData] ${this.Symbol} data end. FuncName=${option.FuncName}`);
|
|
75879
|
+
this.Draw();
|
|
75790
75880
|
return;
|
|
75791
75881
|
}
|
|
75792
75882
|
|
|
@@ -75827,6 +75917,12 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75827
75917
|
|
|
75828
75918
|
if (!this.IsApiPeriod)
|
|
75829
75919
|
{
|
|
75920
|
+
if (bindData.Right>0 && this.RightFormula>=1) //复权
|
|
75921
|
+
{
|
|
75922
|
+
var rightData=bindData.GetRightData(bindData.Right, { AlgorithmType: this.RightFormula } );
|
|
75923
|
+
bindData.Data=rightData;
|
|
75924
|
+
}
|
|
75925
|
+
|
|
75830
75926
|
if (ChartData.IsDayPeriod(bindData.Period,false) || ChartData.IsMinutePeriod(bindData.Period,false)) //周期数据 (0= 日线,4=1分钟线 不需要处理)
|
|
75831
75927
|
{
|
|
75832
75928
|
var periodData=bindData.GetPeriodData(bindData.Period);
|
|
@@ -75844,12 +75940,20 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75844
75940
|
|
|
75845
75941
|
//绑定数据
|
|
75846
75942
|
this.UpdateMainData(bindData,lastDataCount);
|
|
75847
|
-
if (option
|
|
75943
|
+
if (option) //缩放需要调整当前屏的位置
|
|
75848
75944
|
{
|
|
75849
|
-
|
|
75850
|
-
|
|
75851
|
-
|
|
75852
|
-
|
|
75945
|
+
if (option.ZoomData)
|
|
75946
|
+
{
|
|
75947
|
+
var zoomData=option.ZoomData;
|
|
75948
|
+
var showCount=zoomData.PageSize-zoomData.RightSpaceCount; //一屏显示的数据个数
|
|
75949
|
+
bindData.DataOffset= bindData.Data.length-showCount;
|
|
75950
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
75951
|
+
}
|
|
75952
|
+
else if (IFrameSplitOperator.IsNumber(option.DataOffset))
|
|
75953
|
+
{
|
|
75954
|
+
bindData.DataOffset+=option.DataOffset;
|
|
75955
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
75956
|
+
}
|
|
75853
75957
|
}
|
|
75854
75958
|
|
|
75855
75959
|
this.UpdateOverlayDragMinuteData(data);
|
|
@@ -75872,7 +75976,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75872
75976
|
this.BindAllOverlayIndexData(bindData);
|
|
75873
75977
|
}
|
|
75874
75978
|
|
|
75875
|
-
this.RequestZoomMinuteData=function()
|
|
75979
|
+
this.RequestZoomMinuteData=function(requestData)
|
|
75876
75980
|
{
|
|
75877
75981
|
var zoomData={ PageSize:requestData.PageSize, DataCount:requestData.DataCount, RightSpaceCount:requestData.RightSpaceCount };
|
|
75878
75982
|
|
|
@@ -75881,9 +75985,10 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75881
75985
|
FuncName:'KLineChartContainer::RequestZoomMinuteData',
|
|
75882
75986
|
FuncExplain:"缩放分钟|秒K线数据下载",
|
|
75883
75987
|
RecvFuncName:"RecvZoomMinuteData",
|
|
75884
|
-
Download:this.
|
|
75988
|
+
Download:this.ZoomDownload.Minute,
|
|
75885
75989
|
Url:this.ZoomMinuteKLineApiUrl,
|
|
75886
75990
|
Count:this.MaxRequestMinuteDayCount,
|
|
75991
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
75887
75992
|
ZoomData:zoomData
|
|
75888
75993
|
};
|
|
75889
75994
|
|
|
@@ -75899,7 +76004,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75899
76004
|
RecvFuncName:"RecvDragMinuteData",
|
|
75900
76005
|
Download:this.DragDownload.Minute,
|
|
75901
76006
|
Url:this.DragMinuteKLineApiUrl,
|
|
75902
|
-
Count:this.MaxRequestMinuteDayCount
|
|
76007
|
+
Count:this.MaxRequestMinuteDayCount,
|
|
76008
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
75903
76009
|
};
|
|
75904
76010
|
|
|
75905
76011
|
this.RequestPreviousMinuteData(option);
|
|
@@ -131727,7 +131833,7 @@ function HQChartScriptWorker()
|
|
|
131727
131833
|
|
|
131728
131834
|
|
|
131729
131835
|
|
|
131730
|
-
var HQCHART_VERSION="1.1.
|
|
131836
|
+
var HQCHART_VERSION="1.1.12808";
|
|
131731
131837
|
|
|
131732
131838
|
function PrintHQChartVersion()
|
|
131733
131839
|
{
|