hqchart 1.1.14824 → 1.1.14829
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 +224 -215
- package/package.json +1 -1
- package/src/jscommon/umychart.js +192 -2
- package/src/jscommon/umychart.popMenu.js +5 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +221 -3
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +199 -5
package/package.json
CHANGED
package/src/jscommon/umychart.js
CHANGED
|
@@ -1293,6 +1293,17 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1293
1293
|
chart.CreateOverlayWindowsIndex(obj);
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
+
|
|
1297
|
+
if (option.LatestPointFlash)
|
|
1298
|
+
{
|
|
1299
|
+
var item=option.LatestPointFlash;
|
|
1300
|
+
if (item.Enable)
|
|
1301
|
+
{
|
|
1302
|
+
this.CreateExtraCanvasElement(JSChart.LatestPointFlashKey, { ZIndex:6 });
|
|
1303
|
+
chart.CreateExtendChart("LatestPointFlashPaint", item);
|
|
1304
|
+
chart.StartLatestPointFlash();
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1296
1307
|
|
|
1297
1308
|
return chart;
|
|
1298
1309
|
}
|
|
@@ -2353,6 +2364,7 @@ JSChart.EnableCanvasWillReadFrequently=false; //https://html.spec.whatwg.org/m
|
|
|
2353
2364
|
JSChart.CorssCursorCanvasKey="hqchart_corsscursor";
|
|
2354
2365
|
JSChart.TooltipCursorCanvasKey="hqchart_tooltip";
|
|
2355
2366
|
JSChart.RectDragCanvasKey="hqchart_drag_rect";
|
|
2367
|
+
JSChart.LatestPointFlashKey="hqchart_point_flash"; //最新数据点闪烁
|
|
2356
2368
|
|
|
2357
2369
|
//初始化
|
|
2358
2370
|
JSChart.Init=function(divElement,bScreen,bCacheCanvas)
|
|
@@ -3233,6 +3245,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3233
3245
|
MapIndexChartCache:new Map(), //key 指标GUID
|
|
3234
3246
|
|
|
3235
3247
|
TradeStatus:null, //当前交易状态 { Date, Time:数据最后更新的时间, Status: }
|
|
3248
|
+
|
|
3249
|
+
LatestPoint:null, //最新的点位置 { X:, Y: }
|
|
3236
3250
|
};
|
|
3237
3251
|
|
|
3238
3252
|
this.VerticalDrag; //通过X轴左右拖动数据(手势才有)
|
|
@@ -3246,6 +3260,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3246
3260
|
this.DisplayLatestOption={ Timer:null, Enable: false, DelayTime:60*1000*3, LastPoint:null };
|
|
3247
3261
|
this.DrawDynamicInfoOption={ Timer:null, Enable:false , DelayTime:10 };
|
|
3248
3262
|
|
|
3263
|
+
this.LatestPointFlashOption={ Timer:null, DelayTime:100 };
|
|
3264
|
+
|
|
3249
3265
|
this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
|
|
3250
3266
|
|
|
3251
3267
|
this.StockCache={ Data:null }; //扩展数据缓存数据
|
|
@@ -3340,6 +3356,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3340
3356
|
this.MapEventListenerCache.clear();
|
|
3341
3357
|
}
|
|
3342
3358
|
|
|
3359
|
+
this.ClearGlobalOption=function()
|
|
3360
|
+
{
|
|
3361
|
+
if (!this.GlobalOption) return;
|
|
3362
|
+
|
|
3363
|
+
this.GlobalOption.LatestPoint=null;
|
|
3364
|
+
this.GlobalOption.TradeStatus=null;
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3343
3367
|
this.RestoreFocus=function(delay)
|
|
3344
3368
|
{
|
|
3345
3369
|
var value=1000;
|
|
@@ -3711,6 +3735,40 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3711
3735
|
}
|
|
3712
3736
|
}
|
|
3713
3737
|
|
|
3738
|
+
this.StartLatestPointFlash=function()
|
|
3739
|
+
{
|
|
3740
|
+
this.LatestPointFlashOption.Timer=setInterval(()=>
|
|
3741
|
+
{
|
|
3742
|
+
this.DrawLatestPoint();
|
|
3743
|
+
}, this.LatestPointFlashOption.DelayTime);
|
|
3744
|
+
}
|
|
3745
|
+
|
|
3746
|
+
this.StopLatestPointFlash=function()
|
|
3747
|
+
{
|
|
3748
|
+
if (this.LatestPointFlashOption.Timer)
|
|
3749
|
+
{
|
|
3750
|
+
clearInterval(this.LatestPointFlashOption.Timer);
|
|
3751
|
+
this.LatestPointFlashOption.Timer=null;
|
|
3752
|
+
}
|
|
3753
|
+
}
|
|
3754
|
+
|
|
3755
|
+
this.DrawLatestPoint=function()
|
|
3756
|
+
{
|
|
3757
|
+
var finder=this.GetExtendChartByClassName("LatestPointFlashPaint");
|
|
3758
|
+
if (finder && finder.Chart)
|
|
3759
|
+
finder.Chart.Draw();
|
|
3760
|
+
}
|
|
3761
|
+
|
|
3762
|
+
this.SetLatestPointFlash=function(flashCount, option)
|
|
3763
|
+
{
|
|
3764
|
+
if (!IFrameSplitOperator.IsNumber(flashCount)) return;
|
|
3765
|
+
var finder=this.GetExtendChartByClassName("LatestPointFlashPaint");
|
|
3766
|
+
if (!finder || !finder.Chart) return false;
|
|
3767
|
+
|
|
3768
|
+
var chart=finder.Chart;
|
|
3769
|
+
chart.FlashCount=flashCount;
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3714
3772
|
this.ChartDestroy=function() //销毁
|
|
3715
3773
|
{
|
|
3716
3774
|
this.IsDestroy=true;
|
|
@@ -3729,6 +3787,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3729
3787
|
|
|
3730
3788
|
this.DestroyPopMenu();
|
|
3731
3789
|
|
|
3790
|
+
this.StopLatestPointFlash();
|
|
3791
|
+
|
|
3732
3792
|
document.oncontextmenu=null;
|
|
3733
3793
|
this.RemoveAllEventListener();
|
|
3734
3794
|
}
|
|
@@ -39822,6 +39882,12 @@ function ChartMinutePriceLine()
|
|
|
39822
39882
|
this.DrawAfterClose(); //收盘集合竞价
|
|
39823
39883
|
this.DrawMultiDayAfterClose();
|
|
39824
39884
|
|
|
39885
|
+
if (this.Identify=="Minute-Line" && this.ChartFrame.GlobalOption)
|
|
39886
|
+
{
|
|
39887
|
+
var globalOption=this.ChartFrame.GlobalOption;
|
|
39888
|
+
globalOption.LatestPoint={ X:this.LastPoint.X, Y:this.LastPoint.Y };
|
|
39889
|
+
}
|
|
39890
|
+
|
|
39825
39891
|
if (this.GetEventCallback)
|
|
39826
39892
|
{
|
|
39827
39893
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_MINUTE_LAST_POINT);
|
|
@@ -47153,7 +47219,8 @@ function ExtendChartPaintFactory()
|
|
|
47153
47219
|
["RectDragPaint", { Create:function() { return new RectDragPaint(); } }],
|
|
47154
47220
|
["DragMovePaint", { Create:function() { return new DragMovePaint(); } }],
|
|
47155
47221
|
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}],
|
|
47156
|
-
["FrameButtomToolbarPaint", {Create:function() { return new FrameButtomToolbarPaint(); }}]
|
|
47222
|
+
["FrameButtomToolbarPaint", {Create:function() { return new FrameButtomToolbarPaint(); }}],
|
|
47223
|
+
["LatestPointFlashPaint", {Create:function() { return new LatestPointFlashPaint(); }}]
|
|
47157
47224
|
]
|
|
47158
47225
|
);
|
|
47159
47226
|
|
|
@@ -51779,6 +51846,101 @@ function MinuteBackgroundPaint()
|
|
|
51779
51846
|
}
|
|
51780
51847
|
}
|
|
51781
51848
|
|
|
51849
|
+
//最新数据点闪动
|
|
51850
|
+
function LatestPointFlashPaint()
|
|
51851
|
+
{
|
|
51852
|
+
this.newMethod=IExtendChartPainting; //派生
|
|
51853
|
+
this.newMethod();
|
|
51854
|
+
delete this.newMethod;
|
|
51855
|
+
|
|
51856
|
+
this.ClassName='LatestPointFlashPaint';
|
|
51857
|
+
this.HQChart;
|
|
51858
|
+
|
|
51859
|
+
this.Status=0;
|
|
51860
|
+
this.UpdateTime=new Date();
|
|
51861
|
+
this.FlashCount=0; //闪烁次数
|
|
51862
|
+
this.Frequency=500; //闪烁频率ms
|
|
51863
|
+
|
|
51864
|
+
this.PointColor=g_JSChartResource.LatestPointFlash.PointColor;
|
|
51865
|
+
this.PointRadius=g_JSChartResource.LatestPointFlash.PointRadius;
|
|
51866
|
+
this.BGColor=g_JSChartResource.LatestPointFlash.BGColor;
|
|
51867
|
+
this.BGRadius=g_JSChartResource.LatestPointFlash.BGRadius;
|
|
51868
|
+
this.DrawPriority=IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25;
|
|
51869
|
+
this.FlashCanvas;
|
|
51870
|
+
|
|
51871
|
+
this.SetOption=function(option)
|
|
51872
|
+
{
|
|
51873
|
+
if (this.HQChart)
|
|
51874
|
+
{
|
|
51875
|
+
var extraElement=this.HQChart.GetExtraCanvas(JSChart.LatestPointFlashKey);
|
|
51876
|
+
if (extraElement && extraElement.Canvas) this.FlashCanvas=extraElement.Canvas; //绑定独立的画布
|
|
51877
|
+
}
|
|
51878
|
+
|
|
51879
|
+
if (option)
|
|
51880
|
+
{
|
|
51881
|
+
if (IFrameSplitOperator.IsNumber(option.Frequency)) this.Frequency=option.Frequency;
|
|
51882
|
+
}
|
|
51883
|
+
}
|
|
51884
|
+
|
|
51885
|
+
this.ReloadResource=function(resource)
|
|
51886
|
+
{
|
|
51887
|
+
this.PointColor=g_JSChartResource.LatestPointFlash.PointColor;
|
|
51888
|
+
this.PointRadius=g_JSChartResource.LatestPointFlash.PointRadius;
|
|
51889
|
+
this.BGColor=g_JSChartResource.LatestPointFlash.BGColor;
|
|
51890
|
+
this.BGRadius=g_JSChartResource.LatestPointFlash.BGRadius;
|
|
51891
|
+
}
|
|
51892
|
+
|
|
51893
|
+
this.Draw=function()
|
|
51894
|
+
{
|
|
51895
|
+
if (!this.FlashCanvas) return;
|
|
51896
|
+
if (!this.HQChart) return;
|
|
51897
|
+
this.HQChart.ClearCanvas(this.FlashCanvas);
|
|
51898
|
+
|
|
51899
|
+
if (this.FlashCount<=0) return;
|
|
51900
|
+
if (this.IsStatusChange())
|
|
51901
|
+
{
|
|
51902
|
+
this.Status=(this.Status+1)%2;
|
|
51903
|
+
--this.FlashCount;
|
|
51904
|
+
}
|
|
51905
|
+
|
|
51906
|
+
if (this.Status==0) return;
|
|
51907
|
+
if (!this.HQChart.GlobalOption || !this.HQChart.GlobalOption.LatestPoint) return;
|
|
51908
|
+
var point=this.HQChart.GlobalOption.LatestPoint;
|
|
51909
|
+
if (!IFrameSplitOperator.IsNumber(point.X) || !IFrameSplitOperator.IsNumber(point.Y)) return;
|
|
51910
|
+
|
|
51911
|
+
this.FlashCanvas.fillStyle=this.BGColor;
|
|
51912
|
+
this.FlashCanvas.beginPath();
|
|
51913
|
+
this.FlashCanvas.arc(point.X,point.Y,this.BGRadius,0,360,false);
|
|
51914
|
+
this.FlashCanvas.fill();
|
|
51915
|
+
this.FlashCanvas.closePath();
|
|
51916
|
+
|
|
51917
|
+
//画实心圆
|
|
51918
|
+
this.FlashCanvas.fillStyle=this.PointColor;
|
|
51919
|
+
this.FlashCanvas.beginPath();
|
|
51920
|
+
this.FlashCanvas.arc(point.X,point.Y,this.PointRadius,0,360,false);
|
|
51921
|
+
this.FlashCanvas.fill();
|
|
51922
|
+
this.FlashCanvas.closePath();
|
|
51923
|
+
}
|
|
51924
|
+
|
|
51925
|
+
this.IsStatusChange=function()
|
|
51926
|
+
{
|
|
51927
|
+
if (!this.UpdateTime)
|
|
51928
|
+
{
|
|
51929
|
+
this.UpdateTime=new Date();
|
|
51930
|
+
return true;
|
|
51931
|
+
}
|
|
51932
|
+
|
|
51933
|
+
|
|
51934
|
+
var now=new Date();
|
|
51935
|
+
var diffValue=now.getTime()-this.UpdateTime.getTime();
|
|
51936
|
+
if (diffValue<=this.Frequency)
|
|
51937
|
+
return false;
|
|
51938
|
+
|
|
51939
|
+
this.UpdateTime=now;
|
|
51940
|
+
return true;
|
|
51941
|
+
}
|
|
51942
|
+
}
|
|
51943
|
+
|
|
51782
51944
|
//拖拽效果图
|
|
51783
51945
|
var JSCHART_DRAGCHART_TYPE_ID=
|
|
51784
51946
|
{
|
|
@@ -74953,6 +75115,15 @@ function JSChartResource()
|
|
|
74953
75115
|
|
|
74954
75116
|
CorssPoint:{ Center:{ Radius:5*GetDevicePixelRatio(), Color:"rgb(50,171,205)"}, Border:{ Color:'rgb(255,255,255)', Width:1*GetDevicePixelRatio() } }
|
|
74955
75117
|
};
|
|
75118
|
+
|
|
75119
|
+
this.LatestPointFlash=
|
|
75120
|
+
{
|
|
75121
|
+
PointColor:"rgb(50,171,205)",
|
|
75122
|
+
PointRadius:3*GetDevicePixelRatio(),
|
|
75123
|
+
|
|
75124
|
+
BGColor:"rgba(50,171,205,0.7)",
|
|
75125
|
+
BGRadius:6*GetDevicePixelRatio(),
|
|
75126
|
+
}
|
|
74956
75127
|
|
|
74957
75128
|
//指标锁
|
|
74958
75129
|
this.IndexLock=
|
|
@@ -76497,6 +76668,17 @@ function JSChartResource()
|
|
|
76497
76668
|
if (subItem.Color) subDest.Color=subItem.Color;
|
|
76498
76669
|
}
|
|
76499
76670
|
}
|
|
76671
|
+
|
|
76672
|
+
if (style.LatestPointFlash)
|
|
76673
|
+
{
|
|
76674
|
+
var item=style.LatestPointFlash;
|
|
76675
|
+
var dest=this.LatestPointFlash;
|
|
76676
|
+
if (item.PointColor) dest.PointColor=item.PointColor;
|
|
76677
|
+
if (IFrameSplitOperator.IsNumber(item.PointRadius)) dest.PointRadius=item.PointRadius;
|
|
76678
|
+
|
|
76679
|
+
if (item.BGColor) dest.BGColor=item.BGColor;
|
|
76680
|
+
if (IFrameSplitOperator.IsNumber(item.BGRadius)) dest.BGRadius=item.BGRadius;
|
|
76681
|
+
}
|
|
76500
76682
|
|
|
76501
76683
|
if (style.KLine) this.KLine = style.KLine;
|
|
76502
76684
|
if (style.VirtualKLine)
|
|
@@ -82603,7 +82785,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82603
82785
|
if (IFrameSplitOperator.IsNumber(item.DataWidth)) this.KLineSize={ DataWidth:item.DataWidth };
|
|
82604
82786
|
}
|
|
82605
82787
|
|
|
82606
|
-
if (option.Reload
|
|
82788
|
+
if (IFrameSplitOperator.IsBool(option.Reload)) isReload=option.Reload;
|
|
82789
|
+
if (IFrameSplitOperator.IsBool(option.IsApiPeriod)) this.IsApiPeriod=option.IsApiPeriod;
|
|
82607
82790
|
};
|
|
82608
82791
|
|
|
82609
82792
|
if (this.Period==period && isReload==false)
|
|
@@ -91753,6 +91936,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91753
91936
|
this.DataStatus.LatestDate=data.stock[0].date; //保存下最后一天的日期
|
|
91754
91937
|
this.RecvBuySellData(data.stock[0].BuySellData);
|
|
91755
91938
|
}
|
|
91939
|
+
|
|
91940
|
+
if (data.LatestPointFlash) //最新数据闪烁
|
|
91941
|
+
{
|
|
91942
|
+
var item=data.LatestPointFlash;
|
|
91943
|
+
if (IFrameSplitOperator.IsNumber(item.FlashCount))
|
|
91944
|
+
this.SetLatestPointFlash(item.FlashCount)
|
|
91945
|
+
}
|
|
91756
91946
|
|
|
91757
91947
|
this.DataStatus.LatestDay=true;
|
|
91758
91948
|
|
|
@@ -45,7 +45,11 @@ function JSPopMenu()
|
|
|
45
45
|
|
|
46
46
|
this.Destroy=function()
|
|
47
47
|
{
|
|
48
|
-
if (this.MouseDownlistenerPtr)
|
|
48
|
+
if (this.MouseDownlistenerPtr)
|
|
49
|
+
{
|
|
50
|
+
window.removeEventListener('mousedown', this.MouseDownlistenerPtr);
|
|
51
|
+
this.MouseDownlistenerPtr=null;
|
|
52
|
+
}
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
//创建菜单
|
|
@@ -5389,6 +5389,17 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5389
5389
|
chart.CreateOverlayWindowsIndex(obj);
|
|
5390
5390
|
}
|
|
5391
5391
|
}
|
|
5392
|
+
|
|
5393
|
+
if (option.LatestPointFlash)
|
|
5394
|
+
{
|
|
5395
|
+
var item=option.LatestPointFlash;
|
|
5396
|
+
if (item.Enable)
|
|
5397
|
+
{
|
|
5398
|
+
this.CreateExtraCanvasElement(JSChart.LatestPointFlashKey, { ZIndex:6 });
|
|
5399
|
+
chart.CreateExtendChart("LatestPointFlashPaint", item);
|
|
5400
|
+
chart.StartLatestPointFlash();
|
|
5401
|
+
}
|
|
5402
|
+
}
|
|
5392
5403
|
|
|
5393
5404
|
return chart;
|
|
5394
5405
|
}
|
|
@@ -6449,6 +6460,7 @@ JSChart.EnableCanvasWillReadFrequently=false; //https://html.spec.whatwg.org/m
|
|
|
6449
6460
|
JSChart.CorssCursorCanvasKey="hqchart_corsscursor";
|
|
6450
6461
|
JSChart.TooltipCursorCanvasKey="hqchart_tooltip";
|
|
6451
6462
|
JSChart.RectDragCanvasKey="hqchart_drag_rect";
|
|
6463
|
+
JSChart.LatestPointFlashKey="hqchart_point_flash"; //最新数据点闪烁
|
|
6452
6464
|
|
|
6453
6465
|
//初始化
|
|
6454
6466
|
JSChart.Init=function(divElement,bScreen,bCacheCanvas)
|
|
@@ -7329,6 +7341,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7329
7341
|
MapIndexChartCache:new Map(), //key 指标GUID
|
|
7330
7342
|
|
|
7331
7343
|
TradeStatus:null, //当前交易状态 { Date, Time:数据最后更新的时间, Status: }
|
|
7344
|
+
|
|
7345
|
+
LatestPoint:null, //最新的点位置 { X:, Y: }
|
|
7332
7346
|
};
|
|
7333
7347
|
|
|
7334
7348
|
this.VerticalDrag; //通过X轴左右拖动数据(手势才有)
|
|
@@ -7342,6 +7356,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7342
7356
|
this.DisplayLatestOption={ Timer:null, Enable: false, DelayTime:60*1000*3, LastPoint:null };
|
|
7343
7357
|
this.DrawDynamicInfoOption={ Timer:null, Enable:false , DelayTime:10 };
|
|
7344
7358
|
|
|
7359
|
+
this.LatestPointFlashOption={ Timer:null, DelayTime:100 };
|
|
7360
|
+
|
|
7345
7361
|
this.CustomChartDrag; //自定义图形的拖拽操作 { Type:, Data: }
|
|
7346
7362
|
|
|
7347
7363
|
this.StockCache={ Data:null }; //扩展数据缓存数据
|
|
@@ -7436,6 +7452,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7436
7452
|
this.MapEventListenerCache.clear();
|
|
7437
7453
|
}
|
|
7438
7454
|
|
|
7455
|
+
this.ClearGlobalOption=function()
|
|
7456
|
+
{
|
|
7457
|
+
if (!this.GlobalOption) return;
|
|
7458
|
+
|
|
7459
|
+
this.GlobalOption.LatestPoint=null;
|
|
7460
|
+
this.GlobalOption.TradeStatus=null;
|
|
7461
|
+
}
|
|
7462
|
+
|
|
7439
7463
|
this.RestoreFocus=function(delay)
|
|
7440
7464
|
{
|
|
7441
7465
|
var value=1000;
|
|
@@ -7807,6 +7831,40 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7807
7831
|
}
|
|
7808
7832
|
}
|
|
7809
7833
|
|
|
7834
|
+
this.StartLatestPointFlash=function()
|
|
7835
|
+
{
|
|
7836
|
+
this.LatestPointFlashOption.Timer=setInterval(()=>
|
|
7837
|
+
{
|
|
7838
|
+
this.DrawLatestPoint();
|
|
7839
|
+
}, this.LatestPointFlashOption.DelayTime);
|
|
7840
|
+
}
|
|
7841
|
+
|
|
7842
|
+
this.StopLatestPointFlash=function()
|
|
7843
|
+
{
|
|
7844
|
+
if (this.LatestPointFlashOption.Timer)
|
|
7845
|
+
{
|
|
7846
|
+
clearInterval(this.LatestPointFlashOption.Timer);
|
|
7847
|
+
this.LatestPointFlashOption.Timer=null;
|
|
7848
|
+
}
|
|
7849
|
+
}
|
|
7850
|
+
|
|
7851
|
+
this.DrawLatestPoint=function()
|
|
7852
|
+
{
|
|
7853
|
+
var finder=this.GetExtendChartByClassName("LatestPointFlashPaint");
|
|
7854
|
+
if (finder && finder.Chart)
|
|
7855
|
+
finder.Chart.Draw();
|
|
7856
|
+
}
|
|
7857
|
+
|
|
7858
|
+
this.SetLatestPointFlash=function(flashCount, option)
|
|
7859
|
+
{
|
|
7860
|
+
if (!IFrameSplitOperator.IsNumber(flashCount)) return;
|
|
7861
|
+
var finder=this.GetExtendChartByClassName("LatestPointFlashPaint");
|
|
7862
|
+
if (!finder || !finder.Chart) return false;
|
|
7863
|
+
|
|
7864
|
+
var chart=finder.Chart;
|
|
7865
|
+
chart.FlashCount=flashCount;
|
|
7866
|
+
}
|
|
7867
|
+
|
|
7810
7868
|
this.ChartDestroy=function() //销毁
|
|
7811
7869
|
{
|
|
7812
7870
|
this.IsDestroy=true;
|
|
@@ -7825,6 +7883,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7825
7883
|
|
|
7826
7884
|
this.DestroyPopMenu();
|
|
7827
7885
|
|
|
7886
|
+
this.StopLatestPointFlash();
|
|
7887
|
+
|
|
7828
7888
|
document.oncontextmenu=null;
|
|
7829
7889
|
this.RemoveAllEventListener();
|
|
7830
7890
|
}
|
|
@@ -43918,6 +43978,12 @@ function ChartMinutePriceLine()
|
|
|
43918
43978
|
this.DrawAfterClose(); //收盘集合竞价
|
|
43919
43979
|
this.DrawMultiDayAfterClose();
|
|
43920
43980
|
|
|
43981
|
+
if (this.Identify=="Minute-Line" && this.ChartFrame.GlobalOption)
|
|
43982
|
+
{
|
|
43983
|
+
var globalOption=this.ChartFrame.GlobalOption;
|
|
43984
|
+
globalOption.LatestPoint={ X:this.LastPoint.X, Y:this.LastPoint.Y };
|
|
43985
|
+
}
|
|
43986
|
+
|
|
43921
43987
|
if (this.GetEventCallback)
|
|
43922
43988
|
{
|
|
43923
43989
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAW_MINUTE_LAST_POINT);
|
|
@@ -51249,7 +51315,8 @@ function ExtendChartPaintFactory()
|
|
|
51249
51315
|
["RectDragPaint", { Create:function() { return new RectDragPaint(); } }],
|
|
51250
51316
|
["DragMovePaint", { Create:function() { return new DragMovePaint(); } }],
|
|
51251
51317
|
["SessionBreaksPaint", { Create:function() { return new SessionBreaksPaint(); }}],
|
|
51252
|
-
["FrameButtomToolbarPaint", {Create:function() { return new FrameButtomToolbarPaint(); }}]
|
|
51318
|
+
["FrameButtomToolbarPaint", {Create:function() { return new FrameButtomToolbarPaint(); }}],
|
|
51319
|
+
["LatestPointFlashPaint", {Create:function() { return new LatestPointFlashPaint(); }}]
|
|
51253
51320
|
]
|
|
51254
51321
|
);
|
|
51255
51322
|
|
|
@@ -55875,6 +55942,101 @@ function MinuteBackgroundPaint()
|
|
|
55875
55942
|
}
|
|
55876
55943
|
}
|
|
55877
55944
|
|
|
55945
|
+
//最新数据点闪动
|
|
55946
|
+
function LatestPointFlashPaint()
|
|
55947
|
+
{
|
|
55948
|
+
this.newMethod=IExtendChartPainting; //派生
|
|
55949
|
+
this.newMethod();
|
|
55950
|
+
delete this.newMethod;
|
|
55951
|
+
|
|
55952
|
+
this.ClassName='LatestPointFlashPaint';
|
|
55953
|
+
this.HQChart;
|
|
55954
|
+
|
|
55955
|
+
this.Status=0;
|
|
55956
|
+
this.UpdateTime=new Date();
|
|
55957
|
+
this.FlashCount=0; //闪烁次数
|
|
55958
|
+
this.Frequency=500; //闪烁频率ms
|
|
55959
|
+
|
|
55960
|
+
this.PointColor=g_JSChartResource.LatestPointFlash.PointColor;
|
|
55961
|
+
this.PointRadius=g_JSChartResource.LatestPointFlash.PointRadius;
|
|
55962
|
+
this.BGColor=g_JSChartResource.LatestPointFlash.BGColor;
|
|
55963
|
+
this.BGRadius=g_JSChartResource.LatestPointFlash.BGRadius;
|
|
55964
|
+
this.DrawPriority=IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25;
|
|
55965
|
+
this.FlashCanvas;
|
|
55966
|
+
|
|
55967
|
+
this.SetOption=function(option)
|
|
55968
|
+
{
|
|
55969
|
+
if (this.HQChart)
|
|
55970
|
+
{
|
|
55971
|
+
var extraElement=this.HQChart.GetExtraCanvas(JSChart.LatestPointFlashKey);
|
|
55972
|
+
if (extraElement && extraElement.Canvas) this.FlashCanvas=extraElement.Canvas; //绑定独立的画布
|
|
55973
|
+
}
|
|
55974
|
+
|
|
55975
|
+
if (option)
|
|
55976
|
+
{
|
|
55977
|
+
if (IFrameSplitOperator.IsNumber(option.Frequency)) this.Frequency=option.Frequency;
|
|
55978
|
+
}
|
|
55979
|
+
}
|
|
55980
|
+
|
|
55981
|
+
this.ReloadResource=function(resource)
|
|
55982
|
+
{
|
|
55983
|
+
this.PointColor=g_JSChartResource.LatestPointFlash.PointColor;
|
|
55984
|
+
this.PointRadius=g_JSChartResource.LatestPointFlash.PointRadius;
|
|
55985
|
+
this.BGColor=g_JSChartResource.LatestPointFlash.BGColor;
|
|
55986
|
+
this.BGRadius=g_JSChartResource.LatestPointFlash.BGRadius;
|
|
55987
|
+
}
|
|
55988
|
+
|
|
55989
|
+
this.Draw=function()
|
|
55990
|
+
{
|
|
55991
|
+
if (!this.FlashCanvas) return;
|
|
55992
|
+
if (!this.HQChart) return;
|
|
55993
|
+
this.HQChart.ClearCanvas(this.FlashCanvas);
|
|
55994
|
+
|
|
55995
|
+
if (this.FlashCount<=0) return;
|
|
55996
|
+
if (this.IsStatusChange())
|
|
55997
|
+
{
|
|
55998
|
+
this.Status=(this.Status+1)%2;
|
|
55999
|
+
--this.FlashCount;
|
|
56000
|
+
}
|
|
56001
|
+
|
|
56002
|
+
if (this.Status==0) return;
|
|
56003
|
+
if (!this.HQChart.GlobalOption || !this.HQChart.GlobalOption.LatestPoint) return;
|
|
56004
|
+
var point=this.HQChart.GlobalOption.LatestPoint;
|
|
56005
|
+
if (!IFrameSplitOperator.IsNumber(point.X) || !IFrameSplitOperator.IsNumber(point.Y)) return;
|
|
56006
|
+
|
|
56007
|
+
this.FlashCanvas.fillStyle=this.BGColor;
|
|
56008
|
+
this.FlashCanvas.beginPath();
|
|
56009
|
+
this.FlashCanvas.arc(point.X,point.Y,this.BGRadius,0,360,false);
|
|
56010
|
+
this.FlashCanvas.fill();
|
|
56011
|
+
this.FlashCanvas.closePath();
|
|
56012
|
+
|
|
56013
|
+
//画实心圆
|
|
56014
|
+
this.FlashCanvas.fillStyle=this.PointColor;
|
|
56015
|
+
this.FlashCanvas.beginPath();
|
|
56016
|
+
this.FlashCanvas.arc(point.X,point.Y,this.PointRadius,0,360,false);
|
|
56017
|
+
this.FlashCanvas.fill();
|
|
56018
|
+
this.FlashCanvas.closePath();
|
|
56019
|
+
}
|
|
56020
|
+
|
|
56021
|
+
this.IsStatusChange=function()
|
|
56022
|
+
{
|
|
56023
|
+
if (!this.UpdateTime)
|
|
56024
|
+
{
|
|
56025
|
+
this.UpdateTime=new Date();
|
|
56026
|
+
return true;
|
|
56027
|
+
}
|
|
56028
|
+
|
|
56029
|
+
|
|
56030
|
+
var now=new Date();
|
|
56031
|
+
var diffValue=now.getTime()-this.UpdateTime.getTime();
|
|
56032
|
+
if (diffValue<=this.Frequency)
|
|
56033
|
+
return false;
|
|
56034
|
+
|
|
56035
|
+
this.UpdateTime=now;
|
|
56036
|
+
return true;
|
|
56037
|
+
}
|
|
56038
|
+
}
|
|
56039
|
+
|
|
55878
56040
|
//拖拽效果图
|
|
55879
56041
|
var JSCHART_DRAGCHART_TYPE_ID=
|
|
55880
56042
|
{
|
|
@@ -79049,6 +79211,15 @@ function JSChartResource()
|
|
|
79049
79211
|
|
|
79050
79212
|
CorssPoint:{ Center:{ Radius:5*GetDevicePixelRatio(), Color:"rgb(50,171,205)"}, Border:{ Color:'rgb(255,255,255)', Width:1*GetDevicePixelRatio() } }
|
|
79051
79213
|
};
|
|
79214
|
+
|
|
79215
|
+
this.LatestPointFlash=
|
|
79216
|
+
{
|
|
79217
|
+
PointColor:"rgb(50,171,205)",
|
|
79218
|
+
PointRadius:3*GetDevicePixelRatio(),
|
|
79219
|
+
|
|
79220
|
+
BGColor:"rgba(50,171,205,0.7)",
|
|
79221
|
+
BGRadius:6*GetDevicePixelRatio(),
|
|
79222
|
+
}
|
|
79052
79223
|
|
|
79053
79224
|
//指标锁
|
|
79054
79225
|
this.IndexLock=
|
|
@@ -80593,6 +80764,17 @@ function JSChartResource()
|
|
|
80593
80764
|
if (subItem.Color) subDest.Color=subItem.Color;
|
|
80594
80765
|
}
|
|
80595
80766
|
}
|
|
80767
|
+
|
|
80768
|
+
if (style.LatestPointFlash)
|
|
80769
|
+
{
|
|
80770
|
+
var item=style.LatestPointFlash;
|
|
80771
|
+
var dest=this.LatestPointFlash;
|
|
80772
|
+
if (item.PointColor) dest.PointColor=item.PointColor;
|
|
80773
|
+
if (IFrameSplitOperator.IsNumber(item.PointRadius)) dest.PointRadius=item.PointRadius;
|
|
80774
|
+
|
|
80775
|
+
if (item.BGColor) dest.BGColor=item.BGColor;
|
|
80776
|
+
if (IFrameSplitOperator.IsNumber(item.BGRadius)) dest.BGRadius=item.BGRadius;
|
|
80777
|
+
}
|
|
80596
80778
|
|
|
80597
80779
|
if (style.KLine) this.KLine = style.KLine;
|
|
80598
80780
|
if (style.VirtualKLine)
|
|
@@ -86699,7 +86881,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86699
86881
|
if (IFrameSplitOperator.IsNumber(item.DataWidth)) this.KLineSize={ DataWidth:item.DataWidth };
|
|
86700
86882
|
}
|
|
86701
86883
|
|
|
86702
|
-
if (option.Reload
|
|
86884
|
+
if (IFrameSplitOperator.IsBool(option.Reload)) isReload=option.Reload;
|
|
86885
|
+
if (IFrameSplitOperator.IsBool(option.IsApiPeriod)) this.IsApiPeriod=option.IsApiPeriod;
|
|
86703
86886
|
};
|
|
86704
86887
|
|
|
86705
86888
|
if (this.Period==period && isReload==false)
|
|
@@ -95849,6 +96032,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
95849
96032
|
this.DataStatus.LatestDate=data.stock[0].date; //保存下最后一天的日期
|
|
95850
96033
|
this.RecvBuySellData(data.stock[0].BuySellData);
|
|
95851
96034
|
}
|
|
96035
|
+
|
|
96036
|
+
if (data.LatestPointFlash) //最新数据闪烁
|
|
96037
|
+
{
|
|
96038
|
+
var item=data.LatestPointFlash;
|
|
96039
|
+
if (IFrameSplitOperator.IsNumber(item.FlashCount))
|
|
96040
|
+
this.SetLatestPointFlash(item.FlashCount)
|
|
96041
|
+
}
|
|
95852
96042
|
|
|
95853
96043
|
this.DataStatus.LatestDay=true;
|
|
95854
96044
|
|
|
@@ -149582,7 +149772,7 @@ function ScrollBarBGChart()
|
|
|
149582
149772
|
|
|
149583
149773
|
|
|
149584
149774
|
|
|
149585
|
-
var HQCHART_VERSION="1.1.
|
|
149775
|
+
var HQCHART_VERSION="1.1.14828";
|
|
149586
149776
|
|
|
149587
149777
|
function PrintHQChartVersion()
|
|
149588
149778
|
{
|
|
@@ -149710,5 +149900,33 @@ export default {
|
|
|
149710
149900
|
JSScrollBarChart:JSScrollBarChart,
|
|
149711
149901
|
|
|
149712
149902
|
JSCHART_WORKER_MESSAGE_ID:JSCHART_WORKER_MESSAGE_ID,
|
|
149903
|
+
|
|
149904
|
+
JS_Frame:
|
|
149905
|
+
{
|
|
149906
|
+
KLineFrame:KLineFrame,
|
|
149907
|
+
KLineHScreenFrame:KLineHScreenFrame,
|
|
149908
|
+
},
|
|
149909
|
+
|
|
149910
|
+
//新个导出 根据大类分组
|
|
149911
|
+
JS_ChangeStringFormat:
|
|
149912
|
+
{
|
|
149913
|
+
IChangeStringFormat:IChangeStringFormat, //数据格式化
|
|
149914
|
+
HQMinuteTimeStringFormat:HQMinuteTimeStringFormat, //分时图X轴 十字光标输出格式化
|
|
149915
|
+
HQDateStringFormat:HQDateStringFormat, //K线图X轴 十字光标输出格式化
|
|
149916
|
+
HQPriceStringFormat:HQPriceStringFormat, //分时图,K线图Y轴 十字光标输出格式化
|
|
149917
|
+
},
|
|
149918
|
+
|
|
149919
|
+
//所有的枚举
|
|
149920
|
+
JS_ID:
|
|
149921
|
+
{
|
|
149922
|
+
JSCHART_EVENT_ID:JSCHART_EVENT_ID,
|
|
149923
|
+
JSCHART_OPERATOR_ID:JSCHART_OPERATOR_ID,
|
|
149924
|
+
JSCHART_DRAG_ID:JSCHART_DRAG_ID,
|
|
149925
|
+
JSCHART_BUTTON_ID:JSCHART_BUTTON_ID,
|
|
149926
|
+
JSCHART_DATA_FIELD_ID:JSCHART_DATA_FIELD_ID,
|
|
149927
|
+
JSCHART_WORKER_MESSAGE_ID:JSCHART_WORKER_MESSAGE_ID,
|
|
149928
|
+
JSCHART_MENU_ID:JSCHART_MENU_ID,
|
|
149929
|
+
JSCHART_TRADE_STATUS_ID:JSCHART_TRADE_STATUS_ID, //交易状态
|
|
149930
|
+
},
|
|
149713
149931
|
}
|
|
149714
149932
|
|