hqchart 1.1.14576 → 1.1.14591
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 +205 -72
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogSearchIndex.js +72 -7
- package/src/jscommon/umychart.NetworkFilterTest.js +82 -1
- package/src/jscommon/umychart.complier.js +12 -7
- package/src/jscommon/umychart.index.data.js +178 -7
- package/src/jscommon/umychart.js +246 -5
- package/src/jscommon/umychart.testdata.js +82 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +437 -20
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.NetworkFilterTest.vue.js +82 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +509 -27
package/src/jscommon/umychart.js
CHANGED
|
@@ -441,6 +441,12 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
441
441
|
if (IFrameSplitOperator.IsNumber(item.ZIndex)) zindex=item.ZIndex;
|
|
442
442
|
if (item.Enable) this.CreateExtraCanvasElement(JSChart.RectDragCanvasKey, { ZIndex:zindex }); //创建独立的区间选择画布
|
|
443
443
|
}
|
|
444
|
+
|
|
445
|
+
if (option.DragKLine)
|
|
446
|
+
{
|
|
447
|
+
var item=option.DragKLine;
|
|
448
|
+
if (IFrameSplitOperator.IsBool(item.EnableShfit)) chart.KLineDragConfig.EnableShfit=item.EnableShfit;
|
|
449
|
+
}
|
|
444
450
|
}
|
|
445
451
|
|
|
446
452
|
//创建子窗口
|
|
@@ -492,6 +498,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
492
498
|
if (IFrameSplitOperator.IsNumber(item.PriceFormatType)) chart.ChartCorssCursor.StringFormatY.PriceFormatType=item.PriceFormatType;
|
|
493
499
|
if (IFrameSplitOperator.IsNumber(item.DataFormatType)) chart.ChartCorssCursor.StringFormatY.DataFormatType=item.DataFormatType;
|
|
494
500
|
if (IFrameSplitOperator.IsBool(item.EnableKeyboard)) chart.ChartCorssCursor.EnableKeyboard=item.EnableKeyboard;
|
|
501
|
+
if (IFrameSplitOperator.IsBool(item.EnableDBClick)) chart.ChartCorssCursor.EnableDBClick=item.EnableDBClick;
|
|
495
502
|
|
|
496
503
|
if (IFrameSplitOperator.IsBool(item.IsShowCorssPoint)) chart.ChartCorssCursor.CorssPointConfig.Enable=item.IsShowCorssPoint;
|
|
497
504
|
|
|
@@ -997,6 +1004,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
997
1004
|
if (IFrameSplitOperator.IsNumber(item.HPenType)) chart.ChartCorssCursor.HPenType=item.HPenType;
|
|
998
1005
|
if (IFrameSplitOperator.IsNumber(item.VPenType)) chart.ChartCorssCursor.VPenType=item.VPenType;
|
|
999
1006
|
if (IFrameSplitOperator.IsBool(item.EnableKeyboard)) chart.ChartCorssCursor.EnableKeyboard=item.EnableKeyboard;
|
|
1007
|
+
if (IFrameSplitOperator.IsBool(item.EnableDBClick)) chart.ChartCorssCursor.EnableDBClick=item.EnableDBClick;
|
|
1000
1008
|
if (IFrameSplitOperator.IsBool(item.IsShowCorssPoint)) chart.ChartCorssCursor.CorssPointConfig.Enable=item.IsShowCorssPoint;
|
|
1001
1009
|
if (IFrameSplitOperator.IsNumber(item.VLineType)) chart.ChartCorssCursor.VLineType=item.VLineType;
|
|
1002
1010
|
}
|
|
@@ -2895,12 +2903,14 @@ var JSCHART_MENU_ID=
|
|
|
2895
2903
|
CMD_CORSS_ON_VAILD_TIME_ID:50, //超出当前时间的,X轴调整到当前最后的时间(分时图)
|
|
2896
2904
|
CMD_CORSS_ON_KLINE_ID:51, //十字光标只能画在K线上
|
|
2897
2905
|
CMD_CORSS_POINT_ID:52, //十字光标圆点
|
|
2906
|
+
|
|
2898
2907
|
|
|
2899
2908
|
CMD_RBUTTON_SELECT_RECT_ID:53, //右键区间选择
|
|
2900
2909
|
CMD_LBUTTON_SELECT_RECT_ID:54, //左键区间选择
|
|
2901
2910
|
CMD_ENABLE_XDRAG_BOTTOM_ID:55, //X轴拖动缩放
|
|
2902
2911
|
|
|
2903
2912
|
CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
|
|
2913
|
+
CMD_CORSS_DBCLICK_ID:57, //双击显示隐藏十字光标
|
|
2904
2914
|
|
|
2905
2915
|
|
|
2906
2916
|
|
|
@@ -4194,6 +4204,17 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4194
4204
|
document.oncontextmenu=(e)=> { this.DocContextMenu(e); }
|
|
4195
4205
|
}
|
|
4196
4206
|
|
|
4207
|
+
|
|
4208
|
+
this.IsShfitDragKLine=function(e)
|
|
4209
|
+
{
|
|
4210
|
+
if (this.DragMode!=1) return false;
|
|
4211
|
+
if (!this.KLineDragConfig) return false;
|
|
4212
|
+
if (!this.KLineDragConfig.EnableShfit) return false;
|
|
4213
|
+
if (!e.shiftKey) return false;
|
|
4214
|
+
|
|
4215
|
+
return true;
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4197
4218
|
this.DocOnMouseMove=function(e)
|
|
4198
4219
|
{
|
|
4199
4220
|
//加载数据中,禁用鼠标事件
|
|
@@ -4209,6 +4230,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4209
4230
|
var moveSetpY=Math.abs(drag.LastMove.Y-e.clientY);
|
|
4210
4231
|
var isDragSelectRect=(this.RectSelectDrag && this.RectSelectDrag.Index>=0);
|
|
4211
4232
|
var isDragSubSelectRect=(this.RectSelectDrag && this.RectSelectDrag.Type==4);
|
|
4233
|
+
var bShfitDragKLine=this.IsShfitDragKLine(e); //shift+鼠标移动K线
|
|
4212
4234
|
if (drag.CurrentMove)
|
|
4213
4235
|
{
|
|
4214
4236
|
drag.CurrentMove.X=e.clientX;
|
|
@@ -4316,7 +4338,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4316
4338
|
{
|
|
4317
4339
|
this.OnDragXCoordinateZoom(drag, {X:moveSetp, Y:moveSetpY}, e);
|
|
4318
4340
|
}
|
|
4319
|
-
else if ((bLButtonSelectRect || bRButtonSelectRect) && !isDragSelectRect && !isDragSubSelectRect) //左右键区间选择
|
|
4341
|
+
else if ((bLButtonSelectRect || bRButtonSelectRect) && !isDragSelectRect && !isDragSubSelectRect && !bShfitDragKLine) //左右键区间选择
|
|
4320
4342
|
{
|
|
4321
4343
|
var yMoveSetp=Math.abs(drag.LastMove.Y-e.clientY);
|
|
4322
4344
|
|
|
@@ -4428,6 +4450,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4428
4450
|
var isLeft=true;
|
|
4429
4451
|
if (drag.LastMove.X<e.clientX) isLeft=false;//右移数据
|
|
4430
4452
|
|
|
4453
|
+
//按住shift才能移动K线
|
|
4454
|
+
if (this.KLineDragConfig && this.KLineDragConfig.EnableShfit && !e.shiftKey) return;
|
|
4455
|
+
|
|
4431
4456
|
var cursorStatus="pointer";
|
|
4432
4457
|
var oneStepWidth=this.GetMoveOneStepWidth();
|
|
4433
4458
|
if (moveSetp<oneStepWidth)
|
|
@@ -4525,6 +4550,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4525
4550
|
var isDragSelectRect=(this.RectSelectDrag && this.RectSelectDrag.Index>=0);
|
|
4526
4551
|
var isDragSubSelectRect=(this.RectSelectDrag && this.RectSelectDrag.Type==4);
|
|
4527
4552
|
var bClearDrawPicture=true;
|
|
4553
|
+
var bShfitDragKLine=this.IsShfitDragKLine(e);
|
|
4528
4554
|
if (this.CurrentChartDrawPicture)
|
|
4529
4555
|
{
|
|
4530
4556
|
var drawPicture=this.CurrentChartDrawPicture;
|
|
@@ -4567,7 +4593,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4567
4593
|
{
|
|
4568
4594
|
if (this.OnMinuteSelectRectMouseUp) this.OnMinuteSelectRectMouseUp(e); //分时图区间选择
|
|
4569
4595
|
}
|
|
4570
|
-
else if (bLButtonSelectRect || bRButtonSelectRect) //K线图区间选择
|
|
4596
|
+
else if ((bLButtonSelectRect || bRButtonSelectRect) && !bShfitDragKLine) //K线图区间选择
|
|
4571
4597
|
{
|
|
4572
4598
|
var drag=this.MouseDrag;
|
|
4573
4599
|
drag.LastMove.X=e.clientX;
|
|
@@ -5856,6 +5882,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5856
5882
|
item.Draw();
|
|
5857
5883
|
}
|
|
5858
5884
|
|
|
5885
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_5);
|
|
5886
|
+
|
|
5859
5887
|
if (this.Frame.DrawOveraly)
|
|
5860
5888
|
this.Frame.DrawOveraly(true); //画叠加指标
|
|
5861
5889
|
|
|
@@ -5879,9 +5907,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5879
5907
|
item.Draw();
|
|
5880
5908
|
}
|
|
5881
5909
|
|
|
5910
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_8);
|
|
5911
|
+
|
|
5882
5912
|
if (this.Frame.DrawOveraly)
|
|
5883
5913
|
this.Frame.DrawOveraly(false); //画叠加指标
|
|
5884
5914
|
|
|
5915
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_10);
|
|
5916
|
+
|
|
5917
|
+
/*
|
|
5885
5918
|
//固定扩展图形
|
|
5886
5919
|
for(var i=0;i<this.ExtendChartPaint.length;++i)
|
|
5887
5920
|
{
|
|
@@ -5890,6 +5923,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5890
5923
|
if (item.DrawAfterPicture) continue;
|
|
5891
5924
|
if (!item.IsDynamic && item.IsAnimation==false) item.Draw();
|
|
5892
5925
|
}
|
|
5926
|
+
*/
|
|
5893
5927
|
|
|
5894
5928
|
if (this.Frame.DrawInsideHorizontal) this.Frame.DrawInsideHorizontal();
|
|
5895
5929
|
this.KLineIncreaseCustomHorizontal();
|
|
@@ -5918,6 +5952,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5918
5952
|
|
|
5919
5953
|
var moveonPoint=null;
|
|
5920
5954
|
if (this.LastMouseStatus && this.LastMouseStatus.MoveOnPoint) moveonPoint=this.LastMouseStatus.MoveOnPoint;
|
|
5955
|
+
|
|
5956
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_20, { MoveonPoint:moveonPoint} );
|
|
5957
|
+
|
|
5958
|
+
/*
|
|
5921
5959
|
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形
|
|
5922
5960
|
{
|
|
5923
5961
|
var item=this.ExtendChartPaint[i];
|
|
@@ -5929,6 +5967,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
5929
5967
|
if (item.DrawToolbar) item.DrawToolbar(moveonPoint);
|
|
5930
5968
|
}
|
|
5931
5969
|
}
|
|
5970
|
+
*/
|
|
5932
5971
|
|
|
5933
5972
|
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
5934
5973
|
{
|
|
@@ -6018,6 +6057,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6018
6057
|
item.Draw(moveonPoint, this.LastMouseStatus);
|
|
6019
6058
|
}
|
|
6020
6059
|
|
|
6060
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25);
|
|
6061
|
+
/*
|
|
6021
6062
|
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形
|
|
6022
6063
|
{
|
|
6023
6064
|
var item=this.ExtendChartPaint[i];
|
|
@@ -6025,7 +6066,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6025
6066
|
if (item.DrawAfterPicture) continue;
|
|
6026
6067
|
if (item.IsDynamic && item.DrawAfterTitle===true && item.IsAnimation==false) item.Draw();
|
|
6027
6068
|
}
|
|
6069
|
+
*/
|
|
6070
|
+
|
|
6071
|
+
if (this.EnableAnimation) this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_30);
|
|
6028
6072
|
|
|
6073
|
+
/*
|
|
6029
6074
|
if (this.EnableAnimation)
|
|
6030
6075
|
{
|
|
6031
6076
|
for(var i=0;i<this.ExtendChartPaint.length;++i) //动画
|
|
@@ -6034,6 +6079,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6034
6079
|
if (item.IsAnimation===true) item.Draw();
|
|
6035
6080
|
}
|
|
6036
6081
|
}
|
|
6082
|
+
*/
|
|
6037
6083
|
|
|
6038
6084
|
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
6039
6085
|
{
|
|
@@ -6052,12 +6098,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6052
6098
|
this.CurrentChartDrawPicture.Draw();
|
|
6053
6099
|
}
|
|
6054
6100
|
|
|
6101
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_50);
|
|
6102
|
+
/*
|
|
6055
6103
|
for(var i=0;i<this.ExtendChartPaint.length;++i) //画图工具绘制完成以后 动态扩展图形
|
|
6056
6104
|
{
|
|
6057
6105
|
var item=this.ExtendChartPaint[i];
|
|
6058
6106
|
if (item.DrawAfterPicture)
|
|
6059
6107
|
item.Draw();
|
|
6060
6108
|
}
|
|
6109
|
+
*/
|
|
6061
6110
|
|
|
6062
6111
|
this.OffscreenToShowCanvas();
|
|
6063
6112
|
|
|
@@ -6086,6 +6135,45 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6086
6135
|
++this.TouchDrawCount;
|
|
6087
6136
|
}
|
|
6088
6137
|
|
|
6138
|
+
this.DrawExtendChartPaint=function(level, option)
|
|
6139
|
+
{
|
|
6140
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.ExtendChartPaint)) return;
|
|
6141
|
+
|
|
6142
|
+
//扩展图形
|
|
6143
|
+
for(var i=0;i<this.ExtendChartPaint.length;++i)
|
|
6144
|
+
{
|
|
6145
|
+
var item=this.ExtendChartPaint[i];
|
|
6146
|
+
if (item.IsCallbackDraw) continue;
|
|
6147
|
+
|
|
6148
|
+
var value=item.GetPriority(); //绘图优先级
|
|
6149
|
+
if (value!=level) continue;
|
|
6150
|
+
|
|
6151
|
+
if (level==IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_20)
|
|
6152
|
+
{
|
|
6153
|
+
item.Draw();
|
|
6154
|
+
if (item.DrawToolbar && option) item.DrawToolbar(option.MoveonPoint, option.LastMouseStatus);
|
|
6155
|
+
}
|
|
6156
|
+
else if (level==IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25 && option)
|
|
6157
|
+
{
|
|
6158
|
+
if (item.ClassName=='KLineTooltipPaint' && option)
|
|
6159
|
+
{
|
|
6160
|
+
if (option.Tooltip==false) continue;
|
|
6161
|
+
if (option.Point) item.LatestPoint=option.Point;
|
|
6162
|
+
}
|
|
6163
|
+
else if (item.ClassName=="MinuteTooltipPaint" && option)
|
|
6164
|
+
{
|
|
6165
|
+
if (option.Point) item.LatestPoint=option.Point;
|
|
6166
|
+
}
|
|
6167
|
+
|
|
6168
|
+
item.Draw(option.MoveonPoint, option.LastMouseStatus);
|
|
6169
|
+
}
|
|
6170
|
+
else
|
|
6171
|
+
{
|
|
6172
|
+
item.Draw();
|
|
6173
|
+
}
|
|
6174
|
+
}
|
|
6175
|
+
}
|
|
6176
|
+
|
|
6089
6177
|
this.PtInButton=function(x, y)
|
|
6090
6178
|
{
|
|
6091
6179
|
var button=this.Frame.PtInButtons(x,y);
|
|
@@ -6398,6 +6486,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6398
6486
|
|
|
6399
6487
|
var moveonPoint=null;
|
|
6400
6488
|
if (this.LastMouseStatus && this.LastMouseStatus.MoveOnPoint) moveonPoint=this.LastMouseStatus.MoveOnPoint;
|
|
6489
|
+
|
|
6490
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_20, { MoveonPoint:moveonPoint, LastMouseStatus:this.LastMouseStatus } );
|
|
6491
|
+
|
|
6492
|
+
/*
|
|
6401
6493
|
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形
|
|
6402
6494
|
{
|
|
6403
6495
|
var item=this.ExtendChartPaint[i];
|
|
@@ -6409,6 +6501,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6409
6501
|
if (item.DrawToolbar) item.DrawToolbar(moveonPoint, this.LastMouseStatus);
|
|
6410
6502
|
}
|
|
6411
6503
|
}
|
|
6504
|
+
*/
|
|
6412
6505
|
|
|
6413
6506
|
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
6414
6507
|
{
|
|
@@ -6507,6 +6600,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6507
6600
|
item.Draw(moveonPoint, this.LastMouseStatus);
|
|
6508
6601
|
}
|
|
6509
6602
|
|
|
6603
|
+
|
|
6604
|
+
var exChartOption={ MoveonPoint:moveonPoint, LastMouseStatus:this.LastMouseStatus };
|
|
6605
|
+
if (option)
|
|
6606
|
+
{
|
|
6607
|
+
exChartOption.Tooltip=option.Tooltip;
|
|
6608
|
+
exChartOption.Point=option.Point;
|
|
6609
|
+
}
|
|
6610
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25,exChartOption);
|
|
6611
|
+
/*
|
|
6510
6612
|
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形 在动态标题以后画
|
|
6511
6613
|
{
|
|
6512
6614
|
var item=this.ExtendChartPaint[i];
|
|
@@ -6524,7 +6626,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6524
6626
|
|
|
6525
6627
|
if (item.IsDynamic && item.DrawAfterTitle===true) item.Draw(moveonPoint, this.LastMouseStatus);
|
|
6526
6628
|
}
|
|
6629
|
+
*/
|
|
6527
6630
|
|
|
6631
|
+
if (this.EnableAnimation) this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_30);
|
|
6632
|
+
/*
|
|
6528
6633
|
if (this.EnableAnimation)
|
|
6529
6634
|
{
|
|
6530
6635
|
for(var i=0;i<this.ExtendChartPaint.length;++i) //动画
|
|
@@ -6533,6 +6638,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6533
6638
|
if (item.IsAnimation===true) item.Draw();
|
|
6534
6639
|
}
|
|
6535
6640
|
}
|
|
6641
|
+
*/
|
|
6536
6642
|
|
|
6537
6643
|
for(var i=0;i<this.ChartDrawPicture.length;++i)
|
|
6538
6644
|
{
|
|
@@ -6554,12 +6660,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6554
6660
|
this.CurrentChartDrawPicture.Draw();
|
|
6555
6661
|
}
|
|
6556
6662
|
|
|
6663
|
+
this.DrawExtendChartPaint(IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_50);
|
|
6664
|
+
/*
|
|
6557
6665
|
for(var i=0;i<this.ExtendChartPaint.length;++i) //动态扩展图形
|
|
6558
6666
|
{
|
|
6559
6667
|
var item=this.ExtendChartPaint[i];
|
|
6560
6668
|
if (item.DrawAfterPicture)
|
|
6561
6669
|
item.Draw();
|
|
6562
6670
|
}
|
|
6671
|
+
*/
|
|
6563
6672
|
|
|
6564
6673
|
if (this.LastMouseStatus.MouseOnToolbar) //工具栏按钮提示信息
|
|
6565
6674
|
{
|
|
@@ -7036,7 +7145,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7036
7145
|
}
|
|
7037
7146
|
|
|
7038
7147
|
var draw=false;
|
|
7039
|
-
if (this.
|
|
7148
|
+
if (keyID==27 && this.PopMinuteChart && this.PopMinuteChart.IsShow())
|
|
7149
|
+
{
|
|
7150
|
+
this.PopMinuteChart.Close();
|
|
7151
|
+
draw=true;
|
|
7152
|
+
}
|
|
7153
|
+
else if (this.ChartCorssCursor && this.ChartCorssCursor.OnKeyDown) //十字光标 隐藏显示
|
|
7040
7154
|
{
|
|
7041
7155
|
var sendData={ e:e, KeyID:keyID, Draw:false, PreventDefault:false };
|
|
7042
7156
|
this.ChartCorssCursor.OnKeyDown(sendData);
|
|
@@ -7200,6 +7314,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7200
7314
|
this.CurrentChartDrawPicture=null;
|
|
7201
7315
|
}
|
|
7202
7316
|
break;
|
|
7317
|
+
case 13: //回车
|
|
7318
|
+
if (this.OnCustomKeyDown) this.OnCustomKeyDown(keyID, e);
|
|
7319
|
+
break;
|
|
7203
7320
|
default:
|
|
7204
7321
|
return;
|
|
7205
7322
|
}
|
|
@@ -7213,7 +7330,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7213
7330
|
|
|
7214
7331
|
this.OnDoubleClick=function(x,y,e)
|
|
7215
7332
|
{
|
|
7216
|
-
|
|
7333
|
+
|
|
7217
7334
|
}
|
|
7218
7335
|
|
|
7219
7336
|
this.ZoomIndexWindow=function(frameID, option) //最大化/最小化指标窗口
|
|
@@ -10569,6 +10686,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10569
10686
|
case JSCHART_MENU_ID.CMD_CORSS_POINT_ID:
|
|
10570
10687
|
if (IFrameSplitOperator.IsBool(srcParam) && this.ChartCorssCursor) this.ChartCorssCursor.CorssPointConfig.Enable=srcParam;
|
|
10571
10688
|
break;
|
|
10689
|
+
case JSCHART_MENU_ID.CMD_CORSS_DBCLICK_ID:
|
|
10690
|
+
if (IFrameSplitOperator.IsBool(srcParam) && this.ChartCorssCursor) this.ChartCorssCursor.EnableDBClick=srcParam;
|
|
10691
|
+
break;
|
|
10572
10692
|
case JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID:
|
|
10573
10693
|
if (IFrameSplitOperator.IsBool(srcParam) && this.ChartDragSelectRect) this.ChartDragSelectRect.EnableRButton=srcParam;
|
|
10574
10694
|
break;
|
|
@@ -45251,12 +45371,34 @@ function IExtendChartPainting()
|
|
|
45251
45371
|
this.IsCallbackDraw=false; //在回调函数里绘制, 不在Draw()中绘制
|
|
45252
45372
|
this.ID=Guid();
|
|
45253
45373
|
|
|
45374
|
+
this.DrawPriority=null; //绘图优先级
|
|
45375
|
+
|
|
45254
45376
|
//上下左右间距
|
|
45255
45377
|
this.Left=5;
|
|
45256
45378
|
this.Right=5;
|
|
45257
45379
|
this.Top=5;
|
|
45258
45380
|
this.Bottom=5;
|
|
45259
45381
|
|
|
45382
|
+
|
|
45383
|
+
this.GetPriority=function()
|
|
45384
|
+
{
|
|
45385
|
+
if (IFrameSplitOperator.IsNumber(this.DrawPriority)) return this.DrawPriority; //新版本
|
|
45386
|
+
|
|
45387
|
+
//老版本转换
|
|
45388
|
+
|
|
45389
|
+
if (!this.IsDynamic && !this.DrawAfterPicture) return IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_10;
|
|
45390
|
+
|
|
45391
|
+
if (this.DrawAfterTitle===false && this.IsAnimation==false) return IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_20;
|
|
45392
|
+
|
|
45393
|
+
if (this.DrawAfterTitle===true) return IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25;
|
|
45394
|
+
|
|
45395
|
+
if (this.IsAnimation===true) return IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_35;
|
|
45396
|
+
|
|
45397
|
+
if (this.DrawAfterPicture===true) IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_50;
|
|
45398
|
+
|
|
45399
|
+
return IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_50
|
|
45400
|
+
}
|
|
45401
|
+
|
|
45260
45402
|
this.Draw=function()
|
|
45261
45403
|
{
|
|
45262
45404
|
|
|
@@ -45293,6 +45435,23 @@ function IExtendChartPainting()
|
|
|
45293
45435
|
}
|
|
45294
45436
|
}
|
|
45295
45437
|
|
|
45438
|
+
//绘图优先级
|
|
45439
|
+
IExtendChartPainting.DRAW_PRIORITY_ID=
|
|
45440
|
+
{
|
|
45441
|
+
LEVEL_1:1,
|
|
45442
|
+
LEVEL_5:5, // 叠加指数图形前面 指标图形 IsDrawFirst=true
|
|
45443
|
+
LEVEL_8:8, // 叠加指数图形前面 指标图形 IsDrawFirst=false
|
|
45444
|
+
LEVEL_10:10, // IsDynamic=false
|
|
45445
|
+
|
|
45446
|
+
LEVEL_20:20, // IsDynamic=true
|
|
45447
|
+
|
|
45448
|
+
LEVEL_25:25, // DrawAfterTitle=true 标题栏绘制完成以后
|
|
45449
|
+
|
|
45450
|
+
LEVEL_35:35, // IsAnimation=true
|
|
45451
|
+
|
|
45452
|
+
LEVEL_50:50, // DrawAfterPicture=true; 是否在画图工具以后绘制
|
|
45453
|
+
}
|
|
45454
|
+
|
|
45296
45455
|
//K线Tooltip, 显示在左边或右边
|
|
45297
45456
|
function KLineTooltipPaint()
|
|
45298
45457
|
{
|
|
@@ -45312,6 +45471,7 @@ function KLineTooltipPaint()
|
|
|
45312
45471
|
this.AmountColor=g_JSChartResource.TooltipPaint.AmountColor; //成交金额
|
|
45313
45472
|
this.LatestPoint; //手势位置
|
|
45314
45473
|
this.ShowPosition=0; //显示位置 0=左 1=右
|
|
45474
|
+
this.DrawPriority=IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25;
|
|
45315
45475
|
|
|
45316
45476
|
this.Left=1*GetDevicePixelRatio();
|
|
45317
45477
|
this.Top=5*GetDevicePixelRatio();
|
|
@@ -46055,6 +46215,7 @@ function MinuteLeftTooltipPaint()
|
|
|
46055
46215
|
this.IsDynamic=true;
|
|
46056
46216
|
this.IsEraseBG=true;
|
|
46057
46217
|
this.DrawAfterTitle=true;
|
|
46218
|
+
this.DrawPriority=IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25;
|
|
46058
46219
|
this.ClassName='MinuteLeftTooltipPaint';
|
|
46059
46220
|
this.BorderColor=g_JSChartResource.PCTooltipPaint.BorderColor; //边框颜色
|
|
46060
46221
|
this.BGColor=g_JSChartResource.PCTooltipPaint.BGColor; //背景色
|
|
@@ -46465,6 +46626,7 @@ function StockChip()
|
|
|
46465
46626
|
this.PixelRatio=GetDevicePixelRatio();
|
|
46466
46627
|
this.ShowType=0; //0=所有筹码 1=周期前 2=周期内
|
|
46467
46628
|
this.IsDynamic=true;
|
|
46629
|
+
this.DrawPriority=IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_20;
|
|
46468
46630
|
this.ClientRect={};
|
|
46469
46631
|
this.Font=g_JSChartResource.StockChip.Font;
|
|
46470
46632
|
this.InfoColor=g_JSChartResource.StockChip.InfoColor;
|
|
@@ -50144,6 +50306,7 @@ function FrameButtomToolbarPaint()
|
|
|
50144
50306
|
this.FrameGuid=null;
|
|
50145
50307
|
this.IsDynamic=true;
|
|
50146
50308
|
this.DrawAfterTitle=true;
|
|
50309
|
+
this.DrawPriority=IExtendChartPainting.DRAW_PRIORITY_ID.LEVEL_25;
|
|
50147
50310
|
|
|
50148
50311
|
this.AryButton=[]; // { Title:, ID:, Data:数据, TooltipText:提示信息 }
|
|
50149
50312
|
this.SelectedID=null; // 选中按钮ID
|
|
@@ -54289,6 +54452,7 @@ function ChartCorssCursor()
|
|
|
54289
54452
|
this.CallAcutionXOperator;
|
|
54290
54453
|
|
|
54291
54454
|
this.EnableKeyboard=false; //是否支持键盘隐藏显示
|
|
54455
|
+
this.EnableDBClick=false; //是否允许双击显示|隐藏十字光标
|
|
54292
54456
|
this.OnChangeStatusCallback; //状态切换以后回调
|
|
54293
54457
|
|
|
54294
54458
|
|
|
@@ -55517,6 +55681,27 @@ function ChartCorssCursor()
|
|
|
55517
55681
|
}
|
|
55518
55682
|
}
|
|
55519
55683
|
|
|
55684
|
+
this.OnDBClick=function(data)
|
|
55685
|
+
{
|
|
55686
|
+
if (!this.EnableDBClick) return;
|
|
55687
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.Frame.SubFrame)) return;
|
|
55688
|
+
|
|
55689
|
+
//在主图框架内
|
|
55690
|
+
var frame=this.Frame.SubFrame[0].Frame;
|
|
55691
|
+
if (!frame) return;
|
|
55692
|
+
|
|
55693
|
+
var border=frame.GetBorder();
|
|
55694
|
+
var rtClient={ Left:border.Left, Top:border.Top, Bottom:border.Bottom, Right:border.Right };
|
|
55695
|
+
var x=data.X, y=data.Y;
|
|
55696
|
+
if (x>=rtClient.Left && x<=rtClient.Right && y>=rtClient.Top && y<=rtClient.Bottom)
|
|
55697
|
+
{
|
|
55698
|
+
this.IsShowCorss=!this.IsShowCorss
|
|
55699
|
+
data.Draw=true;
|
|
55700
|
+
|
|
55701
|
+
if (this.OnChangeStatusCallback) this.OnChangeStatusCallback({ Type:1, IsShowCorss:this.IsShowCorss }, this);
|
|
55702
|
+
}
|
|
55703
|
+
}
|
|
55704
|
+
|
|
55520
55705
|
|
|
55521
55706
|
this.DrawCorssPoint=function(x,y)
|
|
55522
55707
|
{
|
|
@@ -76338,6 +76523,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76338
76523
|
{ KeyID:87, SecondKeyID:3, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
76339
76524
|
]
|
|
76340
76525
|
|
|
76526
|
+
this.KLineDragConfig={ EnableShfit:false }; //是否启动Shift+鼠标拖动K线
|
|
76527
|
+
|
|
76341
76528
|
this.GetKLineCalulate=function()
|
|
76342
76529
|
{
|
|
76343
76530
|
var kLineDrawType=this.GetKLineDrawType();
|
|
@@ -77410,6 +77597,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77410
77597
|
this.MoveCorssCursorDown(this.ShiftUpDownStepPixel);
|
|
77411
77598
|
return true;
|
|
77412
77599
|
}
|
|
77600
|
+
else if (keyID==13) //回车显示分时图
|
|
77601
|
+
{
|
|
77602
|
+
this.OnEnterKeyDown();
|
|
77603
|
+
}
|
|
77413
77604
|
else
|
|
77414
77605
|
{
|
|
77415
77606
|
return false;
|
|
@@ -77549,6 +77740,30 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77549
77740
|
this.ShowTooltipByKeyDown();
|
|
77550
77741
|
}
|
|
77551
77742
|
|
|
77743
|
+
this.OnEnterKeyDown=function()
|
|
77744
|
+
{
|
|
77745
|
+
if (!this.PopMinuteChart) return false;
|
|
77746
|
+
if (!ChartData.IsDayPeriod(this.Period,true)) return false; //只支持日K
|
|
77747
|
+
if (!this.ChartCorssCursor || !this.ChartCorssCursor.IsShowCorss || this.ChartCorssCursor.ClientPos<0) return false;
|
|
77748
|
+
var index=this.ChartCorssCursor.CursorIndex;
|
|
77749
|
+
index=parseInt(index.toFixed(0));
|
|
77750
|
+
var kData=this.GetKData();
|
|
77751
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return false;
|
|
77752
|
+
var dataIndex=kData.DataOffset+index;
|
|
77753
|
+
if (dataIndex<0 || dataIndex>=kData.Data.length) return false;
|
|
77754
|
+
|
|
77755
|
+
var kItem = kData.Data[dataIndex];
|
|
77756
|
+
if (!kItem) return false;
|
|
77757
|
+
|
|
77758
|
+
var frame=this.Frame.SubFrame[0].Frame;
|
|
77759
|
+
var x=frame.GetXFromIndex(index);
|
|
77760
|
+
var y=frame.GetYFromData(kItem.Close);
|
|
77761
|
+
|
|
77762
|
+
var data={ Chart:this, Tooltip:{ ChartPaint:this.ChartPaint[0], Data:kItem } };
|
|
77763
|
+
|
|
77764
|
+
this.ShowMinuteChartDialog(data, x, y);
|
|
77765
|
+
}
|
|
77766
|
+
|
|
77552
77767
|
//获取K线图实例
|
|
77553
77768
|
this.GetKLineChart=function()
|
|
77554
77769
|
{
|
|
@@ -82306,12 +82521,14 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82306
82521
|
var bCorssDrawKLine=false;
|
|
82307
82522
|
var bCorssDrawVaildTime=false;
|
|
82308
82523
|
var bCorssDrawPoint=false;
|
|
82524
|
+
var bCorssBCClick=false;
|
|
82309
82525
|
if (this.ChartCorssCursor)
|
|
82310
82526
|
{
|
|
82311
82527
|
bShowCorss=this.ChartCorssCursor.IsShowCorss;
|
|
82312
82528
|
bCorssDrawKLine=this.ChartCorssCursor.IsOnlyDrawKLine && this.ChartCorssCursor.IsShowClose;
|
|
82313
82529
|
bCorssDrawVaildTime=this.ChartCorssCursor.IsFixXLastTime;
|
|
82314
82530
|
bCorssDrawPoint=this.ChartCorssCursor.CorssPointConfig.Enable;
|
|
82531
|
+
bCorssBCClick=this.ChartCorssCursor.EnableDBClick;
|
|
82315
82532
|
}
|
|
82316
82533
|
|
|
82317
82534
|
var bPopMinuteChart=false;
|
|
@@ -82497,6 +82714,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82497
82714
|
{ Name:"显示在K线上", Data:{ ID:JSCHART_MENU_ID.CMD_CORSS_ON_KLINE_ID, Args:[!bCorssDrawKLine]}, Checked:bCorssDrawKLine },
|
|
82498
82715
|
{ Name:"画在有效X轴上",Data:{ ID:JSCHART_MENU_ID.CMD_CORSS_ON_VAILD_TIME_ID, Args:[!bCorssDrawVaildTime]}, Checked:bCorssDrawVaildTime },
|
|
82499
82716
|
{ Name:"画圆点",Data:{ ID:JSCHART_MENU_ID.CMD_CORSS_POINT_ID, Args:[!bCorssDrawPoint]}, Checked:bCorssDrawPoint },
|
|
82717
|
+
{ Name:"双击显示/隐藏", Data:{ ID:JSCHART_MENU_ID.CMD_CORSS_DBCLICK_ID, Args:[!bCorssBCClick]}, Checked:bCorssBCClick },
|
|
82500
82718
|
]
|
|
82501
82719
|
},
|
|
82502
82720
|
{
|
|
@@ -82970,6 +83188,14 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82970
83188
|
|
|
82971
83189
|
this.OnDoubleClick=function(x,y,e)
|
|
82972
83190
|
{
|
|
83191
|
+
var bDraw=false;
|
|
83192
|
+
if (this.ChartCorssCursor)
|
|
83193
|
+
{
|
|
83194
|
+
var data={ e:e, X:x, Y:y, Draw:false };
|
|
83195
|
+
this.ChartCorssCursor.OnDBClick(data);
|
|
83196
|
+
bDraw=data.Draw
|
|
83197
|
+
}
|
|
83198
|
+
|
|
82973
83199
|
if (this.EnableYDrag && (this.EnableYDrag.Left || this.EnableYDrag.Right) && this.Frame && this.Frame.PtInFrameY)
|
|
82974
83200
|
{
|
|
82975
83201
|
var pixelTatio = GetDevicePixelRatio();
|
|
@@ -83006,6 +83232,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
83006
83232
|
}
|
|
83007
83233
|
}
|
|
83008
83234
|
|
|
83235
|
+
if (bDraw) this.Draw();
|
|
83236
|
+
|
|
83009
83237
|
var tooltip=new TooltipData();
|
|
83010
83238
|
if (!this.PtInChartPaintTooltip(x,y,tooltip))
|
|
83011
83239
|
{
|
|
@@ -86567,12 +86795,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86567
86795
|
var bCorssDrawCloseLine=false; //十字光标只能画在走势图价格线上
|
|
86568
86796
|
var bCorssDrawVaildTime=false;
|
|
86569
86797
|
var bCorssDrawPoint=false;
|
|
86798
|
+
var bCorssBCClick=false;
|
|
86570
86799
|
if (this.ChartCorssCursor)
|
|
86571
86800
|
{
|
|
86572
86801
|
bShowCorss=this.ChartCorssCursor.IsShowCorss;
|
|
86573
86802
|
bCorssDrawCloseLine=this.ChartCorssCursor.IsOnlyDrawMinute;
|
|
86574
86803
|
bCorssDrawVaildTime=this.ChartCorssCursor.IsFixXLastTime;
|
|
86575
86804
|
bCorssDrawPoint=this.ChartCorssCursor.CorssPointConfig.Enable;
|
|
86805
|
+
bCorssBCClick=this.ChartCorssCursor.EnableDBClick;
|
|
86576
86806
|
}
|
|
86577
86807
|
|
|
86578
86808
|
var bRButtonSelectRect=false,bLButtonSelectRect=false;
|
|
@@ -86669,6 +86899,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86669
86899
|
{ Name:"画在价格线上", Data:{ ID:JSCHART_MENU_ID.CMD_CORSS_ON_CLOSE_LINE_ID, Args:[!bCorssDrawCloseLine]}, Checked:bCorssDrawCloseLine },
|
|
86670
86900
|
{ Name:"画在有效X轴上",Data:{ ID:JSCHART_MENU_ID.CMD_CORSS_ON_VAILD_TIME_ID, Args:[!bCorssDrawVaildTime]}, Checked:bCorssDrawVaildTime },
|
|
86671
86901
|
{ Name:"画圆点",Data:{ ID:JSCHART_MENU_ID.CMD_CORSS_POINT_ID, Args:[!bCorssDrawPoint]}, Checked:bCorssDrawPoint },
|
|
86902
|
+
{ Name:"双击显示/隐藏", Data:{ ID:JSCHART_MENU_ID.CMD_CORSS_DBCLICK_ID, Args:[!bCorssBCClick]}, Checked:bCorssBCClick },
|
|
86672
86903
|
]
|
|
86673
86904
|
},
|
|
86674
86905
|
|
|
@@ -86809,6 +87040,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86809
87040
|
{
|
|
86810
87041
|
JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]", e);
|
|
86811
87042
|
|
|
87043
|
+
var bDraw=false;
|
|
87044
|
+
if (this.ChartCorssCursor)
|
|
87045
|
+
{
|
|
87046
|
+
var data={ e:e, X:x, Y:y, Draw:false };
|
|
87047
|
+
this.ChartCorssCursor.OnDBClick(data);
|
|
87048
|
+
bDraw=data.Draw
|
|
87049
|
+
}
|
|
87050
|
+
|
|
86812
87051
|
if (this.EnableYDrag && (this.EnableYDrag.Left || this.EnableYDrag.Right) && this.Frame && this.Frame.PtInFrameY)
|
|
86813
87052
|
{
|
|
86814
87053
|
var pixelTatio = GetDevicePixelRatio();
|
|
@@ -86846,10 +87085,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86846
87085
|
if (this.ZoomIndexWindow(frameId, {X:x, Y:y}))
|
|
86847
87086
|
{
|
|
86848
87087
|
this.Frame.SetSizeChage(true);
|
|
86849
|
-
|
|
87088
|
+
bDraw=true;
|
|
86850
87089
|
}
|
|
86851
87090
|
}
|
|
86852
87091
|
}
|
|
87092
|
+
|
|
87093
|
+
if (bDraw) this.Draw();
|
|
86853
87094
|
}
|
|
86854
87095
|
|
|
86855
87096
|
this.GetDataItem=function(pointInfo)
|