hqchart 1.1.12795 → 1.1.12804
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 +25 -23
- package/package.json +1 -1
- package/src/jscommon/umychart.complier.js +1 -1
- package/src/jscommon/umychart.js +247 -121
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +249 -123
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +249 -123
|
@@ -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
|
|
|
@@ -6692,6 +6692,10 @@ var JSCHART_EVENT_ID=
|
|
|
6692
6692
|
ON_KEYDOWN:117,
|
|
6693
6693
|
|
|
6694
6694
|
ON_CREATE_OVERLAY_FRAME:118, //创建叠加框架回调
|
|
6695
|
+
|
|
6696
|
+
ON_CREATE_CUSTOM_Y_COORDINATE:119, //自定义Y轴刻度
|
|
6697
|
+
|
|
6698
|
+
ON_BEFORE_DRAW_SPLASH_SCREEN:120,
|
|
6695
6699
|
}
|
|
6696
6700
|
|
|
6697
6701
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7263,6 +7267,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7263
7267
|
|
|
7264
7268
|
this.UIOnDblClick=function(e)
|
|
7265
7269
|
{
|
|
7270
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash) return;
|
|
7271
|
+
|
|
7266
7272
|
var pixelTatio = GetDevicePixelRatio();
|
|
7267
7273
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
7268
7274
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
@@ -9138,7 +9144,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9138
9144
|
|
|
9139
9145
|
this.Draw=function()
|
|
9140
9146
|
{
|
|
9141
|
-
|
|
9142
9147
|
if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
|
|
9143
9148
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
9144
9149
|
|
|
@@ -9159,6 +9164,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9159
9164
|
|
|
9160
9165
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
9161
9166
|
{
|
|
9167
|
+
var data=this.InvokeBeforeDrawSplashScreenCallback();
|
|
9168
|
+
if (data && data.PreventDefault===true) return;
|
|
9169
|
+
|
|
9162
9170
|
this.Frame.ClearCoordinateText();
|
|
9163
9171
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
9164
9172
|
this.ChartSplashPaint.Draw();
|
|
@@ -9588,6 +9596,48 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9588
9596
|
|
|
9589
9597
|
return status;
|
|
9590
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
|
+
|
|
9591
9641
|
//画动态信息
|
|
9592
9642
|
this.DrawDynamicInfo=function(option)
|
|
9593
9643
|
{
|
|
@@ -10293,14 +10343,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10293
10343
|
var cursorIndex={ ZoomType:this.ZoomType ,IsLockRight:this.IsZoomLockRight };
|
|
10294
10344
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
10295
10345
|
if (!this.Frame.ZoomDown(cursorIndex, { ZoomDownloadDataCallback:(requestData)=>{ this.ZoomDownloadData(requestData) } })) break;
|
|
10346
|
+
|
|
10296
10347
|
this.CursorIndex=cursorIndex.Index;
|
|
10297
10348
|
this.UpdataDataoffset();
|
|
10298
10349
|
this.UpdatePointByCursorIndex();
|
|
10299
10350
|
this.UpdateFrameMaxMin();
|
|
10300
10351
|
this.ResetFrameXSplit();
|
|
10301
|
-
this.
|
|
10352
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
10353
|
+
{
|
|
10354
|
+
|
|
10355
|
+
}
|
|
10356
|
+
else
|
|
10357
|
+
{
|
|
10358
|
+
this.Draw();
|
|
10359
|
+
}
|
|
10302
10360
|
this.ShowTooltipByKeyDown();
|
|
10303
10361
|
this.OnKLinePageChange("keydown");
|
|
10362
|
+
|
|
10304
10363
|
break;
|
|
10305
10364
|
case 46: //del
|
|
10306
10365
|
if (this.SelectChartDrawPicture)
|
|
@@ -12125,16 +12184,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12125
12184
|
}
|
|
12126
12185
|
|
|
12127
12186
|
//全屏提示信息 { Title:提示信息, Draw:false/true 是否立即重绘, }
|
|
12128
|
-
this.EnableSplashScreen=function(option)
|
|
12187
|
+
this.EnableSplashScreen=function(enable, option)
|
|
12129
12188
|
{
|
|
12130
12189
|
if (!this.ChartSplashPaint) return;
|
|
12131
|
-
if (!option) return;
|
|
12132
12190
|
|
|
12133
|
-
|
|
12134
|
-
this.ChartSplashPaint.EnableSplash(true);
|
|
12191
|
+
this.ChartSplashPaint.EnableSplash(enable);
|
|
12135
12192
|
|
|
12136
|
-
if (option.Draw===false) return;
|
|
12137
|
-
|
|
12193
|
+
if (option && option.Draw===false) return;
|
|
12194
|
+
|
|
12195
|
+
if (enable) this.DrawSplashScreen(option);
|
|
12196
|
+
else this.Draw();
|
|
12138
12197
|
}
|
|
12139
12198
|
|
|
12140
12199
|
//设置指标窗口属性 windowItem=SetOption.Windows[i], frameItem=SetOption.Frames[i];
|
|
@@ -21883,6 +21942,18 @@ function HQTradeFrame()
|
|
|
21883
21942
|
return result;
|
|
21884
21943
|
}
|
|
21885
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
|
+
|
|
21886
21957
|
this.XCoordinateZoom=function(step, isMoveLeft)
|
|
21887
21958
|
{
|
|
21888
21959
|
var result=this.SubFrame[0].Frame.XCoordinateZoom(step, isMoveLeft);
|
|
@@ -47420,130 +47491,144 @@ function IFrameSplitOperator()
|
|
|
47420
47491
|
return result;
|
|
47421
47492
|
}
|
|
47422
47493
|
|
|
47423
|
-
|
|
47424
|
-
|
|
47425
|
-
|
|
47426
|
-
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
47427
|
-
if (!pageInfo) return;
|
|
47428
|
-
if (!this.HQChart) return;
|
|
47429
|
-
|
|
47430
|
-
var event=null;
|
|
47431
|
-
if (this.GetEventCallback)
|
|
47432
|
-
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_Y_LABEL);
|
|
47433
|
-
|
|
47434
|
-
var endIndex=pageInfo.End.Index;
|
|
47435
|
-
var floatPrecision=2;
|
|
47436
|
-
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
47437
|
-
for(var i=0, j=0;i<this.HQChart.ChartPaint.length;++i)
|
|
47438
|
-
{
|
|
47439
|
-
var chart=this.HQChart.ChartPaint[i];
|
|
47440
|
-
if (!chart.ChartFrame) continue;
|
|
47441
|
-
if (!chart.GetItemData) continue;
|
|
47442
|
-
if (chart.ChartFrame.Identify==this.Frame.Identify || chart.ChartFrame==this.Frame)
|
|
47443
|
-
{
|
|
47444
|
-
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
47445
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
47446
|
-
|
|
47447
|
-
for(j=0; j<aryItem.length; ++j)
|
|
47448
|
-
{
|
|
47449
|
-
var item=aryItem[j];
|
|
47450
|
-
|
|
47451
|
-
var info=new CoordinateInfo();
|
|
47452
|
-
info.Type=1;
|
|
47453
|
-
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
47454
|
-
info.LineColor=item.Color;
|
|
47455
|
-
info.LineType=-1; //默认不画线
|
|
47456
|
-
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
47457
|
-
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
47458
|
-
|
|
47459
|
-
info.Value=item.Value;
|
|
47460
|
-
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
47461
|
-
|
|
47462
|
-
if (option.Position=='left') info.Message[0]=text;
|
|
47463
|
-
else info.Message[1]=text;
|
|
47464
|
-
|
|
47465
|
-
if (!pageInfo.IsLast)
|
|
47466
|
-
{
|
|
47467
|
-
var config={};
|
|
47468
|
-
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
47469
|
-
|
|
47470
|
-
info.ExtendData={ Custom:config };
|
|
47471
|
-
}
|
|
47472
|
-
|
|
47473
|
-
if (event)
|
|
47474
|
-
{
|
|
47475
|
-
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, FrameID:this.Frame.Identify };
|
|
47476
|
-
event.Callback(event,sendData,this);
|
|
47477
|
-
|
|
47478
|
-
if (sendData.PreventDefault) continue;
|
|
47479
|
-
}
|
|
47480
|
-
|
|
47481
|
-
this.Frame.CustomHorizontalInfo.push(info);
|
|
47482
|
-
}
|
|
47483
|
-
}
|
|
47484
|
-
}
|
|
47485
|
-
}
|
|
47486
|
-
|
|
47487
|
-
this.CustomLatestOverlayIndexDataCoordinate=function(option)
|
|
47488
|
-
{
|
|
47494
|
+
//当前屏最新指标数据
|
|
47495
|
+
this.CustomLatestIndexDataCoordinate=function(option)
|
|
47496
|
+
{
|
|
47489
47497
|
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
47490
47498
|
if (!pageInfo) return;
|
|
47491
|
-
if (!this.
|
|
47492
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.OverlayIndex.ChartPaint)) return;
|
|
47499
|
+
if (!this.HQChart) return;
|
|
47493
47500
|
|
|
47494
47501
|
var event=null;
|
|
47495
47502
|
if (this.GetEventCallback)
|
|
47496
|
-
event=this.GetEventCallback(JSCHART_EVENT_ID.
|
|
47503
|
+
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_Y_LABEL);
|
|
47497
47504
|
|
|
47498
47505
|
var endIndex=pageInfo.End.Index;
|
|
47499
47506
|
var floatPrecision=2;
|
|
47500
47507
|
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
47501
|
-
|
|
47502
|
-
for(var i=0, j=0;i<this.OverlayIndex.ChartPaint.length;++i)
|
|
47508
|
+
for(var i=0, j=0;i<this.HQChart.ChartPaint.length;++i)
|
|
47503
47509
|
{
|
|
47504
|
-
var chart=this.
|
|
47510
|
+
var chart=this.HQChart.ChartPaint[i];
|
|
47505
47511
|
if (!chart.ChartFrame) continue;
|
|
47506
47512
|
if (!chart.GetItemData) continue;
|
|
47507
|
-
|
|
47508
|
-
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
47509
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
47510
|
-
for(j=0; j<aryItem.length; ++j)
|
|
47513
|
+
if (chart.ChartFrame.Identify==this.Frame.Identify || chart.ChartFrame==this.Frame)
|
|
47511
47514
|
{
|
|
47512
|
-
var
|
|
47513
|
-
|
|
47514
|
-
info.Type=1;
|
|
47515
|
-
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
47516
|
-
info.LineColor=item.Color;
|
|
47517
|
-
info.LineType=-1; //默认不画线
|
|
47518
|
-
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
47519
|
-
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
47515
|
+
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
47516
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
47520
47517
|
|
|
47521
|
-
|
|
47522
|
-
|
|
47518
|
+
for(j=0; j<aryItem.length; ++j)
|
|
47519
|
+
{
|
|
47520
|
+
var item=aryItem[j];
|
|
47523
47521
|
|
|
47524
|
-
|
|
47525
|
-
|
|
47522
|
+
var info=new CoordinateInfo();
|
|
47523
|
+
info.Type=1;
|
|
47524
|
+
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
47525
|
+
info.LineColor=item.Color;
|
|
47526
|
+
info.LineType=-1; //默认不画线
|
|
47527
|
+
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
47528
|
+
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
47529
|
+
|
|
47530
|
+
info.Value=item.Value;
|
|
47531
|
+
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
47526
47532
|
|
|
47527
|
-
|
|
47528
|
-
|
|
47529
|
-
var config={};
|
|
47530
|
-
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
47533
|
+
if (option.Position=='left') info.Message[0]=text;
|
|
47534
|
+
else info.Message[1]=text;
|
|
47531
47535
|
|
|
47532
|
-
|
|
47533
|
-
|
|
47536
|
+
if (!pageInfo.IsLast)
|
|
47537
|
+
{
|
|
47538
|
+
var config={};
|
|
47539
|
+
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
47534
47540
|
|
|
47535
|
-
|
|
47536
|
-
|
|
47537
|
-
|
|
47538
|
-
|
|
47541
|
+
info.ExtendData={ Custom:config };
|
|
47542
|
+
}
|
|
47543
|
+
|
|
47544
|
+
if (event)
|
|
47545
|
+
{
|
|
47546
|
+
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, FrameID:this.Frame.Identify };
|
|
47547
|
+
event.Callback(event,sendData,this);
|
|
47539
47548
|
|
|
47540
|
-
|
|
47549
|
+
if (sendData.PreventDefault) continue;
|
|
47550
|
+
}
|
|
47551
|
+
|
|
47552
|
+
this.Frame.CustomHorizontalInfo.push(info);
|
|
47541
47553
|
}
|
|
47542
|
-
|
|
47543
|
-
this.Frame.CustomHorizontalInfo.push(info);
|
|
47544
47554
|
}
|
|
47545
47555
|
}
|
|
47546
|
-
|
|
47556
|
+
}
|
|
47557
|
+
|
|
47558
|
+
this.CustomLatestOverlayIndexDataCoordinate=function(option)
|
|
47559
|
+
{
|
|
47560
|
+
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
47561
|
+
if (!pageInfo) return;
|
|
47562
|
+
if (!this.OverlayIndex) return;
|
|
47563
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.OverlayIndex.ChartPaint)) return;
|
|
47564
|
+
|
|
47565
|
+
var event=null;
|
|
47566
|
+
if (this.GetEventCallback)
|
|
47567
|
+
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_OVERLAY_INDEX_Y_LABEL);
|
|
47568
|
+
|
|
47569
|
+
var endIndex=pageInfo.End.Index;
|
|
47570
|
+
var floatPrecision=2;
|
|
47571
|
+
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
47572
|
+
|
|
47573
|
+
for(var i=0, j=0;i<this.OverlayIndex.ChartPaint.length;++i)
|
|
47574
|
+
{
|
|
47575
|
+
var chart=this.OverlayIndex.ChartPaint[i];
|
|
47576
|
+
if (!chart.ChartFrame) continue;
|
|
47577
|
+
if (!chart.GetItemData) continue;
|
|
47578
|
+
|
|
47579
|
+
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
47580
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
47581
|
+
for(j=0; j<aryItem.length; ++j)
|
|
47582
|
+
{
|
|
47583
|
+
var item=aryItem[j];
|
|
47584
|
+
var info=new CoordinateInfo();
|
|
47585
|
+
info.Type=1;
|
|
47586
|
+
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
47587
|
+
info.LineColor=item.Color;
|
|
47588
|
+
info.LineType=-1; //默认不画线
|
|
47589
|
+
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
47590
|
+
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
47591
|
+
|
|
47592
|
+
info.Value=item.Value;
|
|
47593
|
+
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
47594
|
+
|
|
47595
|
+
if (option.Position=='left') info.Message[0]=text;
|
|
47596
|
+
else info.Message[1]=text;
|
|
47597
|
+
|
|
47598
|
+
if (!pageInfo.IsLast)
|
|
47599
|
+
{
|
|
47600
|
+
var config={};
|
|
47601
|
+
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
47602
|
+
|
|
47603
|
+
info.ExtendData={ Custom:config };
|
|
47604
|
+
}
|
|
47605
|
+
|
|
47606
|
+
if (event)
|
|
47607
|
+
{
|
|
47608
|
+
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, OverlayIdentify:this.OverlayIndex.Identify };
|
|
47609
|
+
event.Callback(event,sendData,this);
|
|
47610
|
+
|
|
47611
|
+
if (sendData.PreventDefault) continue;
|
|
47612
|
+
}
|
|
47613
|
+
|
|
47614
|
+
this.Frame.CustomHorizontalInfo.push(info);
|
|
47615
|
+
}
|
|
47616
|
+
}
|
|
47617
|
+
},
|
|
47618
|
+
|
|
47619
|
+
//回调外部处理自定义Y轴刻度
|
|
47620
|
+
this.InvokeCustomYCoordinateCallback=function()
|
|
47621
|
+
{
|
|
47622
|
+
if (!this.GetEventCallback) return null;
|
|
47623
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_CUSTOM_Y_COORDINATE);
|
|
47624
|
+
if (!event || !event.Callback) return null;
|
|
47625
|
+
|
|
47626
|
+
var data={ ID:this.Frame.Identify, Frame:this.Frame, PreventDefault:false, Custom:this.Custom };
|
|
47627
|
+
if (this.OverlayIdentify) data.OverlayIdentify=this.OverlayIdentify;
|
|
47628
|
+
event.Callback(event,data,this);
|
|
47629
|
+
|
|
47630
|
+
return data;
|
|
47631
|
+
}
|
|
47547
47632
|
}
|
|
47548
47633
|
|
|
47549
47634
|
//字符串格式化 千分位分割
|
|
@@ -48544,6 +48629,10 @@ function FrameSplitKLinePriceY()
|
|
|
48544
48629
|
this.CustomCoordinate=function(floatPrecision)
|
|
48545
48630
|
{
|
|
48546
48631
|
this.Frame.CustomHorizontalInfo=[];
|
|
48632
|
+
|
|
48633
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
48634
|
+
if (data && data.PreventDefault==true) return;
|
|
48635
|
+
|
|
48547
48636
|
var lastCoordinate, pageLastCoordinate;
|
|
48548
48637
|
for(var i=0; i<this.Custom.length; ++i)
|
|
48549
48638
|
{
|
|
@@ -49191,6 +49280,9 @@ function FrameSplitY()
|
|
|
49191
49280
|
{
|
|
49192
49281
|
this.Frame.CustomHorizontalInfo=[];
|
|
49193
49282
|
|
|
49283
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
49284
|
+
if (data && data.PreventDefault==true) return;
|
|
49285
|
+
|
|
49194
49286
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.Custom)) return;
|
|
49195
49287
|
|
|
49196
49288
|
for(var i=0; i<this.Custom.length; ++i)
|
|
@@ -49572,6 +49664,9 @@ function FrameSplitMinutePriceY()
|
|
|
49572
49664
|
|
|
49573
49665
|
this.CustomCoordinate=function() //自定义刻度
|
|
49574
49666
|
{
|
|
49667
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
49668
|
+
if (data && data.PreventDefault==true) return;
|
|
49669
|
+
|
|
49575
49670
|
if (!this.Custom) return;
|
|
49576
49671
|
|
|
49577
49672
|
var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
|
|
@@ -66110,6 +66205,12 @@ function JSChartResource()
|
|
|
66110
66205
|
this.EmptyBarBGColor="rgb(255,255,255)"; //空心柱子背景色
|
|
66111
66206
|
this.HighLowBarColor='rgb(41,98,255)'; //high low bar 颜色
|
|
66112
66207
|
|
|
66208
|
+
this.SplashScreen=
|
|
66209
|
+
{
|
|
66210
|
+
BGColor:"rgba(112,128,144,0.5)",
|
|
66211
|
+
Title:"下载数据中......"
|
|
66212
|
+
}
|
|
66213
|
+
|
|
66113
66214
|
this.HLCArea=
|
|
66114
66215
|
{
|
|
66115
66216
|
HighLineColor:'rgb(242,54,69)',
|
|
@@ -67183,6 +67284,13 @@ function JSChartResource()
|
|
|
67183
67284
|
if (style.EmptyBarBGColor) this.EmptyBarBGColor=style.EmptyBarBGColor;
|
|
67184
67285
|
if (style.HighLowBarColor) this.HighLowBarColor=style.HighLowBarColor;
|
|
67185
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
|
+
|
|
67186
67294
|
if (style.HLCArea)
|
|
67187
67295
|
{
|
|
67188
67296
|
var item=style.HLCArea;
|
|
@@ -70362,7 +70470,14 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
70362
70470
|
this.UpdatePointByCursorIndex();
|
|
70363
70471
|
this.UpdateFrameMaxMin();
|
|
70364
70472
|
this.ResetFrameXSplit();
|
|
70365
|
-
this.
|
|
70473
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
70474
|
+
{
|
|
70475
|
+
|
|
70476
|
+
}
|
|
70477
|
+
else
|
|
70478
|
+
{
|
|
70479
|
+
this.Draw();
|
|
70480
|
+
}
|
|
70366
70481
|
this.OnKLinePageChange("wheel");
|
|
70367
70482
|
}
|
|
70368
70483
|
}
|
|
@@ -75717,6 +75832,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75717
75832
|
{
|
|
75718
75833
|
download.IsEnd=true;
|
|
75719
75834
|
JSConsole.Chart.Log(`[KLineChartContainer.RecvPreviousMinuteData] ${this.Symbol} data end. FuncName=${option.FuncName}`);
|
|
75835
|
+
this.Draw();
|
|
75720
75836
|
return;
|
|
75721
75837
|
}
|
|
75722
75838
|
|
|
@@ -75774,12 +75890,20 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75774
75890
|
|
|
75775
75891
|
//绑定数据
|
|
75776
75892
|
this.UpdateMainData(bindData,lastDataCount);
|
|
75777
|
-
if (option
|
|
75893
|
+
if (option) //缩放需要调整当前屏的位置
|
|
75778
75894
|
{
|
|
75779
|
-
|
|
75780
|
-
|
|
75781
|
-
|
|
75782
|
-
|
|
75895
|
+
if (option.ZoomData)
|
|
75896
|
+
{
|
|
75897
|
+
var zoomData=option.ZoomData;
|
|
75898
|
+
var showCount=zoomData.PageSize-zoomData.RightSpaceCount; //一屏显示的数据个数
|
|
75899
|
+
bindData.DataOffset= bindData.Data.length-showCount;
|
|
75900
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
75901
|
+
}
|
|
75902
|
+
else if (IFrameSplitOperator.IsNumber(option.DataOffset))
|
|
75903
|
+
{
|
|
75904
|
+
bindData.DataOffset+=option.DataOffset;
|
|
75905
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
75906
|
+
}
|
|
75783
75907
|
}
|
|
75784
75908
|
|
|
75785
75909
|
this.UpdateOverlayDragMinuteData(data);
|
|
@@ -75802,7 +75926,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75802
75926
|
this.BindAllOverlayIndexData(bindData);
|
|
75803
75927
|
}
|
|
75804
75928
|
|
|
75805
|
-
this.RequestZoomMinuteData=function()
|
|
75929
|
+
this.RequestZoomMinuteData=function(requestData)
|
|
75806
75930
|
{
|
|
75807
75931
|
var zoomData={ PageSize:requestData.PageSize, DataCount:requestData.DataCount, RightSpaceCount:requestData.RightSpaceCount };
|
|
75808
75932
|
|
|
@@ -75811,9 +75935,10 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75811
75935
|
FuncName:'KLineChartContainer::RequestZoomMinuteData',
|
|
75812
75936
|
FuncExplain:"缩放分钟|秒K线数据下载",
|
|
75813
75937
|
RecvFuncName:"RecvZoomMinuteData",
|
|
75814
|
-
Download:this.
|
|
75938
|
+
Download:this.ZoomDownload.Minute,
|
|
75815
75939
|
Url:this.ZoomMinuteKLineApiUrl,
|
|
75816
75940
|
Count:this.MaxRequestMinuteDayCount,
|
|
75941
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
75817
75942
|
ZoomData:zoomData
|
|
75818
75943
|
};
|
|
75819
75944
|
|
|
@@ -75829,7 +75954,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75829
75954
|
RecvFuncName:"RecvDragMinuteData",
|
|
75830
75955
|
Download:this.DragDownload.Minute,
|
|
75831
75956
|
Url:this.DragMinuteKLineApiUrl,
|
|
75832
|
-
Count:this.MaxRequestMinuteDayCount
|
|
75957
|
+
Count:this.MaxRequestMinuteDayCount,
|
|
75958
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
75833
75959
|
};
|
|
75834
75960
|
|
|
75835
75961
|
this.RequestPreviousMinuteData(option);
|
|
@@ -114776,7 +114902,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
114776
114902
|
//是否超出执行的最大次数
|
|
114777
114903
|
this.IsExcessRunCount=function()
|
|
114778
114904
|
{
|
|
114779
|
-
if (this.MaxRunCount
|
|
114905
|
+
if (this.MaxRunCount<0) return false; //没有限制
|
|
114780
114906
|
|
|
114781
114907
|
return this.RunCount>=this.MaxRunCount;
|
|
114782
114908
|
}
|
|
@@ -131543,7 +131669,7 @@ function ScrollBarBGChart()
|
|
|
131543
131669
|
|
|
131544
131670
|
|
|
131545
131671
|
|
|
131546
|
-
var HQCHART_VERSION="1.1.
|
|
131672
|
+
var HQCHART_VERSION="1.1.12803";
|
|
131547
131673
|
|
|
131548
131674
|
function PrintHQChartVersion()
|
|
131549
131675
|
{
|