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
package/src/jscommon/umychart.js
CHANGED
|
@@ -2151,12 +2151,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
2153
|
|
|
2154
|
-
this.EnableSplashScreen=function(option)
|
|
2154
|
+
this.EnableSplashScreen=function(enable, option)
|
|
2155
2155
|
{
|
|
2156
2156
|
if(this.JSChartContainer && typeof(this.JSChartContainer.EnableSplashScreen)=='function')
|
|
2157
2157
|
{
|
|
2158
2158
|
JSConsole.Chart.Log('[JSChart:EnableSplashScreen] ');
|
|
2159
|
-
this.JSChartContainer.EnableSplashScreen(option);
|
|
2159
|
+
this.JSChartContainer.EnableSplashScreen(enable, option);
|
|
2160
2160
|
}
|
|
2161
2161
|
}
|
|
2162
2162
|
|
|
@@ -2548,6 +2548,10 @@ var JSCHART_EVENT_ID=
|
|
|
2548
2548
|
ON_KEYDOWN:117,
|
|
2549
2549
|
|
|
2550
2550
|
ON_CREATE_OVERLAY_FRAME:118, //创建叠加框架回调
|
|
2551
|
+
|
|
2552
|
+
ON_CREATE_CUSTOM_Y_COORDINATE:119, //自定义Y轴刻度
|
|
2553
|
+
|
|
2554
|
+
ON_BEFORE_DRAW_SPLASH_SCREEN:120,
|
|
2551
2555
|
}
|
|
2552
2556
|
|
|
2553
2557
|
var JSCHART_OPERATOR_ID=
|
|
@@ -3119,6 +3123,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3119
3123
|
|
|
3120
3124
|
this.UIOnDblClick=function(e)
|
|
3121
3125
|
{
|
|
3126
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash) return;
|
|
3127
|
+
|
|
3122
3128
|
var pixelTatio = GetDevicePixelRatio();
|
|
3123
3129
|
var x = (e.clientX-this.UIElement.getBoundingClientRect().left)*pixelTatio;
|
|
3124
3130
|
var y = (e.clientY-this.UIElement.getBoundingClientRect().top)*pixelTatio;
|
|
@@ -4994,7 +5000,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4994
5000
|
|
|
4995
5001
|
this.Draw=function()
|
|
4996
5002
|
{
|
|
4997
|
-
|
|
4998
5003
|
if (this.ChartCorssCursor) this.ChartCorssCursor.Status=0;
|
|
4999
5004
|
if (this.UIElement.width<=0 || this.UIElement.height<=0) return;
|
|
5000
5005
|
|
|
@@ -5015,6 +5020,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5015
5020
|
|
|
5016
5021
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
5017
5022
|
{
|
|
5023
|
+
var data=this.InvokeBeforeDrawSplashScreenCallback();
|
|
5024
|
+
if (data && data.PreventDefault===true) return;
|
|
5025
|
+
|
|
5018
5026
|
this.Frame.ClearCoordinateText();
|
|
5019
5027
|
this.Frame.Draw( { IsEnableSplash:this.ChartSplashPaint.IsEnableSplash} );
|
|
5020
5028
|
this.ChartSplashPaint.Draw();
|
|
@@ -5444,6 +5452,48 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5444
5452
|
|
|
5445
5453
|
return status;
|
|
5446
5454
|
}
|
|
5455
|
+
|
|
5456
|
+
this.InvokeBeforeDrawSplashScreenCallback=function()
|
|
5457
|
+
{
|
|
5458
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_BEFORE_DRAW_SPLASH_SCREEN);
|
|
5459
|
+
if (!event || !event.Callback) return null;
|
|
5460
|
+
|
|
5461
|
+
var data={ PreventDefault:false };
|
|
5462
|
+
event.Callback(event,data,this);
|
|
5463
|
+
|
|
5464
|
+
return data;
|
|
5465
|
+
}
|
|
5466
|
+
|
|
5467
|
+
this.DrawSplashScreen=function(option)
|
|
5468
|
+
{
|
|
5469
|
+
var data=this.InvokeBeforeDrawSplashScreenCallback();
|
|
5470
|
+
if (data && data.PreventDefault===true) return;
|
|
5471
|
+
|
|
5472
|
+
if (this.Frame.ScreenImageData==null && !this.CacheCanvas) return;
|
|
5473
|
+
|
|
5474
|
+
if (this.Frame.ScreenImageData)
|
|
5475
|
+
{
|
|
5476
|
+
this.Canvas.putImageData(this.Frame.ScreenImageData,0,0);
|
|
5477
|
+
}
|
|
5478
|
+
else if (this.CacheCanvas)
|
|
5479
|
+
{
|
|
5480
|
+
this.Canvas.clearRect(0,0,this.UIElement.width,this.UIElement.height)
|
|
5481
|
+
this.Canvas.drawImage(this.CacheElement,0,0);
|
|
5482
|
+
}
|
|
5483
|
+
|
|
5484
|
+
var bgColor=g_JSChartResource.SplashScreen.BGColor;
|
|
5485
|
+
this.Canvas.fillStyle=bgColor;
|
|
5486
|
+
this.Canvas.fillRect(0,0,this.UIElement.width,this.UIElement.height)
|
|
5487
|
+
|
|
5488
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash)
|
|
5489
|
+
{
|
|
5490
|
+
var title=g_JSChartResource.SplashScreen.Title;
|
|
5491
|
+
if (option && option.Title) title=option.Title;
|
|
5492
|
+
this.ChartSplashPaint.SetTitle(title);
|
|
5493
|
+
this.ChartSplashPaint.Draw();
|
|
5494
|
+
}
|
|
5495
|
+
}
|
|
5496
|
+
|
|
5447
5497
|
//画动态信息
|
|
5448
5498
|
this.DrawDynamicInfo=function(option)
|
|
5449
5499
|
{
|
|
@@ -6149,14 +6199,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6149
6199
|
var cursorIndex={ ZoomType:this.ZoomType ,IsLockRight:this.IsZoomLockRight };
|
|
6150
6200
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
6151
6201
|
if (!this.Frame.ZoomDown(cursorIndex, { ZoomDownloadDataCallback:(requestData)=>{ this.ZoomDownloadData(requestData) } })) break;
|
|
6202
|
+
|
|
6152
6203
|
this.CursorIndex=cursorIndex.Index;
|
|
6153
6204
|
this.UpdataDataoffset();
|
|
6154
6205
|
this.UpdatePointByCursorIndex();
|
|
6155
6206
|
this.UpdateFrameMaxMin();
|
|
6156
6207
|
this.ResetFrameXSplit();
|
|
6157
|
-
this.
|
|
6208
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
6209
|
+
{
|
|
6210
|
+
|
|
6211
|
+
}
|
|
6212
|
+
else
|
|
6213
|
+
{
|
|
6214
|
+
this.Draw();
|
|
6215
|
+
}
|
|
6158
6216
|
this.ShowTooltipByKeyDown();
|
|
6159
6217
|
this.OnKLinePageChange("keydown");
|
|
6218
|
+
|
|
6160
6219
|
break;
|
|
6161
6220
|
case 46: //del
|
|
6162
6221
|
if (this.SelectChartDrawPicture)
|
|
@@ -7981,16 +8040,16 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7981
8040
|
}
|
|
7982
8041
|
|
|
7983
8042
|
//全屏提示信息 { Title:提示信息, Draw:false/true 是否立即重绘, }
|
|
7984
|
-
this.EnableSplashScreen=function(option)
|
|
8043
|
+
this.EnableSplashScreen=function(enable, option)
|
|
7985
8044
|
{
|
|
7986
8045
|
if (!this.ChartSplashPaint) return;
|
|
7987
|
-
if (!option) return;
|
|
7988
8046
|
|
|
7989
|
-
|
|
7990
|
-
this.ChartSplashPaint.EnableSplash(true);
|
|
8047
|
+
this.ChartSplashPaint.EnableSplash(enable);
|
|
7991
8048
|
|
|
7992
|
-
if (option.Draw===false) return;
|
|
7993
|
-
|
|
8049
|
+
if (option && option.Draw===false) return;
|
|
8050
|
+
|
|
8051
|
+
if (enable) this.DrawSplashScreen(option);
|
|
8052
|
+
else this.Draw();
|
|
7994
8053
|
}
|
|
7995
8054
|
|
|
7996
8055
|
//设置指标窗口属性 windowItem=SetOption.Windows[i], frameItem=SetOption.Frames[i];
|
|
@@ -17739,6 +17798,18 @@ function HQTradeFrame()
|
|
|
17739
17798
|
return result;
|
|
17740
17799
|
}
|
|
17741
17800
|
|
|
17801
|
+
this.GetXShowCount=function()
|
|
17802
|
+
{
|
|
17803
|
+
var xPointcount=-1;
|
|
17804
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.SubFrame)) return xPointcount;
|
|
17805
|
+
|
|
17806
|
+
var subFrame=this.SubFrame[0];
|
|
17807
|
+
if (!subFrame.Frame) return xPointcount;
|
|
17808
|
+
|
|
17809
|
+
xPointcount=subFrame.Frame.XPointCount;
|
|
17810
|
+
return xPointcount;
|
|
17811
|
+
}
|
|
17812
|
+
|
|
17742
17813
|
this.XCoordinateZoom=function(step, isMoveLeft)
|
|
17743
17814
|
{
|
|
17744
17815
|
var result=this.SubFrame[0].Frame.XCoordinateZoom(step, isMoveLeft);
|
|
@@ -43276,130 +43347,144 @@ function IFrameSplitOperator()
|
|
|
43276
43347
|
return result;
|
|
43277
43348
|
}
|
|
43278
43349
|
|
|
43279
|
-
|
|
43280
|
-
|
|
43281
|
-
|
|
43282
|
-
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
43283
|
-
if (!pageInfo) return;
|
|
43284
|
-
if (!this.HQChart) return;
|
|
43285
|
-
|
|
43286
|
-
var event=null;
|
|
43287
|
-
if (this.GetEventCallback)
|
|
43288
|
-
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_Y_LABEL);
|
|
43289
|
-
|
|
43290
|
-
var endIndex=pageInfo.End.Index;
|
|
43291
|
-
var floatPrecision=2;
|
|
43292
|
-
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
43293
|
-
for(var i=0, j=0;i<this.HQChart.ChartPaint.length;++i)
|
|
43294
|
-
{
|
|
43295
|
-
var chart=this.HQChart.ChartPaint[i];
|
|
43296
|
-
if (!chart.ChartFrame) continue;
|
|
43297
|
-
if (!chart.GetItemData) continue;
|
|
43298
|
-
if (chart.ChartFrame.Identify==this.Frame.Identify || chart.ChartFrame==this.Frame)
|
|
43299
|
-
{
|
|
43300
|
-
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
43301
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
43302
|
-
|
|
43303
|
-
for(j=0; j<aryItem.length; ++j)
|
|
43304
|
-
{
|
|
43305
|
-
var item=aryItem[j];
|
|
43306
|
-
|
|
43307
|
-
var info=new CoordinateInfo();
|
|
43308
|
-
info.Type=1;
|
|
43309
|
-
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
43310
|
-
info.LineColor=item.Color;
|
|
43311
|
-
info.LineType=-1; //默认不画线
|
|
43312
|
-
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
43313
|
-
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
43314
|
-
|
|
43315
|
-
info.Value=item.Value;
|
|
43316
|
-
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
43317
|
-
|
|
43318
|
-
if (option.Position=='left') info.Message[0]=text;
|
|
43319
|
-
else info.Message[1]=text;
|
|
43320
|
-
|
|
43321
|
-
if (!pageInfo.IsLast)
|
|
43322
|
-
{
|
|
43323
|
-
var config={};
|
|
43324
|
-
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
43325
|
-
|
|
43326
|
-
info.ExtendData={ Custom:config };
|
|
43327
|
-
}
|
|
43328
|
-
|
|
43329
|
-
if (event)
|
|
43330
|
-
{
|
|
43331
|
-
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, FrameID:this.Frame.Identify };
|
|
43332
|
-
event.Callback(event,sendData,this);
|
|
43333
|
-
|
|
43334
|
-
if (sendData.PreventDefault) continue;
|
|
43335
|
-
}
|
|
43336
|
-
|
|
43337
|
-
this.Frame.CustomHorizontalInfo.push(info);
|
|
43338
|
-
}
|
|
43339
|
-
}
|
|
43340
|
-
}
|
|
43341
|
-
}
|
|
43342
|
-
|
|
43343
|
-
this.CustomLatestOverlayIndexDataCoordinate=function(option)
|
|
43344
|
-
{
|
|
43350
|
+
//当前屏最新指标数据
|
|
43351
|
+
this.CustomLatestIndexDataCoordinate=function(option)
|
|
43352
|
+
{
|
|
43345
43353
|
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
43346
43354
|
if (!pageInfo) return;
|
|
43347
|
-
if (!this.
|
|
43348
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.OverlayIndex.ChartPaint)) return;
|
|
43355
|
+
if (!this.HQChart) return;
|
|
43349
43356
|
|
|
43350
43357
|
var event=null;
|
|
43351
43358
|
if (this.GetEventCallback)
|
|
43352
|
-
event=this.GetEventCallback(JSCHART_EVENT_ID.
|
|
43359
|
+
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_INDEX_Y_LABEL);
|
|
43353
43360
|
|
|
43354
43361
|
var endIndex=pageInfo.End.Index;
|
|
43355
43362
|
var floatPrecision=2;
|
|
43356
43363
|
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
43357
|
-
|
|
43358
|
-
for(var i=0, j=0;i<this.OverlayIndex.ChartPaint.length;++i)
|
|
43364
|
+
for(var i=0, j=0;i<this.HQChart.ChartPaint.length;++i)
|
|
43359
43365
|
{
|
|
43360
|
-
var chart=this.
|
|
43366
|
+
var chart=this.HQChart.ChartPaint[i];
|
|
43361
43367
|
if (!chart.ChartFrame) continue;
|
|
43362
43368
|
if (!chart.GetItemData) continue;
|
|
43363
|
-
|
|
43364
|
-
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
43365
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
43366
|
-
for(j=0; j<aryItem.length; ++j)
|
|
43369
|
+
if (chart.ChartFrame.Identify==this.Frame.Identify || chart.ChartFrame==this.Frame)
|
|
43367
43370
|
{
|
|
43368
|
-
var
|
|
43369
|
-
|
|
43370
|
-
info.Type=1;
|
|
43371
|
-
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
43372
|
-
info.LineColor=item.Color;
|
|
43373
|
-
info.LineType=-1; //默认不画线
|
|
43374
|
-
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
43375
|
-
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
43371
|
+
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
43372
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
43376
43373
|
|
|
43377
|
-
|
|
43378
|
-
|
|
43374
|
+
for(j=0; j<aryItem.length; ++j)
|
|
43375
|
+
{
|
|
43376
|
+
var item=aryItem[j];
|
|
43379
43377
|
|
|
43380
|
-
|
|
43381
|
-
|
|
43378
|
+
var info=new CoordinateInfo();
|
|
43379
|
+
info.Type=1;
|
|
43380
|
+
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
43381
|
+
info.LineColor=item.Color;
|
|
43382
|
+
info.LineType=-1; //默认不画线
|
|
43383
|
+
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
43384
|
+
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
43385
|
+
|
|
43386
|
+
info.Value=item.Value;
|
|
43387
|
+
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
43382
43388
|
|
|
43383
|
-
|
|
43384
|
-
|
|
43385
|
-
var config={};
|
|
43386
|
-
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
43389
|
+
if (option.Position=='left') info.Message[0]=text;
|
|
43390
|
+
else info.Message[1]=text;
|
|
43387
43391
|
|
|
43388
|
-
|
|
43389
|
-
|
|
43392
|
+
if (!pageInfo.IsLast)
|
|
43393
|
+
{
|
|
43394
|
+
var config={};
|
|
43395
|
+
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
43390
43396
|
|
|
43391
|
-
|
|
43392
|
-
|
|
43393
|
-
|
|
43394
|
-
|
|
43397
|
+
info.ExtendData={ Custom:config };
|
|
43398
|
+
}
|
|
43399
|
+
|
|
43400
|
+
if (event)
|
|
43401
|
+
{
|
|
43402
|
+
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, FrameID:this.Frame.Identify };
|
|
43403
|
+
event.Callback(event,sendData,this);
|
|
43395
43404
|
|
|
43396
|
-
|
|
43405
|
+
if (sendData.PreventDefault) continue;
|
|
43406
|
+
}
|
|
43407
|
+
|
|
43408
|
+
this.Frame.CustomHorizontalInfo.push(info);
|
|
43397
43409
|
}
|
|
43398
|
-
|
|
43399
|
-
this.Frame.CustomHorizontalInfo.push(info);
|
|
43400
43410
|
}
|
|
43401
43411
|
}
|
|
43402
|
-
|
|
43412
|
+
}
|
|
43413
|
+
|
|
43414
|
+
this.CustomLatestOverlayIndexDataCoordinate=function(option)
|
|
43415
|
+
{
|
|
43416
|
+
var pageInfo=this.GetKLinePageInfo(); //获取当前屏信息
|
|
43417
|
+
if (!pageInfo) return;
|
|
43418
|
+
if (!this.OverlayIndex) return;
|
|
43419
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.OverlayIndex.ChartPaint)) return;
|
|
43420
|
+
|
|
43421
|
+
var event=null;
|
|
43422
|
+
if (this.GetEventCallback)
|
|
43423
|
+
event=this.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_OVERLAY_INDEX_Y_LABEL);
|
|
43424
|
+
|
|
43425
|
+
var endIndex=pageInfo.End.Index;
|
|
43426
|
+
var floatPrecision=2;
|
|
43427
|
+
if (IFrameSplitOperator.IsNumber(this.FloatPrecision)) floatPrecision=this.FloatPrecision;
|
|
43428
|
+
|
|
43429
|
+
for(var i=0, j=0;i<this.OverlayIndex.ChartPaint.length;++i)
|
|
43430
|
+
{
|
|
43431
|
+
var chart=this.OverlayIndex.ChartPaint[i];
|
|
43432
|
+
if (!chart.ChartFrame) continue;
|
|
43433
|
+
if (!chart.GetItemData) continue;
|
|
43434
|
+
|
|
43435
|
+
var aryItem=chart.GetItemData( {Index:endIndex} );
|
|
43436
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryItem)) continue;
|
|
43437
|
+
for(j=0; j<aryItem.length; ++j)
|
|
43438
|
+
{
|
|
43439
|
+
var item=aryItem[j];
|
|
43440
|
+
var info=new CoordinateInfo();
|
|
43441
|
+
info.Type=1;
|
|
43442
|
+
info.TextColor=g_JSChartResource.FrameLatestPrice.TextColor;
|
|
43443
|
+
info.LineColor=item.Color;
|
|
43444
|
+
info.LineType=-1; //默认不画线
|
|
43445
|
+
info.IsLast=pageInfo.IsLast;//是否是最后一个数据
|
|
43446
|
+
if (IFrameSplitOperator.IsNumber(option.LineType)) info.LineType=option.LineType;
|
|
43447
|
+
|
|
43448
|
+
info.Value=item.Value;
|
|
43449
|
+
var text=IFrameSplitOperator.FormatValueString(item.Value, floatPrecision,this.LanguageID);
|
|
43450
|
+
|
|
43451
|
+
if (option.Position=='left') info.Message[0]=text;
|
|
43452
|
+
else info.Message[1]=text;
|
|
43453
|
+
|
|
43454
|
+
if (!pageInfo.IsLast)
|
|
43455
|
+
{
|
|
43456
|
+
var config={};
|
|
43457
|
+
if (!pageInfo.IsLast) config.EmptyBGColor=g_JSChartResource.FrameLatestPrice.EmptyBGColor;
|
|
43458
|
+
|
|
43459
|
+
info.ExtendData={ Custom:config };
|
|
43460
|
+
}
|
|
43461
|
+
|
|
43462
|
+
if (event)
|
|
43463
|
+
{
|
|
43464
|
+
var sendData={ PreventDefault:false, Label:info, Data:item, IndexName:chart.IndexName, OverlayIdentify:this.OverlayIndex.Identify };
|
|
43465
|
+
event.Callback(event,sendData,this);
|
|
43466
|
+
|
|
43467
|
+
if (sendData.PreventDefault) continue;
|
|
43468
|
+
}
|
|
43469
|
+
|
|
43470
|
+
this.Frame.CustomHorizontalInfo.push(info);
|
|
43471
|
+
}
|
|
43472
|
+
}
|
|
43473
|
+
},
|
|
43474
|
+
|
|
43475
|
+
//回调外部处理自定义Y轴刻度
|
|
43476
|
+
this.InvokeCustomYCoordinateCallback=function()
|
|
43477
|
+
{
|
|
43478
|
+
if (!this.GetEventCallback) return null;
|
|
43479
|
+
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CREATE_CUSTOM_Y_COORDINATE);
|
|
43480
|
+
if (!event || !event.Callback) return null;
|
|
43481
|
+
|
|
43482
|
+
var data={ ID:this.Frame.Identify, Frame:this.Frame, PreventDefault:false, Custom:this.Custom };
|
|
43483
|
+
if (this.OverlayIdentify) data.OverlayIdentify=this.OverlayIdentify;
|
|
43484
|
+
event.Callback(event,data,this);
|
|
43485
|
+
|
|
43486
|
+
return data;
|
|
43487
|
+
}
|
|
43403
43488
|
}
|
|
43404
43489
|
|
|
43405
43490
|
//字符串格式化 千分位分割
|
|
@@ -44400,6 +44485,10 @@ function FrameSplitKLinePriceY()
|
|
|
44400
44485
|
this.CustomCoordinate=function(floatPrecision)
|
|
44401
44486
|
{
|
|
44402
44487
|
this.Frame.CustomHorizontalInfo=[];
|
|
44488
|
+
|
|
44489
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
44490
|
+
if (data && data.PreventDefault==true) return;
|
|
44491
|
+
|
|
44403
44492
|
var lastCoordinate, pageLastCoordinate;
|
|
44404
44493
|
for(var i=0; i<this.Custom.length; ++i)
|
|
44405
44494
|
{
|
|
@@ -45047,6 +45136,9 @@ function FrameSplitY()
|
|
|
45047
45136
|
{
|
|
45048
45137
|
this.Frame.CustomHorizontalInfo=[];
|
|
45049
45138
|
|
|
45139
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
45140
|
+
if (data && data.PreventDefault==true) return;
|
|
45141
|
+
|
|
45050
45142
|
if (!IFrameSplitOperator.IsNonEmptyArray(this.Custom)) return;
|
|
45051
45143
|
|
|
45052
45144
|
for(var i=0; i<this.Custom.length; ++i)
|
|
@@ -45428,6 +45520,9 @@ function FrameSplitMinutePriceY()
|
|
|
45428
45520
|
|
|
45429
45521
|
this.CustomCoordinate=function() //自定义刻度
|
|
45430
45522
|
{
|
|
45523
|
+
var data=this.InvokeCustomYCoordinateCallback();
|
|
45524
|
+
if (data && data.PreventDefault==true) return;
|
|
45525
|
+
|
|
45431
45526
|
if (!this.Custom) return;
|
|
45432
45527
|
|
|
45433
45528
|
var defaultfloatPrecision=GetfloatPrecision(this.Symbol);
|
|
@@ -61966,6 +62061,12 @@ function JSChartResource()
|
|
|
61966
62061
|
this.EmptyBarBGColor="rgb(255,255,255)"; //空心柱子背景色
|
|
61967
62062
|
this.HighLowBarColor='rgb(41,98,255)'; //high low bar 颜色
|
|
61968
62063
|
|
|
62064
|
+
this.SplashScreen=
|
|
62065
|
+
{
|
|
62066
|
+
BGColor:"rgba(112,128,144,0.5)",
|
|
62067
|
+
Title:"下载数据中......"
|
|
62068
|
+
}
|
|
62069
|
+
|
|
61969
62070
|
this.HLCArea=
|
|
61970
62071
|
{
|
|
61971
62072
|
HighLineColor:'rgb(242,54,69)',
|
|
@@ -63039,6 +63140,13 @@ function JSChartResource()
|
|
|
63039
63140
|
if (style.EmptyBarBGColor) this.EmptyBarBGColor=style.EmptyBarBGColor;
|
|
63040
63141
|
if (style.HighLowBarColor) this.HighLowBarColor=style.HighLowBarColor;
|
|
63041
63142
|
|
|
63143
|
+
if (style.SplashScreen)
|
|
63144
|
+
{
|
|
63145
|
+
var item=style.SplashScreen;
|
|
63146
|
+
if (item.BGColor) this.SplashScreen.BGColor=item.BGColor;
|
|
63147
|
+
if (item.Title) this.SplashScreen.Title=item.Title;
|
|
63148
|
+
}
|
|
63149
|
+
|
|
63042
63150
|
if (style.HLCArea)
|
|
63043
63151
|
{
|
|
63044
63152
|
var item=style.HLCArea;
|
|
@@ -66218,7 +66326,14 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
66218
66326
|
this.UpdatePointByCursorIndex();
|
|
66219
66327
|
this.UpdateFrameMaxMin();
|
|
66220
66328
|
this.ResetFrameXSplit();
|
|
66221
|
-
this.
|
|
66329
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true)
|
|
66330
|
+
{
|
|
66331
|
+
|
|
66332
|
+
}
|
|
66333
|
+
else
|
|
66334
|
+
{
|
|
66335
|
+
this.Draw();
|
|
66336
|
+
}
|
|
66222
66337
|
this.OnKLinePageChange("wheel");
|
|
66223
66338
|
}
|
|
66224
66339
|
}
|
|
@@ -71573,6 +71688,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71573
71688
|
{
|
|
71574
71689
|
download.IsEnd=true;
|
|
71575
71690
|
JSConsole.Chart.Log(`[KLineChartContainer.RecvPreviousMinuteData] ${this.Symbol} data end. FuncName=${option.FuncName}`);
|
|
71691
|
+
this.Draw();
|
|
71576
71692
|
return;
|
|
71577
71693
|
}
|
|
71578
71694
|
|
|
@@ -71630,12 +71746,20 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71630
71746
|
|
|
71631
71747
|
//绑定数据
|
|
71632
71748
|
this.UpdateMainData(bindData,lastDataCount);
|
|
71633
|
-
if (option
|
|
71749
|
+
if (option) //缩放需要调整当前屏的位置
|
|
71634
71750
|
{
|
|
71635
|
-
|
|
71636
|
-
|
|
71637
|
-
|
|
71638
|
-
|
|
71751
|
+
if (option.ZoomData)
|
|
71752
|
+
{
|
|
71753
|
+
var zoomData=option.ZoomData;
|
|
71754
|
+
var showCount=zoomData.PageSize-zoomData.RightSpaceCount; //一屏显示的数据个数
|
|
71755
|
+
bindData.DataOffset= bindData.Data.length-showCount;
|
|
71756
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
71757
|
+
}
|
|
71758
|
+
else if (IFrameSplitOperator.IsNumber(option.DataOffset))
|
|
71759
|
+
{
|
|
71760
|
+
bindData.DataOffset+=option.DataOffset;
|
|
71761
|
+
if (bindData.DataOffset<0) bindData.DataOffset=0;
|
|
71762
|
+
}
|
|
71639
71763
|
}
|
|
71640
71764
|
|
|
71641
71765
|
this.UpdateOverlayDragMinuteData(data);
|
|
@@ -71658,7 +71782,7 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71658
71782
|
this.BindAllOverlayIndexData(bindData);
|
|
71659
71783
|
}
|
|
71660
71784
|
|
|
71661
|
-
this.RequestZoomMinuteData=function()
|
|
71785
|
+
this.RequestZoomMinuteData=function(requestData)
|
|
71662
71786
|
{
|
|
71663
71787
|
var zoomData={ PageSize:requestData.PageSize, DataCount:requestData.DataCount, RightSpaceCount:requestData.RightSpaceCount };
|
|
71664
71788
|
|
|
@@ -71667,9 +71791,10 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71667
71791
|
FuncName:'KLineChartContainer::RequestZoomMinuteData',
|
|
71668
71792
|
FuncExplain:"缩放分钟|秒K线数据下载",
|
|
71669
71793
|
RecvFuncName:"RecvZoomMinuteData",
|
|
71670
|
-
Download:this.
|
|
71794
|
+
Download:this.ZoomDownload.Minute,
|
|
71671
71795
|
Url:this.ZoomMinuteKLineApiUrl,
|
|
71672
71796
|
Count:this.MaxRequestMinuteDayCount,
|
|
71797
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
71673
71798
|
ZoomData:zoomData
|
|
71674
71799
|
};
|
|
71675
71800
|
|
|
@@ -71685,7 +71810,8 @@ function KLineChartContainer(uielement,OffscreenElement)
|
|
|
71685
71810
|
RecvFuncName:"RecvDragMinuteData",
|
|
71686
71811
|
Download:this.DragDownload.Minute,
|
|
71687
71812
|
Url:this.DragMinuteKLineApiUrl,
|
|
71688
|
-
Count:this.MaxRequestMinuteDayCount
|
|
71813
|
+
Count:this.MaxRequestMinuteDayCount,
|
|
71814
|
+
XShowCount:this.Frame.GetXShowCount(),
|
|
71689
71815
|
};
|
|
71690
71816
|
|
|
71691
71817
|
this.RequestPreviousMinuteData(option);
|