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
|
@@ -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
|
|
|
@@ -6736,6 +6736,10 @@ var JSCHART_EVENT_ID=
|
|
|
6736
6736
|
ON_KEYDOWN:117,
|
|
6737
6737
|
|
|
6738
6738
|
ON_CREATE_OVERLAY_FRAME:118, //创建叠加框架回调
|
|
6739
|
+
|
|
6740
|
+
ON_CREATE_CUSTOM_Y_COORDINATE:119, //自定义Y轴刻度
|
|
6741
|
+
|
|
6742
|
+
ON_BEFORE_DRAW_SPLASH_SCREEN:120,
|
|
6739
6743
|
}
|
|
6740
6744
|
|
|
6741
6745
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7307,6 +7311,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7307
7311
|
|
|
7308
7312
|
this.UIOnDblClick=function(e)
|
|
7309
7313
|
{
|
|
7314
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash) return;
|
|
7315
|
+
|
|
7310
7316
|
var pixelTatio = GetDevicePixelRatio();
|
|
7311
7317
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
7312
7318
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
@@ -9182,7 +9188,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9182
9188
|
|
|
9183
9189
|
this.Draw=function()
|
|
9184
9190
|
{
|
|
9185
|
-
|
|
9186
9191
|
if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
|
|
9187
9192
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
9188
9193
|
|
|
@@ -9203,6 +9208,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9203
9208
|
|
|
9204
9209
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
9205
9210
|
{
|
|
9211
|
+
var data=this.InvokeBeforeDrawSplashScreenCallback();
|
|
9212
|
+
if (data && data.PreventDefault===true) return;
|
|
9213
|
+
|
|
9206
9214
|
this.Frame.ClearCoordinateText();
|
|
9207
9215
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
9208
9216
|
this.ChartSplashPaint.Draw();
|
|
@@ -9632,6 +9640,48 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9632
9640
|
|
|
9633
9641
|
return status;
|
|
9634
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
|
+
|
|
9635
9685
|
//画动态信息
|
|
9636
9686
|
this.DrawDynamicInfo=function(option)
|
|
9637
9687
|
{
|
|
@@ -10337,14 +10387,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10337
10387
|
var cursorIndex={ ZoomType:this.ZoomType ,IsLockRight:this.IsZoomLockRight };
|
|
10338
10388
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
10339
10389
|
if (!this.Frame.ZoomDown(cursorIndex, { ZoomDownloadDataCallback:(requestData)=>{ this.ZoomDownloadData(requestData) } })) break;
|
|
10390
|
+
|
|
10340
10391
|
this.CursorIndex=cursorIndex.Index;
|
|
10341
10392
|
this.UpdataDataoffset();
|
|
10342
10393
|
this.UpdatePointByCursorIndex();
|
|
10343
10394
|
this.UpdateFrameMaxMin();
|
|
10344
10395
|
this.ResetFrameXSplit();
|
|
10345
|
-
this.
|
|
10396
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
10397
|
+
{
|
|
10398
|
+
|
|
10399
|
+
}
|
|
10400
|
+
else
|
|
10401
|
+
{
|
|
10402
|
+
this.Draw();
|
|
10403
|
+
}
|
|
10346
10404
|
this.ShowTooltipByKeyDown();
|
|
10347
10405
|
this.OnKLinePageChange("keydown");
|
|
10406
|
+
|
|
10348
10407
|
break;
|
|
10349
10408
|
case 46: //del
|
|
10350
10409
|
if (this.SelectChartDrawPicture)
|
|
@@ -12169,16 +12228,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12169
12228
|
}
|
|
12170
12229
|
|
|
12171
12230
|
//全屏提示信息 { Title:提示信息, Draw:false/true 是否立即重绘, }
|
|
12172
|
-
this.EnableSplashScreen=function(option)
|
|
12231
|
+
this.EnableSplashScreen=function(enable, option)
|
|
12173
12232
|
{
|
|
12174
12233
|
if (!this.ChartSplashPaint) return;
|
|
12175
|
-
if (!option) return;
|
|
12176
12234
|
|
|
12177
|
-
|
|
12178
|
-
this.ChartSplashPaint.EnableSplash(true);
|
|
12235
|
+
this.ChartSplashPaint.EnableSplash(enable);
|
|
12179
12236
|
|
|
12180
|
-
if (option.Draw===false) return;
|
|
12181
|
-
|
|
12237
|
+
if (option && option.Draw===false) return;
|
|
12238
|
+
|
|
12239
|
+
if (enable) this.DrawSplashScreen(option);
|
|
12240
|
+
else this.Draw();
|
|
12182
12241
|
}
|
|
12183
12242
|
|
|
12184
12243
|
//设置指标窗口属性 windowItem=SetOption.Windows[i], frameItem=SetOption.Frames[i];
|
|
@@ -21927,6 +21986,18 @@ function HQTradeFrame()
|
|
|
21927
21986
|
return result;
|
|
21928
21987
|
}
|
|
21929
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
|
+
|
|
21930
22001
|
this.XCoordinateZoom=function(step, isMoveLeft)
|
|
21931
22002
|
{
|
|
21932
22003
|
var result=this.SubFrame[0].Frame.XCoordinateZoom(step, isMoveLeft);
|
|
@@ -47464,130 +47535,144 @@ function IFrameSplitOperator()
|
|
|
47464
47535
|
return result;
|
|
47465
47536
|
}
|
|
47466
47537
|
|
|
47467
|
-
|
|
47468
|
-
|
|
47469
|
-
|
|
47470
|
-
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
47471
|
-
if (!pageInfo) return;
|
|
47472
|
-
if (!this.HQChart) return;
|
|
47473
|
-
|
|
47474
|
-
var event=null;
|
|
47475
|
-
if (this.GetEventCallback)
|
|
47476
|
-
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_Y_LABEL);
|
|
47477
|
-
|
|
47478
|
-
var endIndex=pageInfo.End.Index;
|
|
47479
|
-
var floatPrecision=2;
|
|
47480
|
-
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
47481
|
-
for(var i=0, j=0;i<this.HQChart.ChartPaint.length;++i)
|
|
47482
|
-
{
|
|
47483
|
-
var chart=this.HQChart.ChartPaint[i];
|
|
47484
|
-
if (!chart.ChartFrame) continue;
|
|
47485
|
-
if (!chart.GetItemData) continue;
|
|
47486
|
-
if (chart.ChartFrame.Identify==this.Frame.Identify || chart.ChartFrame==this.Frame)
|
|
47487
|
-
{
|
|
47488
|
-
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
47489
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
47490
|
-
|
|
47491
|
-
for(j=0; j<aryItem.length; ++j)
|
|
47492
|
-
{
|
|
47493
|
-
var item=aryItem[j];
|
|
47494
|
-
|
|
47495
|
-
var info=new CoordinateInfo();
|
|
47496
|
-
info.Type=1;
|
|
47497
|
-
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
47498
|
-
info.LineColor=item.Color;
|
|
47499
|
-
info.LineType=-1; //默认不画线
|
|
47500
|
-
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
47501
|
-
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
47502
|
-
|
|
47503
|
-
info.Value=item.Value;
|
|
47504
|
-
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
47505
|
-
|
|
47506
|
-
if (option.Position=='left') info.Message[0]=text;
|
|
47507
|
-
else info.Message[1]=text;
|
|
47508
|
-
|
|
47509
|
-
if (!pageInfo.IsLast)
|
|
47510
|
-
{
|
|
47511
|
-
var config={};
|
|
47512
|
-
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
47513
|
-
|
|
47514
|
-
info.ExtendData={ Custom:config };
|
|
47515
|
-
}
|
|
47516
|
-
|
|
47517
|
-
if (event)
|
|
47518
|
-
{
|
|
47519
|
-
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, FrameID:this.Frame.Identify };
|
|
47520
|
-
event.Callback(event,sendData,this);
|
|
47521
|
-
|
|
47522
|
-
if (sendData.PreventDefault) continue;
|
|
47523
|
-
}
|
|
47524
|
-
|
|
47525
|
-
this.Frame.CustomHorizontalInfo.push(info);
|
|
47526
|
-
}
|
|
47527
|
-
}
|
|
47528
|
-
}
|
|
47529
|
-
}
|
|
47530
|
-
|
|
47531
|
-
this.CustomLatestOverlayIndexDataCoordinate=function(option)
|
|
47532
|
-
{
|
|
47538
|
+
//当前屏最新指标数据
|
|
47539
|
+
this.CustomLatestIndexDataCoordinate=function(option)
|
|
47540
|
+
{
|
|
47533
47541
|
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
47534
47542
|
if (!pageInfo) return;
|
|
47535
|
-
if (!this.
|
|
47536
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.OverlayIndex.ChartPaint)) return;
|
|
47543
|
+
if (!this.HQChart) return;
|
|
47537
47544
|
|
|
47538
47545
|
var event=null;
|
|
47539
47546
|
if (this.GetEventCallback)
|
|
47540
|
-
event=this.GetEventCallback(JSCHART_EVENT_ID.
|
|
47547
|
+
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_Y_LABEL);
|
|
47541
47548
|
|
|
47542
47549
|
var endIndex=pageInfo.End.Index;
|
|
47543
47550
|
var floatPrecision=2;
|
|
47544
47551
|
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
47545
|
-
|
|
47546
|
-
for(var i=0, j=0;i<this.OverlayIndex.ChartPaint.length;++i)
|
|
47552
|
+
for(var i=0, j=0;i<this.HQChart.ChartPaint.length;++i)
|
|
47547
47553
|
{
|
|
47548
|
-
var chart=this.
|
|
47554
|
+
var chart=this.HQChart.ChartPaint[i];
|
|
47549
47555
|
if (!chart.ChartFrame) continue;
|
|
47550
47556
|
if (!chart.GetItemData) continue;
|
|
47551
|
-
|
|
47552
|
-
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
47553
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
47554
|
-
for(j=0; j<aryItem.length; ++j)
|
|
47557
|
+
if (chart.ChartFrame.Identify==this.Frame.Identify || chart.ChartFrame==this.Frame)
|
|
47555
47558
|
{
|
|
47556
|
-
var
|
|
47557
|
-
|
|
47558
|
-
info.Type=1;
|
|
47559
|
-
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
47560
|
-
info.LineColor=item.Color;
|
|
47561
|
-
info.LineType=-1; //默认不画线
|
|
47562
|
-
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
47563
|
-
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
47559
|
+
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
47560
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
47564
47561
|
|
|
47565
|
-
|
|
47566
|
-
|
|
47562
|
+
for(j=0; j<aryItem.length; ++j)
|
|
47563
|
+
{
|
|
47564
|
+
var item=aryItem[j];
|
|
47567
47565
|
|
|
47568
|
-
|
|
47569
|
-
|
|
47566
|
+
var info=new CoordinateInfo();
|
|
47567
|
+
info.Type=1;
|
|
47568
|
+
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
47569
|
+
info.LineColor=item.Color;
|
|
47570
|
+
info.LineType=-1; //默认不画线
|
|
47571
|
+
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
47572
|
+
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
47573
|
+
|
|
47574
|
+
info.Value=item.Value;
|
|
47575
|
+
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
47570
47576
|
|
|
47571
|
-
|
|
47572
|
-
|
|
47573
|
-
var config={};
|
|
47574
|
-
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
47577
|
+
if (option.Position=='left') info.Message[0]=text;
|
|
47578
|
+
else info.Message[1]=text;
|
|
47575
47579
|
|
|
47576
|
-
|
|
47577
|
-
|
|
47580
|
+
if (!pageInfo.IsLast)
|
|
47581
|
+
{
|
|
47582
|
+
var config={};
|
|
47583
|
+
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
47578
47584
|
|
|
47579
|
-
|
|
47580
|
-
|
|
47581
|
-
|
|
47582
|
-
|
|
47585
|
+
info.ExtendData={ Custom:config };
|
|
47586
|
+
}
|
|
47587
|
+
|
|
47588
|
+
if (event)
|
|
47589
|
+
{
|
|
47590
|
+
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, FrameID:this.Frame.Identify };
|
|
47591
|
+
event.Callback(event,sendData,this);
|
|
47583
47592
|
|
|
47584
|
-
|
|
47593
|
+
if (sendData.PreventDefault) continue;
|
|
47594
|
+
}
|
|
47595
|
+
|
|
47596
|
+
this.Frame.CustomHorizontalInfo.push(info);
|
|
47585
47597
|
}
|
|
47586
|
-
|
|
47587
|
-
this.Frame.CustomHorizontalInfo.push(info);
|
|
47588
47598
|
}
|
|
47589
47599
|
}
|
|
47590
|
-
|
|
47600
|
+
}
|
|
47601
|
+
|
|
47602
|
+
this.CustomLatestOverlayIndexDataCoordinate=function(option)
|
|
47603
|
+
{
|
|
47604
|
+
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
47605
|
+
if (!pageInfo) return;
|
|
47606
|
+
if (!this.OverlayIndex) return;
|
|
47607
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.OverlayIndex.ChartPaint)) return;
|
|
47608
|
+
|
|
47609
|
+
var event=null;
|
|
47610
|
+
if (this.GetEventCallback)
|
|
47611
|
+
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_OVERLAY_INDEX_Y_LABEL);
|
|
47612
|
+
|
|
47613
|
+
var endIndex=pageInfo.End.Index;
|
|
47614
|
+
var floatPrecision=2;
|
|
47615
|
+
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
47616
|
+
|
|
47617
|
+
for(var i=0, j=0;i<this.OverlayIndex.ChartPaint.length;++i)
|
|
47618
|
+
{
|
|
47619
|
+
var chart=this.OverlayIndex.ChartPaint[i];
|
|
47620
|
+
if (!chart.ChartFrame) continue;
|
|
47621
|
+
if (!chart.GetItemData) continue;
|
|
47622
|
+
|
|
47623
|
+
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
47624
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
47625
|
+
for(j=0; j<aryItem.length; ++j)
|
|
47626
|
+
{
|
|
47627
|
+
var item=aryItem[j];
|
|
47628
|
+
var info=new CoordinateInfo();
|
|
47629
|
+
info.Type=1;
|
|
47630
|
+
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
47631
|
+
info.LineColor=item.Color;
|
|
47632
|
+
info.LineType=-1; //默认不画线
|
|
47633
|
+
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
47634
|
+
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
47635
|
+
|
|
47636
|
+
info.Value=item.Value;
|
|
47637
|
+
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
47638
|
+
|
|
47639
|
+
if (option.Position=='left') info.Message[0]=text;
|
|
47640
|
+
else info.Message[1]=text;
|
|
47641
|
+
|
|
47642
|
+
if (!pageInfo.IsLast)
|
|
47643
|
+
{
|
|
47644
|
+
var config={};
|
|
47645
|
+
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
47646
|
+
|
|
47647
|
+
info.ExtendData={ Custom:config };
|
|
47648
|
+
}
|
|
47649
|
+
|
|
47650
|
+
if (event)
|
|
47651
|
+
{
|
|
47652
|
+
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, OverlayIdentify:this.OverlayIndex.Identify };
|
|
47653
|
+
event.Callback(event,sendData,this);
|
|
47654
|
+
|
|
47655
|
+
if (sendData.PreventDefault) continue;
|
|
47656
|
+
}
|
|
47657
|
+
|
|
47658
|
+
this.Frame.CustomHorizontalInfo.push(info);
|
|
47659
|
+
}
|
|
47660
|
+
}
|
|
47661
|
+
},
|
|
47662
|
+
|
|
47663
|
+
//回调外部处理自定义Y轴刻度
|
|
47664
|
+
this.InvokeCustomYCoordinateCallback=function()
|
|
47665
|
+
{
|
|
47666
|
+
if (!this.GetEventCallback) return null;
|
|
47667
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_CUSTOM_Y_COORDINATE);
|
|
47668
|
+
if (!event || !event.Callback) return null;
|
|
47669
|
+
|
|
47670
|
+
var data={ ID:this.Frame.Identify, Frame:this.Frame, PreventDefault:false, Custom:this.Custom };
|
|
47671
|
+
if (this.OverlayIdentify) data.OverlayIdentify=this.OverlayIdentify;
|
|
47672
|
+
event.Callback(event,data,this);
|
|
47673
|
+
|
|
47674
|
+
return data;
|
|
47675
|
+
}
|
|
47591
47676
|
}
|
|
47592
47677
|
|
|
47593
47678
|
//字符串格式化 千分位分割
|
|
@@ -48588,6 +48673,10 @@ function FrameSplitKLinePriceY()
|
|
|
48588
48673
|
this.CustomCoordinate=function(floatPrecision)
|
|
48589
48674
|
{
|
|
48590
48675
|
this.Frame.CustomHorizontalInfo=[];
|
|
48676
|
+
|
|
48677
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
48678
|
+
if (data && data.PreventDefault==true) return;
|
|
48679
|
+
|
|
48591
48680
|
var lastCoordinate, pageLastCoordinate;
|
|
48592
48681
|
for(var i=0; i<this.Custom.length; ++i)
|
|
48593
48682
|
{
|
|
@@ -49235,6 +49324,9 @@ function FrameSplitY()
|
|
|
49235
49324
|
{
|
|
49236
49325
|
this.Frame.CustomHorizontalInfo=[];
|
|
49237
49326
|
|
|
49327
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
49328
|
+
if (data && data.PreventDefault==true) return;
|
|
49329
|
+
|
|
49238
49330
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.Custom)) return;
|
|
49239
49331
|
|
|
49240
49332
|
for(var i=0; i<this.Custom.length; ++i)
|
|
@@ -49616,6 +49708,9 @@ function FrameSplitMinutePriceY()
|
|
|
49616
49708
|
|
|
49617
49709
|
this.CustomCoordinate=function() //自定义刻度
|
|
49618
49710
|
{
|
|
49711
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
49712
|
+
if (data && data.PreventDefault==true) return;
|
|
49713
|
+
|
|
49619
49714
|
if (!this.Custom) return;
|
|
49620
49715
|
|
|
49621
49716
|
var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
|
|
@@ -66154,6 +66249,12 @@ function JSChartResource()
|
|
|
66154
66249
|
this.EmptyBarBGColor="rgb(255,255,255)"; //空心柱子背景色
|
|
66155
66250
|
this.HighLowBarColor='rgb(41,98,255)'; //high low bar 颜色
|
|
66156
66251
|
|
|
66252
|
+
this.SplashScreen=
|
|
66253
|
+
{
|
|
66254
|
+
BGColor:"rgba(112,128,144,0.5)",
|
|
66255
|
+
Title:"下载数据中......"
|
|
66256
|
+
}
|
|
66257
|
+
|
|
66157
66258
|
this.HLCArea=
|
|
66158
66259
|
{
|
|
66159
66260
|
HighLineColor:'rgb(242,54,69)',
|
|
@@ -67227,6 +67328,13 @@ function JSChartResource()
|
|
|
67227
67328
|
if (style.EmptyBarBGColor) this.EmptyBarBGColor=style.EmptyBarBGColor;
|
|
67228
67329
|
if (style.HighLowBarColor) this.HighLowBarColor=style.HighLowBarColor;
|
|
67229
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
|
+
|
|
67230
67338
|
if (style.HLCArea)
|
|
67231
67339
|
{
|
|
67232
67340
|
var item=style.HLCArea;
|
|
@@ -70406,7 +70514,14 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
70406
70514
|
this.UpdatePointByCursorIndex();
|
|
70407
70515
|
this.UpdateFrameMaxMin();
|
|
70408
70516
|
this.ResetFrameXSplit();
|
|
70409
|
-
this.
|
|
70517
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
70518
|
+
{
|
|
70519
|
+
|
|
70520
|
+
}
|
|
70521
|
+
else
|
|
70522
|
+
{
|
|
70523
|
+
this.Draw();
|
|
70524
|
+
}
|
|
70410
70525
|
this.OnKLinePageChange("wheel");
|
|
70411
70526
|
}
|
|
70412
70527
|
}
|
|
@@ -75761,6 +75876,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75761
75876
|
{
|
|
75762
75877
|
download.IsEnd=true;
|
|
75763
75878
|
JSConsole.Chart.Log(`[KLineChartContainer.RecvPreviousMinuteData] ${this.Symbol} data end. FuncName=${option.FuncName}`);
|
|
75879
|
+
this.Draw();
|
|
75764
75880
|
return;
|
|
75765
75881
|
}
|
|
75766
75882
|
|
|
@@ -75818,12 +75934,20 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75818
75934
|
|
|
75819
75935
|
//绑定数据
|
|
75820
75936
|
this.UpdateMainData(bindData,lastDataCount);
|
|
75821
|
-
if (option
|
|
75937
|
+
if (option) //缩放需要调整当前屏的位置
|
|
75822
75938
|
{
|
|
75823
|
-
|
|
75824
|
-
|
|
75825
|
-
|
|
75826
|
-
|
|
75939
|
+
if (option.ZoomData)
|
|
75940
|
+
{
|
|
75941
|
+
var zoomData=option.ZoomData;
|
|
75942
|
+
var showCount=zoomData.PageSize-zoomData.RightSpaceCount; //一屏显示的数据个数
|
|
75943
|
+
bindData.DataOffset= bindData.Data.length-showCount;
|
|
75944
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
75945
|
+
}
|
|
75946
|
+
else if (IFrameSplitOperator.IsNumber(option.DataOffset))
|
|
75947
|
+
{
|
|
75948
|
+
bindData.DataOffset+=option.DataOffset;
|
|
75949
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
75950
|
+
}
|
|
75827
75951
|
}
|
|
75828
75952
|
|
|
75829
75953
|
this.UpdateOverlayDragMinuteData(data);
|
|
@@ -75846,7 +75970,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75846
75970
|
this.BindAllOverlayIndexData(bindData);
|
|
75847
75971
|
}
|
|
75848
75972
|
|
|
75849
|
-
this.RequestZoomMinuteData=function()
|
|
75973
|
+
this.RequestZoomMinuteData=function(requestData)
|
|
75850
75974
|
{
|
|
75851
75975
|
var zoomData={ PageSize:requestData.PageSize, DataCount:requestData.DataCount, RightSpaceCount:requestData.RightSpaceCount };
|
|
75852
75976
|
|
|
@@ -75855,9 +75979,10 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75855
75979
|
FuncName:'KLineChartContainer::RequestZoomMinuteData',
|
|
75856
75980
|
FuncExplain:"缩放分钟|秒K线数据下载",
|
|
75857
75981
|
RecvFuncName:"RecvZoomMinuteData",
|
|
75858
|
-
Download:this.
|
|
75982
|
+
Download:this.ZoomDownload.Minute,
|
|
75859
75983
|
Url:this.ZoomMinuteKLineApiUrl,
|
|
75860
75984
|
Count:this.MaxRequestMinuteDayCount,
|
|
75985
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
75861
75986
|
ZoomData:zoomData
|
|
75862
75987
|
};
|
|
75863
75988
|
|
|
@@ -75873,7 +75998,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
75873
75998
|
RecvFuncName:"RecvDragMinuteData",
|
|
75874
75999
|
Download:this.DragDownload.Minute,
|
|
75875
76000
|
Url:this.DragMinuteKLineApiUrl,
|
|
75876
|
-
Count:this.MaxRequestMinuteDayCount
|
|
76001
|
+
Count:this.MaxRequestMinuteDayCount,
|
|
76002
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
75877
76003
|
};
|
|
75878
76004
|
|
|
75879
76005
|
this.RequestPreviousMinuteData(option);
|
|
@@ -114820,7 +114946,7 @@ function ScriptIndex(name,script,args,option)
|
|
|
114820
114946
|
//是否超出执行的最大次数
|
|
114821
114947
|
this.IsExcessRunCount=function()
|
|
114822
114948
|
{
|
|
114823
|
-
if (this.MaxRunCount
|
|
114949
|
+
if (this.MaxRunCount<0) return false; //没有限制
|
|
114824
114950
|
|
|
114825
114951
|
return this.RunCount>=this.MaxRunCount;
|
|
114826
114952
|
}
|
|
@@ -131701,7 +131827,7 @@ function HQChartScriptWorker()
|
|
|
131701
131827
|
|
|
131702
131828
|
|
|
131703
131829
|
|
|
131704
|
-
var HQCHART_VERSION="1.1.
|
|
131830
|
+
var HQCHART_VERSION="1.1.12803";
|
|
131705
131831
|
|
|
131706
131832
|
function PrintHQChartVersion()
|
|
131707
131833
|
{
|