hqchart 1.1.14593 → 1.1.14604
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 +44 -30
- package/package.json +1 -1
- package/src/jscommon/umychart.PopKeyboard.js +9 -0
- package/src/jscommon/umychart.js +166 -16
- package/src/jscommon/umychart.report.js +107 -12
- package/src/jscommon/umychart.style.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +275 -30
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +284 -30
package/package.json
CHANGED
|
@@ -58,6 +58,15 @@ function JSPopKeyboard()
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
this.Destroy=function()
|
|
62
|
+
{
|
|
63
|
+
if (this.DivDialog) document.body.removeChild(this.DivDialog);
|
|
64
|
+
this.DivDialog=null;
|
|
65
|
+
this.TitleBox=null;
|
|
66
|
+
if (!this.Keyboard.JSChart) this.Keyboard.JSChart.ChartDestory();
|
|
67
|
+
this.Keyboard.JSChart=null;
|
|
68
|
+
}
|
|
69
|
+
|
|
61
70
|
this.Create=function()
|
|
62
71
|
{
|
|
63
72
|
var divDom=document.createElement('div');
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -317,6 +317,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
317
317
|
{
|
|
318
318
|
var item=option.EnableXDrag;
|
|
319
319
|
if (IFrameSplitOperator.IsBool(item.Bottom)) chart.EnableXDrag.Bottom=item.Bottom;
|
|
320
|
+
if (item.LButton && IFrameSplitOperator.IsNumber(item.LButton.Type)) chart.EnableXDrag.LButton.Type=item.LButton.Type;
|
|
321
|
+
if (item.RButton && IFrameSplitOperator.IsNumber(item.RButton.Type)) chart.EnableXDrag.RButton.Type=item.RButton.Type;
|
|
320
322
|
}
|
|
321
323
|
|
|
322
324
|
if (option.KLineTooltip)
|
|
@@ -875,6 +877,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
875
877
|
if (IFrameSplitOperator.IsBool(option.EnableIndexChartDrag)) chart.EnableIndexChartDrag=option.EnableIndexChartDrag;
|
|
876
878
|
if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
|
|
877
879
|
if (IFrameSplitOperator.IsBool(option.EnableNightDayBG)) chart.EnableNightDayBG=option.EnableNightDayBG;
|
|
880
|
+
if (IFrameSplitOperator.IsNumber(option.MaxDayCount)) chart.MaxDayCount=option.MaxDayCount;
|
|
878
881
|
|
|
879
882
|
//老版本开启左键区间选择
|
|
880
883
|
if (IFrameSplitOperator.IsBool(option.EnableSelectRect))
|
|
@@ -2508,6 +2511,17 @@ JSChart.GetfloatPrecision=function(symbol)
|
|
|
2508
2511
|
return GetfloatPrecision(symbol);
|
|
2509
2512
|
}
|
|
2510
2513
|
|
|
2514
|
+
//获取不带后缀的代码
|
|
2515
|
+
JSChart.GetShortSymbol=function(symbol)
|
|
2516
|
+
{
|
|
2517
|
+
if (IFrameSplitOperator.IsString(symbol)) return null;
|
|
2518
|
+
var pos=symbol.lastIndexOf(".");
|
|
2519
|
+
if (pos<=0) return symbol;
|
|
2520
|
+
|
|
2521
|
+
return symbol.slice(0,pos);
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
|
|
2511
2525
|
var JSCHART_EVENT_ID=
|
|
2512
2526
|
{
|
|
2513
2527
|
//RECV_KLINE_MATCH:1, //接收到形态匹配
|
|
@@ -3106,7 +3120,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3106
3120
|
Wheel:false, WheelYMove:5 //是否可以滚轴缩放Y轴最大最小值
|
|
3107
3121
|
};
|
|
3108
3122
|
|
|
3109
|
-
this.EnableXDrag={ Bottom:true }; //X轴拖动缩放
|
|
3123
|
+
this.EnableXDrag={ Bottom:true, LButton:{ Type:1 }, RButton:{ Type:2 } }; //X轴拖动缩放 Type: 1=拖动K线 2=缩放K线
|
|
3110
3124
|
|
|
3111
3125
|
this.EnableZoomIndexWindow=false; //是否支持双击缩放附图窗口
|
|
3112
3126
|
this.EnableVerifyRecvData=false; //是否检测接收到的数据
|
|
@@ -3673,7 +3687,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3673
3687
|
|
|
3674
3688
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
3675
3689
|
if (!this.IsShowRightMenu) return;
|
|
3676
|
-
if (this.PreventRightMenu.Enable)
|
|
3690
|
+
if (this.PreventRightMenu.Enable)
|
|
3691
|
+
{
|
|
3692
|
+
this.PreventRightMenu.Enable=false; //生效一次就可以
|
|
3693
|
+
return;
|
|
3694
|
+
}
|
|
3677
3695
|
|
|
3678
3696
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
3679
3697
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
@@ -4336,7 +4354,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4336
4354
|
}
|
|
4337
4355
|
else if (drag.Click && drag.Click.IsInFrameBottom)
|
|
4338
4356
|
{
|
|
4339
|
-
this.
|
|
4357
|
+
var dragType=this.GetDragXCoordinateType(e,"DocOnMouseMove");
|
|
4358
|
+
|
|
4359
|
+
if (dragType==2)
|
|
4360
|
+
this.OnDragXCoordinateZoom(drag, {X:moveSetp, Y:moveSetpY}, e);
|
|
4361
|
+
else if (dragType==1)
|
|
4362
|
+
this.OnDragXCoordinateKLine(drag, {X:moveSetp, Y:moveSetpY}, e);
|
|
4340
4363
|
}
|
|
4341
4364
|
else if ((bLButtonSelectRect || bRButtonSelectRect) && !isDragSelectRect && !isDragSubSelectRect && !bShfitDragKLine) //左右键区间选择
|
|
4342
4365
|
{
|
|
@@ -4359,6 +4382,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4359
4382
|
}
|
|
4360
4383
|
}
|
|
4361
4384
|
|
|
4385
|
+
//X轴坐标拖动 缩放K线
|
|
4362
4386
|
this.OnDragXCoordinateZoom=function(drag, moveData, e)
|
|
4363
4387
|
{
|
|
4364
4388
|
var moveSetp=moveData.X;
|
|
@@ -4391,6 +4415,56 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4391
4415
|
this.SetCursor({Cursor:cursorStatus});
|
|
4392
4416
|
}
|
|
4393
4417
|
|
|
4418
|
+
//X轴坐标拖动 拖动K线
|
|
4419
|
+
this.OnDragXCoordinateKLine=function(drag, moveData, e)
|
|
4420
|
+
{
|
|
4421
|
+
var moveSetpX=moveData.X;
|
|
4422
|
+
var moveSetpY=moveData.Y;
|
|
4423
|
+
|
|
4424
|
+
if (moveSetpX<5) return false;
|
|
4425
|
+
|
|
4426
|
+
var isLeft=true;
|
|
4427
|
+
if (drag.LastMove.X<e.clientX) isLeft=false; //右移数据
|
|
4428
|
+
|
|
4429
|
+
var cursorStatus="pointer";
|
|
4430
|
+
var oneStepWidth=this.GetMoveOneStepWidth();
|
|
4431
|
+
if (moveSetpX<oneStepWidth)
|
|
4432
|
+
{
|
|
4433
|
+
this.SetCursor({Cursor:cursorStatus});
|
|
4434
|
+
return false;
|
|
4435
|
+
}
|
|
4436
|
+
|
|
4437
|
+
var bNeedDraw=false;
|
|
4438
|
+
if(this.DataMove(moveSetpX,isLeft))
|
|
4439
|
+
{
|
|
4440
|
+
this.UpdataDataoffset();
|
|
4441
|
+
//this.UpdatePointByCursorIndex(); //推拽数据的时候不需要把鼠标位置更新到K线上
|
|
4442
|
+
this.UpdateFrameMaxMin();
|
|
4443
|
+
this.ResetFrameXYSplit();
|
|
4444
|
+
bNeedDraw=true;
|
|
4445
|
+
}
|
|
4446
|
+
else
|
|
4447
|
+
{
|
|
4448
|
+
if (this.DragDownloadData)
|
|
4449
|
+
{
|
|
4450
|
+
this.DragDownloadData();
|
|
4451
|
+
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash) return true;
|
|
4452
|
+
}
|
|
4453
|
+
}
|
|
4454
|
+
|
|
4455
|
+
drag.LastMove.X=e.clientX;
|
|
4456
|
+
this.SetCursor({Cursor:cursorStatus});
|
|
4457
|
+
|
|
4458
|
+
if (bNeedDraw)
|
|
4459
|
+
{
|
|
4460
|
+
this.Draw();
|
|
4461
|
+
this.OnKLinePageChange("datamove");
|
|
4462
|
+
}
|
|
4463
|
+
|
|
4464
|
+
return true;
|
|
4465
|
+
}
|
|
4466
|
+
|
|
4467
|
+
|
|
4394
4468
|
this.OnDragMode_One=function(moveData, e)
|
|
4395
4469
|
{
|
|
4396
4470
|
var moveSetp=moveData.X;
|
|
@@ -4494,6 +4568,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4494
4568
|
}
|
|
4495
4569
|
}
|
|
4496
4570
|
|
|
4571
|
+
|
|
4497
4572
|
this.GetXDataIndex=function(obj)
|
|
4498
4573
|
{
|
|
4499
4574
|
if (!this.ChartPaint[0] || !this.ChartPaint[0].Data) return false;
|
|
@@ -4593,6 +4668,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4593
4668
|
{
|
|
4594
4669
|
if (this.OnMinuteSelectRectMouseUp) this.OnMinuteSelectRectMouseUp(e); //分时图区间选择
|
|
4595
4670
|
}
|
|
4671
|
+
else if (this.MouseDrag && this.MouseDrag.Click && this.MouseDrag.Click.IsInFrameBottom)
|
|
4672
|
+
{
|
|
4673
|
+
if (e && e.button===2 && this.EnableXDrag.RButton.Type>=1) this.PreventRightMenu.Enable=true;
|
|
4674
|
+
}
|
|
4596
4675
|
else if ((bLButtonSelectRect || bRButtonSelectRect) && !bShfitDragKLine) //K线图区间选择
|
|
4597
4676
|
{
|
|
4598
4677
|
var drag=this.MouseDrag;
|
|
@@ -6924,7 +7003,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6924
7003
|
//X轴拖动缩放
|
|
6925
7004
|
if (this.ClassName=="KLineChartContainer" && this.EnableXDrag.Bottom && this.Frame.PtInFrameBottom(x,y))
|
|
6926
7005
|
{
|
|
6927
|
-
|
|
7006
|
+
//var dragType=this.GetDragXCoordinateType(e,"OnMouseMove");
|
|
7007
|
+
//mouseStatus={ Cursor:"pointer", Name:"FrameButtom"};
|
|
6928
7008
|
JSConsole.Chart.Log("[JSChartContainer::OnMouseMove] frame bottom ");
|
|
6929
7009
|
}
|
|
6930
7010
|
|
|
@@ -10469,7 +10549,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10469
10549
|
if (this.ClearKLineInfo) this.ClearKLineInfo();
|
|
10470
10550
|
break;
|
|
10471
10551
|
case JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID:
|
|
10472
|
-
if (param!=null)
|
|
10552
|
+
if (param!=null)
|
|
10553
|
+
{
|
|
10554
|
+
this.DragMode=param;
|
|
10555
|
+
if (this.DragMode==1 && IFrameSplitOperator.IsBool(aryArgs[1])) //shift+左键拖动
|
|
10556
|
+
this.KLineDragConfig.EnableShfit=aryArgs[1];
|
|
10557
|
+
}
|
|
10473
10558
|
break;
|
|
10474
10559
|
case JSCHART_MENU_ID.CMD_CHANGE_BG_SPLIT_ID:
|
|
10475
10560
|
if (IFrameSplitOperator.IsBool(srcParam))
|
|
@@ -10723,6 +10808,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10723
10808
|
break;
|
|
10724
10809
|
case JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID:
|
|
10725
10810
|
if (IFrameSplitOperator.IsBool(srcParam)) this.EnableXDrag.Bottom=srcParam;
|
|
10811
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryArgs) && IFrameSplitOperator.IsNumber(aryArgs[1])) this.EnableXDrag.LButton.Type=aryArgs[1];
|
|
10812
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryArgs) && IFrameSplitOperator.IsNumber(aryArgs[2])) this.EnableXDrag.RButton.Type=aryArgs[2];
|
|
10726
10813
|
break;
|
|
10727
10814
|
case JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID:
|
|
10728
10815
|
this.FullScreenSummary();
|
|
@@ -11174,6 +11261,17 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11174
11261
|
return true;
|
|
11175
11262
|
}
|
|
11176
11263
|
|
|
11264
|
+
this.GetDragXCoordinateType=function(event, funcName)
|
|
11265
|
+
{
|
|
11266
|
+
if (funcName=="DocOnMouseMove")
|
|
11267
|
+
{
|
|
11268
|
+
if (event.buttons==1) return this.EnableXDrag.LButton.Type; //左键
|
|
11269
|
+
else if (event.buttons==2) return this.EnableXDrag.RButton.Type;//右键
|
|
11270
|
+
}
|
|
11271
|
+
|
|
11272
|
+
return null;
|
|
11273
|
+
}
|
|
11274
|
+
|
|
11177
11275
|
this.OnMarkRectSelect=function(e)
|
|
11178
11276
|
{
|
|
11179
11277
|
var corssCursor=this.ChartCorssCursor; //十字光标
|
|
@@ -82747,10 +82845,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82747
82845
|
Name:"其他设置",
|
|
82748
82846
|
SubMenu:
|
|
82749
82847
|
[
|
|
82750
|
-
|
|
82751
|
-
{ Name:"禁止拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
82752
|
-
{ Name:"启动拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1]}, Checked:1==this.DragMode },
|
|
82753
|
-
{ Name:"X轴拖动缩放", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
|
|
82754
82848
|
{ Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID, Args:[!bLButtonSelectRect]}, Checked:bLButtonSelectRect },
|
|
82755
82849
|
{ Name:"右键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID, Args:[!bRButtonSelectRect]}, Checked:bRButtonSelectRect },
|
|
82756
82850
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
@@ -82807,6 +82901,27 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82807
82901
|
{ Name:"启用", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{Enable:!this.KLineTooltipConfig.Enable}]}, Checked:this.KLineTooltipConfig.Enable },
|
|
82808
82902
|
{ Name:"键盘左右显示", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{EnableKeyDown:!this.KLineTooltipConfig.EnableKeyDown}]}, Checked:this.KLineTooltipConfig.EnableKeyDown },
|
|
82809
82903
|
]
|
|
82904
|
+
},
|
|
82905
|
+
{
|
|
82906
|
+
Name:"X轴拖动",
|
|
82907
|
+
SubMenu:
|
|
82908
|
+
[
|
|
82909
|
+
{ Name:"启动", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
|
|
82910
|
+
{ Name:"左键拖动K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, this.EnableXDrag.LButton.Type===1?0:1]}, Checked:this.EnableXDrag.LButton.Type===1 && this.EnableXDrag.Bottom },
|
|
82911
|
+
{ Name:"左键缩放K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, this.EnableXDrag.LButton.Type===2?0:2]}, Checked:this.EnableXDrag.LButton.Type===2 && this.EnableXDrag.Bottom },
|
|
82912
|
+
|
|
82913
|
+
{ Name:"右键拖动K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, null, this.EnableXDrag.RButton.Type===1?0:1]}, Checked:this.EnableXDrag.RButton.Type===1 && this.EnableXDrag.Bottom },
|
|
82914
|
+
{ Name:"右键缩放K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, null, this.EnableXDrag.RButton.Type===2?0:2]}, Checked:this.EnableXDrag.RButton.Type===2 && this.EnableXDrag.Bottom },
|
|
82915
|
+
]
|
|
82916
|
+
},
|
|
82917
|
+
{
|
|
82918
|
+
Name:"K线拖动",
|
|
82919
|
+
SubMenu:
|
|
82920
|
+
[
|
|
82921
|
+
{ Name:"禁用", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
82922
|
+
{ Name:"左键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, false]}, Checked:1==(this.DragMode && !this.KLineDragConfig.EnableShfit) },
|
|
82923
|
+
{ Name:"Shift+左键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, true]}, Checked:1==(this.DragMode && this.KLineDragConfig.EnableShfit) },
|
|
82924
|
+
]
|
|
82810
82925
|
}
|
|
82811
82926
|
]
|
|
82812
82927
|
}
|
|
@@ -85021,6 +85136,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85021
85136
|
this.AutoUpdateTimer; //自动更新定时器
|
|
85022
85137
|
this.TradeDate=0; //行情交易日期
|
|
85023
85138
|
this.DayCount=1; //显示几天的数据
|
|
85139
|
+
this.MaxDayCount=-1; //最大显示天数 -1 无限制
|
|
85024
85140
|
this.DayData; //多日分钟数据
|
|
85025
85141
|
this.LimitPrice; //涨停价格 { Max:null, Min:null };
|
|
85026
85142
|
|
|
@@ -85581,8 +85697,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85581
85697
|
if (!startItem || !endItem) return;
|
|
85582
85698
|
|
|
85583
85699
|
JSConsole.Chart.Log('[MinuteChartContainer::UpdateSelectRect]',startItem,endItem);
|
|
85584
|
-
paint.SetPoint(startItem, { Index:0 });
|
|
85585
|
-
paint.SetPoint(endItem, { Index:1
|
|
85700
|
+
paint.SetPoint(startItem, { Index:0 , DataIndex:start });
|
|
85701
|
+
paint.SetPoint(endItem, { Index:1,DataIndex:end });
|
|
85586
85702
|
|
|
85587
85703
|
this.Draw();
|
|
85588
85704
|
}
|
|
@@ -85609,7 +85725,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85609
85725
|
var item = kData.Data[dataIndex];
|
|
85610
85726
|
JSConsole.Chart.Log("[MinuteChartContainer::MoveRectSelectPoint] point, item", obj.PointIndex, item);
|
|
85611
85727
|
|
|
85612
|
-
if (!paint.SetPoint(item,{ Index: obj.PointIndex })) return false;
|
|
85728
|
+
if (!paint.SetPoint(item,{ Index: obj.PointIndex,DataIndex:dataIndex })) return false;
|
|
85613
85729
|
|
|
85614
85730
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_DRAG_SELECT_RECT);
|
|
85615
85731
|
if (event)
|
|
@@ -87045,10 +87161,22 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87045
87161
|
|
|
87046
87162
|
if (x>=rtClient.Left && x<=rtClient.Right && y>=rtClient.Top && y<=rtClient.Bottom ) isInClient=true;
|
|
87047
87163
|
|
|
87048
|
-
|
|
87164
|
+
var bPreventDefault=false;
|
|
87165
|
+
if (this.OnWheel_ChangeDayCount(e,x,y)) //ctrl+上下滚轴
|
|
87166
|
+
{
|
|
87167
|
+
bPreventDefault=true;
|
|
87168
|
+
}
|
|
87169
|
+
else
|
|
87170
|
+
{
|
|
87171
|
+
if (this.OnWheel_ZoomUpDownFrameY(e,x,y))
|
|
87172
|
+
bPreventDefault=true;
|
|
87173
|
+
}
|
|
87049
87174
|
|
|
87050
|
-
if
|
|
87051
|
-
|
|
87175
|
+
if (bPreventDefault)
|
|
87176
|
+
{
|
|
87177
|
+
if(e.preventDefault) e.preventDefault();
|
|
87178
|
+
else e.returnValue = false;
|
|
87179
|
+
}
|
|
87052
87180
|
}
|
|
87053
87181
|
|
|
87054
87182
|
//通过滚轴缩放Y轴
|
|
@@ -87078,6 +87206,28 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87078
87206
|
return true;
|
|
87079
87207
|
}
|
|
87080
87208
|
|
|
87209
|
+
this.OnWheel_ChangeDayCount=function(e, x, y)
|
|
87210
|
+
{
|
|
87211
|
+
if (!e.ctrlKey) return false;
|
|
87212
|
+
|
|
87213
|
+
var wheelValue=e.wheelDelta;
|
|
87214
|
+
if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
|
|
87215
|
+
wheelValue=e.deltaY* -0.01;
|
|
87216
|
+
|
|
87217
|
+
var value=wheelValue>=0?-1:1;
|
|
87218
|
+
var dayCount=this.DayCount;
|
|
87219
|
+
|
|
87220
|
+
dayCount+=value;
|
|
87221
|
+
if (IFrameSplitOperator.IsPlusNumber(dayCount))
|
|
87222
|
+
{
|
|
87223
|
+
if (IFrameSplitOperator.IsPlusNumber(this.MaxDayCount) && dayCount>this.MaxDayCount) return true;
|
|
87224
|
+
|
|
87225
|
+
this.ChangeDayCount(dayCount);
|
|
87226
|
+
}
|
|
87227
|
+
|
|
87228
|
+
return true;
|
|
87229
|
+
}
|
|
87230
|
+
|
|
87081
87231
|
this.OnDoubleClick=function(x,y,e)
|
|
87082
87232
|
{
|
|
87083
87233
|
JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]", e);
|
|
@@ -87227,7 +87377,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87227
87377
|
this.ChartCorssCursor.StringFormatY.ShareAfterVol=this.ShareAfterVol;
|
|
87228
87378
|
this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
|
|
87229
87379
|
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
87230
|
-
|
|
87380
|
+
this.ChartCorssCursor.OnChangeStatusCallback=(data, obj)=>{ this.OnChangeCorssCursorStatus(data,obj); }
|
|
87231
87381
|
|
|
87232
87382
|
//创建等待提示
|
|
87233
87383
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -284,6 +284,16 @@ function JSReportChart(divElement)
|
|
|
284
284
|
if (this.JSChartContainer) this.JSChartContainer.SetSelectedRow(option);
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
+
this.DeleteSymbol=function(arySymbol, option)
|
|
288
|
+
{
|
|
289
|
+
if (this.JSChartContainer) this.JSChartContainer.DeleteSymbol(arySymbol, option);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
this.AddSymbol=function(arySymbol, option)
|
|
293
|
+
{
|
|
294
|
+
if (this.JSChartContainer) this.JSChartContainer.AddSymbol(arySymbol, option);
|
|
295
|
+
}
|
|
296
|
+
|
|
287
297
|
this.EnableFilter=function(bEnable, option) //启动|关闭筛选
|
|
288
298
|
{
|
|
289
299
|
if (this.JSChartContainer) this.JSChartContainer.EnableFilter(bEnable, option);
|
|
@@ -1188,22 +1198,108 @@ function JSReportChartContainer(uielement)
|
|
|
1188
1198
|
this.UpdateStockData();
|
|
1189
1199
|
}
|
|
1190
1200
|
|
|
1191
|
-
|
|
1201
|
+
//删除股票
|
|
1202
|
+
this.DeleteSymbol=function(arySymbol, option)
|
|
1192
1203
|
{
|
|
1193
|
-
|
|
1194
|
-
if (!this.mapEvent.has(eventID)) return;
|
|
1204
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return false;
|
|
1195
1205
|
|
|
1196
|
-
var
|
|
1197
|
-
var
|
|
1198
|
-
|
|
1199
|
-
if (bStart)
|
|
1206
|
+
var setSymbol=new Set(arySymbol);
|
|
1207
|
+
var bFinder=false;
|
|
1208
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
1200
1209
|
{
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1210
|
+
var aryData=[];
|
|
1211
|
+
for(var i=0;i<this.SourceData.Data.length;++i)
|
|
1212
|
+
{
|
|
1213
|
+
var item=this.SourceData.Data[i];
|
|
1214
|
+
if (setSymbol.has(item))
|
|
1215
|
+
{
|
|
1216
|
+
bFinder=true;
|
|
1217
|
+
continue;
|
|
1218
|
+
}
|
|
1219
|
+
aryData.push(item);
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
if (bFinder) this.SourceData.Data=aryData;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
|
|
1226
|
+
{
|
|
1227
|
+
var aryData=[];
|
|
1228
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
1229
|
+
{
|
|
1230
|
+
var item=this.Data.Data[i];
|
|
1231
|
+
if (setSymbol.has(item))
|
|
1232
|
+
{
|
|
1233
|
+
bFinder=true;
|
|
1234
|
+
continue;
|
|
1235
|
+
}
|
|
1236
|
+
aryData.push(item);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
if (bFinder) this.Data.Data=aryData;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
if (!bFinder) return false;
|
|
1243
|
+
|
|
1244
|
+
this.Draw();
|
|
1245
|
+
this.UpdateStockData();
|
|
1246
|
+
|
|
1247
|
+
return true;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
//添加股票
|
|
1251
|
+
this.AddSymbol=function(arySymbol, option)
|
|
1252
|
+
{
|
|
1253
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return false;
|
|
1254
|
+
|
|
1255
|
+
var bDuplicate=true;
|
|
1256
|
+
if (option && IFrameSplitOperator.IsBool(option.Duplicate)) bDuplicate=option.Duplicate; //是否去重
|
|
1257
|
+
|
|
1258
|
+
var mapSymbol=new Map();
|
|
1259
|
+
for(var i=0;i<arySymbol.length;++i)
|
|
1260
|
+
{
|
|
1261
|
+
var item={ Symbol:arySymbol[i], IsExist:false, IsExist2:false };
|
|
1262
|
+
mapSymbol.set(item.Symbol, item);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
if (bDuplicate)
|
|
1266
|
+
{
|
|
1267
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
1268
|
+
{
|
|
1269
|
+
for(var i=0;i<this.SourceData.Data.length;++i)
|
|
1270
|
+
{
|
|
1271
|
+
var item=this.Data.Data[i];
|
|
1272
|
+
if (mapSymbol.has(item))
|
|
1273
|
+
{
|
|
1274
|
+
mapSymbol.get(item).IsExist=true;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
|
|
1280
|
+
{
|
|
1281
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
1282
|
+
{
|
|
1283
|
+
var item=this.Data.Data[i];
|
|
1284
|
+
if (mapSymbol.has(item))
|
|
1285
|
+
{
|
|
1286
|
+
mapSymbol.get(item).IsExist2=true;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1204
1289
|
}
|
|
1205
1290
|
}
|
|
1206
|
-
|
|
1291
|
+
|
|
1292
|
+
for(var mapItem of mapSymbol)
|
|
1293
|
+
{
|
|
1294
|
+
var item=mapItem[1];
|
|
1295
|
+
if (!item.IsExist) this.SourceData.Data.push(item.Symbol);
|
|
1296
|
+
if (!item.IsExist2) this.Data.Data.push(item.Symbol);
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
this.Draw();
|
|
1300
|
+
this.UpdateStockData();
|
|
1301
|
+
|
|
1302
|
+
return true;
|
|
1207
1303
|
}
|
|
1208
1304
|
|
|
1209
1305
|
//下载码表
|
|
@@ -1738,7 +1834,6 @@ function JSReportChartContainer(uielement)
|
|
|
1738
1834
|
this.StopAutoUpdate=function()
|
|
1739
1835
|
{
|
|
1740
1836
|
this.CancelAutoUpdate();
|
|
1741
|
-
this.AutoUpdateEvent(false,'JSDealChartContainer::StopAutoUpdate');
|
|
1742
1837
|
if (!this.IsAutoUpdate) return;
|
|
1743
1838
|
this.IsAutoUpdate=false;
|
|
1744
1839
|
}
|