hqchart 1.1.13182 → 1.1.13191
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 +142 -203
- package/package.json +1 -1
- package/src/jscommon/umychart.js +141 -1536
- package/src/jscommon/umychart.popMenu.js +49 -4
- package/src/jscommon/umychart.resource/css/tools.css +135 -0
- package/src/jscommon/umychart.resource/css/umychart.popmenu.css +47 -10
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +142 -1537
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +193 -1542
|
@@ -4215,9 +4215,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4215
4215
|
var pixelRatio=GetDevicePixelRatio();
|
|
4216
4216
|
|
|
4217
4217
|
//右键菜单
|
|
4218
|
-
if (option.IsShowRightMenu
|
|
4218
|
+
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
4219
4219
|
if (option.ScriptError) chart.ScriptErrorCallback=option.ScriptError;
|
|
4220
|
-
chart.SelectRectRightMenu=new KLineSelectRightMenu(this.DivElement);
|
|
4221
4220
|
if (option.EnableScrollUpDown==true) chart.EnableScrollUpDown=option.EnableScrollUpDown;
|
|
4222
4221
|
if (option.DisableMouse==true) chart.DisableMouse=option.DisableMouse;
|
|
4223
4222
|
if (option.TouchMoveMinAngle) chart.TouchMoveMinAngle=option.TouchMoveMinAngle;
|
|
@@ -4631,7 +4630,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4631
4630
|
chart.MinuteDialog=this.MinuteDialog;
|
|
4632
4631
|
|
|
4633
4632
|
//右键菜单
|
|
4634
|
-
if (option.IsShowRightMenu
|
|
4633
|
+
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
4635
4634
|
|
|
4636
4635
|
if (option.KLine) //k线图的属性设置
|
|
4637
4636
|
{
|
|
@@ -4851,7 +4850,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4851
4850
|
|
|
4852
4851
|
if (option.MinuteInfo) chart.CreateMinuteInfo(option.MinuteInfo);
|
|
4853
4852
|
|
|
4854
|
-
if (option.IsShowRightMenu
|
|
4853
|
+
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
4855
4854
|
|
|
4856
4855
|
if (IFrameSplitOperator.IsNumber(option.DayCount)) chart.DayCount=option.DayCount;
|
|
4857
4856
|
|
|
@@ -5570,6 +5569,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5570
5569
|
if (!chart) return false;
|
|
5571
5570
|
|
|
5572
5571
|
this.JSChartContainer=chart;
|
|
5572
|
+
chart.DivElement=this.DivElement;
|
|
5573
5573
|
|
|
5574
5574
|
if (option.DefaultCursor) chart.DefaultCursor=option.DefaultCursor;
|
|
5575
5575
|
if (option.OnCreatedCallback) option.OnCreatedCallback(chart);
|
|
@@ -5577,13 +5577,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5577
5577
|
//是否自动更新
|
|
5578
5578
|
if (option.IsAutoUpdate!=null) chart.IsAutoUpdate=option.IsAutoUpdate;
|
|
5579
5579
|
if (option.AutoUpdateFrequency>0) chart.AutoUpdateFrequency=option.AutoUpdateFrequency;
|
|
5580
|
+
|
|
5580
5581
|
//内置菜单
|
|
5581
|
-
if (option.EnablePopMenuV2===true)
|
|
5582
|
-
|
|
5583
|
-
chart.JSPopMenu=new JSPopMenu();
|
|
5584
|
-
chart.JSPopMenu.Inital();
|
|
5585
|
-
chart.EnablePopMenuV2=true;
|
|
5586
|
-
}
|
|
5582
|
+
if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
|
|
5583
|
+
|
|
5587
5584
|
//注册事件
|
|
5588
5585
|
if (option.EventCallback)
|
|
5589
5586
|
{
|
|
@@ -6586,6 +6583,10 @@ var JSCHART_MENU_ID=
|
|
|
6586
6583
|
|
|
6587
6584
|
CMD_ENABLE_SELECT_RECT_ID:22, //启动区间选择
|
|
6588
6585
|
CMD_CHANGE_DAY_COUNT_ID:23, //切换天数
|
|
6586
|
+
CMD_SHOW_BEFORE_DATA_ID:24, //显示|隐藏集合竞价
|
|
6587
|
+
|
|
6588
|
+
CMD_SELECTED_ZOOM_ID:25, //选中放大
|
|
6589
|
+
CMD_SELECTED_SUMMARY_ID:26, //区间统计
|
|
6589
6590
|
}
|
|
6590
6591
|
|
|
6591
6592
|
|
|
@@ -6673,11 +6674,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6673
6674
|
this.LoadDataSplashTitle="数据加载中"; //下载数据提示信息
|
|
6674
6675
|
this.DefaultCursor="default"; //crosshair , default 默认手型
|
|
6675
6676
|
|
|
6676
|
-
this.EnablePopMenuV2=false;
|
|
6677
|
-
this.JSPopMenu; //内置菜单
|
|
6678
|
-
//this.JSPopMenu=new JSPopMenu(); //内置菜单
|
|
6679
|
-
//this.JSPopMenu.Inital();
|
|
6680
|
-
|
|
6681
6677
|
//绘图缓存
|
|
6682
6678
|
this.CacheCanvas=null;
|
|
6683
6679
|
this.CacheElement=null;
|
|
@@ -6756,9 +6752,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6756
6752
|
this.SelectRect.oncontextmenu=function() { return false; }; //屏蔽选中区域系统右键菜单
|
|
6757
6753
|
uielement.parentNode.appendChild(this.SelectRect);
|
|
6758
6754
|
|
|
6759
|
-
//区间选择右键菜单
|
|
6760
|
-
this.SelectRectRightMenu;
|
|
6761
|
-
|
|
6762
6755
|
//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
|
|
6763
6756
|
this.FrameSplitData=new Map();
|
|
6764
6757
|
this.FrameSplitData.set("double",new SplitData());
|
|
@@ -6818,12 +6811,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6818
6811
|
|
|
6819
6812
|
this.StockCache={ Data:null }; //扩展数据缓存数据
|
|
6820
6813
|
|
|
6814
|
+
this.JSPopMenu; //内置菜单
|
|
6815
|
+
this.IsShowRightMenu=true; //显示右键菜单
|
|
6816
|
+
|
|
6821
6817
|
|
|
6822
6818
|
this.ClearStockCache=function()
|
|
6823
6819
|
{
|
|
6824
6820
|
this.StockCache.Data=null;
|
|
6825
6821
|
}
|
|
6826
6822
|
|
|
6823
|
+
this.InitalPopMenu=function() //初始化弹出窗口
|
|
6824
|
+
{
|
|
6825
|
+
if (this.JSPopMenu) return;
|
|
6826
|
+
|
|
6827
|
+
this.JSPopMenu=new JSPopMenu(); //内置菜单
|
|
6828
|
+
this.JSPopMenu.Inital();
|
|
6829
|
+
}
|
|
6830
|
+
|
|
6827
6831
|
//obj={ Element:, Canvas: }
|
|
6828
6832
|
this.SetCorssCursorElement=function(obj)
|
|
6829
6833
|
{
|
|
@@ -6992,6 +6996,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6992
6996
|
this.UIOnContextMenu=function(e)
|
|
6993
6997
|
{
|
|
6994
6998
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
6999
|
+
if (!this.IsShowRightMenu) return;
|
|
6995
7000
|
|
|
6996
7001
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
6997
7002
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
@@ -7233,7 +7238,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7233
7238
|
}
|
|
7234
7239
|
|
|
7235
7240
|
this.HideSelectRect();
|
|
7236
|
-
if (this.SelectRectRightMenu) this.SelectRectRightMenu.Hide();
|
|
7237
7241
|
if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
|
|
7238
7242
|
|
|
7239
7243
|
var paint=this.GetRectSelectPaint();
|
|
@@ -7873,17 +7877,19 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7873
7877
|
}
|
|
7874
7878
|
else
|
|
7875
7879
|
{
|
|
7876
|
-
if (isShowMenu
|
|
7880
|
+
if (isShowMenu)
|
|
7877
7881
|
{
|
|
7878
|
-
|
|
7879
|
-
{
|
|
7882
|
+
var data=
|
|
7883
|
+
{
|
|
7880
7884
|
Chart:this,
|
|
7881
7885
|
X:drag.LastMove.X-uielement.getBoundingClientRect().left,
|
|
7882
7886
|
Y:drag.LastMove.Y-uielement.getBoundingClientRect().top,
|
|
7883
7887
|
SelectData:selectData, //区间选择的数据
|
|
7884
7888
|
RectSelectPaint:paint //区间选择背景
|
|
7885
7889
|
};
|
|
7886
|
-
|
|
7890
|
+
|
|
7891
|
+
e.data=data;
|
|
7892
|
+
this.PopupSelectRectMenuV2(data, e);
|
|
7887
7893
|
}
|
|
7888
7894
|
}
|
|
7889
7895
|
}
|
|
@@ -13140,6 +13146,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13140
13146
|
if (this.ChangeDayCount && param!=null)
|
|
13141
13147
|
this.ChangeDayCount(param);
|
|
13142
13148
|
break;
|
|
13149
|
+
case JSCHART_MENU_ID.CMD_SHOW_BEFORE_DATA_ID:
|
|
13150
|
+
if (this.ShowCallAuctionData && IFrameSplitOperator.IsBool(srcParam))
|
|
13151
|
+
this.ShowCallAuctionData({ Left:srcParam, MultiDay:{ Left:srcParam }});
|
|
13152
|
+
break;
|
|
13153
|
+
|
|
13154
|
+
case JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID:
|
|
13155
|
+
if (this.ShowSelectData && srcParam) this.ShowSelectData(srcParam);
|
|
13156
|
+
break;
|
|
13157
|
+
case JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID:
|
|
13158
|
+
var dlg=new KLineSelectRectDialog(this.DivElement);
|
|
13159
|
+
dlg.DoModal(srcParam);
|
|
13160
|
+
break;
|
|
13143
13161
|
}
|
|
13144
13162
|
}
|
|
13145
13163
|
}
|
|
@@ -59837,8 +59855,9 @@ function ChartDrawHLine()
|
|
|
59837
59855
|
|
|
59838
59856
|
this.Button=
|
|
59839
59857
|
{
|
|
59840
|
-
CloseIcon: { Text:'\ue62b', Color:'rgb(255,255,255)', Family:"iconfont", Size:16 },
|
|
59841
|
-
SettingIcon: { Text:'\ue623',Color:'rgb(255,255,255)', Family:"iconfont", Size:16 }
|
|
59858
|
+
CloseIcon: { Text:'\ue62b', Color:'rgb(255,255,255)', Family:"iconfont", Size:16, ID:JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE, TooltipText:null },
|
|
59859
|
+
SettingIcon: { Text:'\ue623',Color:'rgb(255,255,255)', Family:"iconfont", Size:16, ID:JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING, TooltipText:null }
|
|
59860
|
+
//修改ID, Text , TooltipText 可以外部定制按钮
|
|
59842
59861
|
}
|
|
59843
59862
|
|
|
59844
59863
|
this.AryButton=[];
|
|
@@ -60032,6 +60051,7 @@ function ChartDrawHLine()
|
|
|
60032
60051
|
this.CalculateButtonSize();
|
|
60033
60052
|
this.DrawValueText(drawPoint[0].Y, rtDraw, labInfo);
|
|
60034
60053
|
if (labInfo) this.DrawRightLab(labInfo, rtDraw);
|
|
60054
|
+
if (labInfo) this.DrawCustomHLine(labInfo, drawPoint[0].Y);
|
|
60035
60055
|
}
|
|
60036
60056
|
|
|
60037
60057
|
|
|
@@ -60171,6 +60191,53 @@ function ChartDrawHLine()
|
|
|
60171
60191
|
}
|
|
60172
60192
|
}
|
|
60173
60193
|
|
|
60194
|
+
this.DrawCustomHLine=function(labInfo, yLine)
|
|
60195
|
+
{
|
|
60196
|
+
if (!labInfo) return;
|
|
60197
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(labInfo.AryLine)) return;
|
|
60198
|
+
|
|
60199
|
+
var left=this.Frame.ChartBorder.GetLeft();
|
|
60200
|
+
var right=this.Frame.ChartBorder.GetRight();
|
|
60201
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
60202
|
+
|
|
60203
|
+
var yMax=yLine, yMin=yLine;
|
|
60204
|
+
for(var i=0;i<labInfo.AryLine.length;++i)
|
|
60205
|
+
{
|
|
60206
|
+
var item=labInfo.AryLine[i];
|
|
60207
|
+
if (!IFrameSplitOperator.IsNumber(item.Value)) continue;
|
|
60208
|
+
|
|
60209
|
+
var y=this.Frame.GetYFromData(item.Value);
|
|
60210
|
+
var yFixed=ToFixedPoint(y);
|
|
60211
|
+
var xRight=right;
|
|
60212
|
+
if (IFrameSplitOperator.IsNumber(item.Width)) xRight=left+item.Width*pixelRatio;
|
|
60213
|
+
if (item.Color) this.Canvas.strokeStyle=item.Color;
|
|
60214
|
+
else this.Canvas.strokeStyle=this.LineColor;
|
|
60215
|
+
|
|
60216
|
+
this.Canvas.beginPath();
|
|
60217
|
+
this.Canvas.moveTo(left,yFixed);
|
|
60218
|
+
this.Canvas.lineTo(xRight,yFixed);
|
|
60219
|
+
this.Canvas.stroke();
|
|
60220
|
+
|
|
60221
|
+
if (yMax<yFixed) yMax=yFixed;
|
|
60222
|
+
if (yMin>yFixed) yMin=yFixed;
|
|
60223
|
+
}
|
|
60224
|
+
|
|
60225
|
+
if (yMax!=yMin && labInfo.VLine)
|
|
60226
|
+
{
|
|
60227
|
+
var item=labInfo.VLine;
|
|
60228
|
+
var x=left+20*pixelRatio;
|
|
60229
|
+
if (IFrameSplitOperator.IsNumber(item.XOffset)) x=left+item.XOffset*pixelRatio;
|
|
60230
|
+
x=ToFixedPoint(x);
|
|
60231
|
+
if (item.Color) this.Canvas.strokeStyle=item.Color;
|
|
60232
|
+
else this.Canvas.strokeStyle=this.LineColor;
|
|
60233
|
+
|
|
60234
|
+
this.Canvas.beginPath();
|
|
60235
|
+
this.Canvas.moveTo(x,yMax);
|
|
60236
|
+
this.Canvas.lineTo(x,yMin);
|
|
60237
|
+
this.Canvas.stroke();
|
|
60238
|
+
}
|
|
60239
|
+
}
|
|
60240
|
+
|
|
60174
60241
|
this.DrawValueText=function(y, rtDraw, labInfo)
|
|
60175
60242
|
{
|
|
60176
60243
|
var left=this.Frame.ChartBorder.GetLeft();
|
|
@@ -60315,7 +60382,7 @@ function ChartDrawHLine()
|
|
|
60315
60382
|
this.Canvas.fillStyle=icon.Color;
|
|
60316
60383
|
this.Canvas.fillText(this.Button.SettingIcon.Text,xCenter,yCenter);
|
|
60317
60384
|
|
|
60318
|
-
this.AryButton.push({Rect:rtButton, ID:
|
|
60385
|
+
this.AryButton.push({Rect:rtButton, ID:icon.ID, TooltipText:icon.TooltipText});
|
|
60319
60386
|
|
|
60320
60387
|
/*
|
|
60321
60388
|
if (this.ColseButtonSize>0)
|
|
@@ -60347,7 +60414,7 @@ function ChartDrawHLine()
|
|
|
60347
60414
|
this.Canvas.fillStyle=icon.Color;
|
|
60348
60415
|
this.Canvas.fillText(this.Button.CloseIcon.Text,xCenter,yCenter);
|
|
60349
60416
|
|
|
60350
|
-
this.AryButton.push({Rect:rtButton,ID:
|
|
60417
|
+
this.AryButton.push({Rect:rtButton,ID:icon.ID, TooltipText:icon.TooltipText });
|
|
60351
60418
|
|
|
60352
60419
|
left=rtButton.Right;
|
|
60353
60420
|
}
|
|
@@ -72347,10 +72414,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72347
72414
|
isShowMenu=data.IsShowMenu;
|
|
72348
72415
|
}
|
|
72349
72416
|
|
|
72350
|
-
|
|
72351
|
-
if (isShowMenu && this.SelectRectRightMenu)
|
|
72417
|
+
if (isShowMenu)
|
|
72352
72418
|
{
|
|
72353
|
-
|
|
72419
|
+
var data=
|
|
72354
72420
|
{
|
|
72355
72421
|
Chart:this,
|
|
72356
72422
|
X:x,
|
|
@@ -72358,8 +72424,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72358
72424
|
SelectData:selectData, //区间选择的数据
|
|
72359
72425
|
RectSelectPaint:paint //区间选择背景
|
|
72360
72426
|
};
|
|
72427
|
+
e.data=data;
|
|
72361
72428
|
|
|
72362
|
-
this.
|
|
72429
|
+
this.PopupSelectRectMenuV2(data, e);
|
|
72363
72430
|
}
|
|
72364
72431
|
}
|
|
72365
72432
|
|
|
@@ -72394,7 +72461,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72394
72461
|
this.ShowSelectData=function(selectData)
|
|
72395
72462
|
{
|
|
72396
72463
|
this.HideSelectRect();
|
|
72397
|
-
if (this.SelectRectRightMenu) this.SelectRectRightMenu.Hide();
|
|
72398
72464
|
|
|
72399
72465
|
JSConsole.Chart.Log('[KLineChartContainer::ShowSelectData] selectData', selectData);
|
|
72400
72466
|
var dataOffset=selectData.Start;
|
|
@@ -72479,9 +72545,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72479
72545
|
isShowMenu=data.IsShowMenu;
|
|
72480
72546
|
}
|
|
72481
72547
|
|
|
72482
|
-
if (isShowMenu
|
|
72548
|
+
if (isShowMenu)
|
|
72483
72549
|
{
|
|
72484
|
-
|
|
72550
|
+
var data=
|
|
72485
72551
|
{
|
|
72486
72552
|
Chart:this,
|
|
72487
72553
|
X:corssCursor.LastPoint.X/pixelTatio,
|
|
@@ -72489,7 +72555,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72489
72555
|
SelectData:selectData, //区间选择的数据
|
|
72490
72556
|
RectSelectPaint:paint //区间选择背景
|
|
72491
72557
|
};
|
|
72492
|
-
|
|
72558
|
+
e.data=data
|
|
72559
|
+
|
|
72560
|
+
this.PopupSelectRectMenuV2(data, e);
|
|
72493
72561
|
}
|
|
72494
72562
|
}
|
|
72495
72563
|
|
|
@@ -76400,22 +76468,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76400
76468
|
this.OnRightMenu=function(x,y,e)
|
|
76401
76469
|
{
|
|
76402
76470
|
var pixelTatio = GetDevicePixelRatio(); //x,y 需要乘以放大倍速
|
|
76403
|
-
|
|
76404
|
-
{
|
|
76405
|
-
|
|
76406
|
-
this.PopuRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
76407
|
-
}
|
|
76408
|
-
else if (this.RightMenu)
|
|
76409
|
-
{
|
|
76410
|
-
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
76411
|
-
e.data={ Chart:this, FrameID:frameId };
|
|
76412
|
-
this.RightMenu.DoModal(e);
|
|
76413
|
-
}
|
|
76414
|
-
|
|
76471
|
+
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
76472
|
+
this.PopupRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
76473
|
+
|
|
76415
76474
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CONTEXT_MENU);
|
|
76416
76475
|
if (event)
|
|
76417
76476
|
{
|
|
76418
|
-
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
76419
76477
|
var data={ X:x, Y:y, Event:e, FrameID:frameId };
|
|
76420
76478
|
event.Callback(event,data,this);
|
|
76421
76479
|
}
|
|
@@ -76682,7 +76740,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76682
76740
|
return aryMenu;
|
|
76683
76741
|
}
|
|
76684
76742
|
|
|
76685
|
-
this.
|
|
76743
|
+
this.PopupRightMenuV2=function(data,e)
|
|
76686
76744
|
{
|
|
76687
76745
|
if (!this.JSPopMenu) return;
|
|
76688
76746
|
var x=data.X, y=data.Y;
|
|
@@ -76693,6 +76751,20 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76693
76751
|
this.PopuMenuByRClick(menuData, x, y);
|
|
76694
76752
|
}
|
|
76695
76753
|
|
|
76754
|
+
this.PopupSelectRectMenuV2=function(data, e)
|
|
76755
|
+
{
|
|
76756
|
+
var aryMenu=
|
|
76757
|
+
[
|
|
76758
|
+
{ Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e] }},
|
|
76759
|
+
{ Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[data.SelectData] }}
|
|
76760
|
+
];
|
|
76761
|
+
|
|
76762
|
+
var menuData={ Menu:aryMenu, Position:JSPopMenu.POSITION_ID.RIGHT_MENU_ID };
|
|
76763
|
+
menuData.ClickCallback=(data)=>{ this.OnClickRightMenu(data); }
|
|
76764
|
+
var x=data.X, y=data.Y;
|
|
76765
|
+
this.PopuMenuByRClick(menuData, x, y);
|
|
76766
|
+
}
|
|
76767
|
+
|
|
76696
76768
|
//重新加载画图工具(切换股票|周期)
|
|
76697
76769
|
this.ReloadChartDrawPicture=function()
|
|
76698
76770
|
{
|
|
@@ -80059,22 +80131,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80059
80131
|
this.OnRightMenu=function(x,y,e)
|
|
80060
80132
|
{
|
|
80061
80133
|
var pixelTatio = GetDevicePixelRatio(); //x,y 需要乘以放大倍速
|
|
80062
|
-
|
|
80063
|
-
{
|
|
80064
|
-
|
|
80065
|
-
this.PopuRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
80066
|
-
}
|
|
80067
|
-
else if (this.RightMenu)
|
|
80068
|
-
{
|
|
80069
|
-
var frameId=this.Frame.PtInFrame(x,y);
|
|
80070
|
-
e.data={ Chart:this, FrameID:frameId };
|
|
80071
|
-
this.RightMenu.DoModal(e);
|
|
80072
|
-
}
|
|
80073
|
-
|
|
80134
|
+
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
80135
|
+
this.PopupRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
80136
|
+
|
|
80074
80137
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CONTEXT_MENU);
|
|
80075
80138
|
if (event)
|
|
80076
80139
|
{
|
|
80077
|
-
var frameId=this.Frame.PtInFrame(x,y);
|
|
80078
80140
|
var data={ X:x, Y:y, Event:e, FrameID:frameId };
|
|
80079
80141
|
event.Callback(event,data,this);
|
|
80080
80142
|
}
|
|
@@ -80092,6 +80154,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80092
80154
|
if (item && item.Symbol) aryOverlaySymbol.push(item.Symbol)
|
|
80093
80155
|
}
|
|
80094
80156
|
|
|
80157
|
+
var bShowDrawTool=false;
|
|
80158
|
+
if (this.GetExtendChartByClassName('DrawToolsButton')) bShowDrawTool=true; //画图工具
|
|
80159
|
+
|
|
80095
80160
|
var aryMenu=
|
|
80096
80161
|
[
|
|
80097
80162
|
{
|
|
@@ -80144,10 +80209,23 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80144
80209
|
},
|
|
80145
80210
|
{
|
|
80146
80211
|
Name:"区间选择",Data:{ ID: JSCHART_MENU_ID.CMD_ENABLE_SELECT_RECT_ID, Args:[!this.EnableSelectRect]}, Checked:this.EnableSelectRect
|
|
80212
|
+
},
|
|
80213
|
+
{
|
|
80214
|
+
Name:"其他设置",
|
|
80215
|
+
SubMenu:
|
|
80216
|
+
[
|
|
80217
|
+
{ Name:"画图工具", Data:{ ID:bShowDrawTool?JSCHART_MENU_ID.CMD_HIDE_DRAWTOOL_ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:bShowDrawTool},
|
|
80218
|
+
]
|
|
80147
80219
|
}
|
|
80148
80220
|
|
|
80149
80221
|
];
|
|
80150
80222
|
|
|
80223
|
+
if (MARKET_SUFFIX_NAME.IsSHSZStockA(this.Symbol))
|
|
80224
|
+
{
|
|
80225
|
+
var item={ Name:"集合竞价",Data:{ ID: JSCHART_MENU_ID.CMD_SHOW_BEFORE_DATA_ID, Args:[!this.IsShowBeforeData] }, Checked:this.IsShowBeforeData };
|
|
80226
|
+
aryMenu.splice(4,0,item);
|
|
80227
|
+
}
|
|
80228
|
+
|
|
80151
80229
|
|
|
80152
80230
|
//删除菜单
|
|
80153
80231
|
for(var i=0;i<aryMenu.length;++i)
|
|
@@ -80170,7 +80248,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80170
80248
|
return aryMenu;
|
|
80171
80249
|
}
|
|
80172
80250
|
|
|
80173
|
-
this.
|
|
80251
|
+
this.PopupRightMenuV2=function(data,e)
|
|
80174
80252
|
{
|
|
80175
80253
|
if (!this.JSPopMenu) return;
|
|
80176
80254
|
var x=data.X, y=data.Y;
|
|
@@ -90097,1479 +90175,6 @@ function WaitDialog(divElement)
|
|
|
90097
90175
|
}
|
|
90098
90176
|
}
|
|
90099
90177
|
|
|
90100
|
-
//K线右键菜单类
|
|
90101
|
-
//id:"kline"
|
|
90102
|
-
function KLineRightMenu(divElement)
|
|
90103
|
-
{
|
|
90104
|
-
this.newMethod=IDivDialog; //派生
|
|
90105
|
-
this.newMethod(divElement);
|
|
90106
|
-
delete this.newMethod;
|
|
90107
|
-
|
|
90108
|
-
this.option={};
|
|
90109
|
-
|
|
90110
|
-
this.Create = function () {
|
|
90111
|
-
var _self = this;
|
|
90112
|
-
|
|
90113
|
-
this.ID=Guid();
|
|
90114
|
-
|
|
90115
|
-
_self.BindData();
|
|
90116
|
-
_self.BindEvent();
|
|
90117
|
-
}
|
|
90118
|
-
this.BindData=function(){
|
|
90119
|
-
var _self = this;
|
|
90120
|
-
|
|
90121
|
-
var id=this.DivElement.id;
|
|
90122
|
-
var $body = $("#" + id);
|
|
90123
|
-
|
|
90124
|
-
$body.find("div[id^='topMenu_']").remove();
|
|
90125
|
-
$body.find("div[id^='childMenu_']").remove();
|
|
90126
|
-
|
|
90127
|
-
var $topMenu = $("<div />");
|
|
90128
|
-
$topMenu.attr("id", "topMenu_"+_self.ID).addClass("context-menu-wrapper topmenu").hide();
|
|
90129
|
-
$body.append($topMenu);
|
|
90130
|
-
|
|
90131
|
-
var $topTable = $("<table />");
|
|
90132
|
-
$topTable.attr({ id: "topTable_" + _self.ID, cellspacing: "0", cellpadding: "0" }).addClass("context-menu");
|
|
90133
|
-
$topMenu.append($topTable);
|
|
90134
|
-
|
|
90135
|
-
$topTable.append(_self.childrenList(_self.option.data));
|
|
90136
|
-
|
|
90137
|
-
for (var i = 0; i < _self.option.data.length; i++) {
|
|
90138
|
-
var isHasChildren = typeof _self.option.data[i].children != "undefined";
|
|
90139
|
-
|
|
90140
|
-
if (isHasChildren) {
|
|
90141
|
-
|
|
90142
|
-
var $childMenu = $("<div />");
|
|
90143
|
-
$childMenu.attr({ id: "childMenu_"+_self.ID + i, "data-index": i }).addClass("context-menu-wrapper").hide();
|
|
90144
|
-
$body.append($childMenu);
|
|
90145
|
-
|
|
90146
|
-
var $childTable = $("<table />");
|
|
90147
|
-
$childTable.attr({ id: "childTable_" + _self.ID + i, cellspacing: "0", cellpadding: "0" }).addClass("context-menu");
|
|
90148
|
-
$childMenu.append($childTable);
|
|
90149
|
-
|
|
90150
|
-
$childTable.append(_self.childrenList(_self.option.data[i].children));
|
|
90151
|
-
}
|
|
90152
|
-
}
|
|
90153
|
-
}
|
|
90154
|
-
|
|
90155
|
-
this.Update=function()
|
|
90156
|
-
{
|
|
90157
|
-
var _self = this;
|
|
90158
|
-
//var id=this.DivElement.id;
|
|
90159
|
-
//var $body=$("#"+id);
|
|
90160
|
-
//
|
|
90161
|
-
//var $topTable = $("#topTable_" + _self.ID);
|
|
90162
|
-
//$topTable.empty();
|
|
90163
|
-
//$topTable.append(_self.childrenList(_self.option.data));
|
|
90164
|
-
//
|
|
90165
|
-
//for (var i = 0; i < _self.option.data.length; i++) {
|
|
90166
|
-
// var isHasChildren = typeof _self.option.data[i].children != "undefined";
|
|
90167
|
-
//
|
|
90168
|
-
// if (isHasChildren) {
|
|
90169
|
-
// var $childTable = $("#childTable_" + _self.ID + i);
|
|
90170
|
-
// $childTable.empty();
|
|
90171
|
-
// $childTable.append(_self.childrenList(_self.option.data[i].children));
|
|
90172
|
-
// }
|
|
90173
|
-
//}
|
|
90174
|
-
|
|
90175
|
-
_self.BindData();
|
|
90176
|
-
_self.BindEvent();
|
|
90177
|
-
}
|
|
90178
|
-
|
|
90179
|
-
this.childrenList = function(list) {
|
|
90180
|
-
var result = [];
|
|
90181
|
-
|
|
90182
|
-
for (var i = 0; i < list.length; i++) {
|
|
90183
|
-
var isBorder = typeof list[i].isBorder != "undefined" && list[i].isBorder;
|
|
90184
|
-
|
|
90185
|
-
var $tr = $("<tr />");
|
|
90186
|
-
$tr.addClass("font_Arial context-menu");
|
|
90187
|
-
if (isBorder)
|
|
90188
|
-
$tr.addClass("border");
|
|
90189
|
-
|
|
90190
|
-
var $td1 = $("<td />");
|
|
90191
|
-
if(list[i].selected){
|
|
90192
|
-
$td1.addClass("spacer context-menu").html("√");
|
|
90193
|
-
}else{
|
|
90194
|
-
$td1.addClass("spacer context-menu");
|
|
90195
|
-
}
|
|
90196
|
-
|
|
90197
|
-
var $td2 = $("<td />");
|
|
90198
|
-
$td2.addClass("text").html(list[i].text);
|
|
90199
|
-
|
|
90200
|
-
var $td3 = $("<td />");
|
|
90201
|
-
$td3.addClass("right shortcut");
|
|
90202
|
-
|
|
90203
|
-
var $td4 = $("<td />");
|
|
90204
|
-
$td4.addClass(typeof list[i].children != "undefined" ? "submenu-arrow" : "context-menu spacer");
|
|
90205
|
-
|
|
90206
|
-
$tr.append($td1).append($td2).append($td3).append($td4);
|
|
90207
|
-
|
|
90208
|
-
result.push($tr);
|
|
90209
|
-
}
|
|
90210
|
-
return result;
|
|
90211
|
-
}
|
|
90212
|
-
|
|
90213
|
-
this.Show=function (obj) {
|
|
90214
|
-
var _self = this;
|
|
90215
|
-
$.extend(_self.option, obj);
|
|
90216
|
-
|
|
90217
|
-
if (!_self.ID) _self.Create(); //判断是否重复创建
|
|
90218
|
-
else _self.Update(); //更新菜单状态
|
|
90219
|
-
|
|
90220
|
-
var $topMenu = $("#topMenu_"+_self.ID),
|
|
90221
|
-
topWidth = $topMenu.outerWidth(),
|
|
90222
|
-
topHeight = $topMenu.outerHeight();
|
|
90223
|
-
|
|
90224
|
-
var x = _self.option.x,
|
|
90225
|
-
y = _self.option.y;
|
|
90226
|
-
|
|
90227
|
-
if (topWidth > _self.option.position.X + _self.option.position.W- x) //超过了右边距
|
|
90228
|
-
x = x - topWidth;
|
|
90229
|
-
|
|
90230
|
-
if (topHeight > _self.option.position.Y +_self.option.position.H - y)//超过了下边距
|
|
90231
|
-
y = y - topHeight;
|
|
90232
|
-
|
|
90233
|
-
$topMenu.hide();
|
|
90234
|
-
$topMenu.css({ position:"absolute",left: x + "px", top: y + "px" }).show();
|
|
90235
|
-
|
|
90236
|
-
this.isInit = true;
|
|
90237
|
-
}
|
|
90238
|
-
|
|
90239
|
-
this.Hide=function () {
|
|
90240
|
-
var _self = this;
|
|
90241
|
-
if (typeof($)=="undefined") return;
|
|
90242
|
-
$("#topMenu_" + _self.ID).hide();
|
|
90243
|
-
$("[id^='childMenu_" + _self.ID + "']").hide();
|
|
90244
|
-
}
|
|
90245
|
-
|
|
90246
|
-
this.BindEvent=function () {
|
|
90247
|
-
var _self = this;
|
|
90248
|
-
var $childMenu = $("[id^='childMenu_" + _self.ID + "']");
|
|
90249
|
-
|
|
90250
|
-
$("#topTable_" + _self.ID).find("tr").mouseenter(function () {
|
|
90251
|
-
var $this = $(this),
|
|
90252
|
-
index = $this.index(),
|
|
90253
|
-
$topMenu = $("#topMenu_" + _self.ID),
|
|
90254
|
-
$child = $("#childMenu_" + _self.ID + index),
|
|
90255
|
-
trWidth = $this.outerWidth(),
|
|
90256
|
-
trHeight = $this.outerHeight();
|
|
90257
|
-
|
|
90258
|
-
var left = $topMenu.position().left + trWidth + 1;
|
|
90259
|
-
var top = $topMenu.position().top + (trHeight * index);
|
|
90260
|
-
|
|
90261
|
-
if (trWidth > _self.option.position.X + _self.option.position.W - left) //超过了右边距
|
|
90262
|
-
left = left - trWidth - $topMenu.outerWidth() - 2;
|
|
90263
|
-
|
|
90264
|
-
if ($child.outerHeight() > _self.option.position.Y +_self.option.position.H - top)//超过了下边距
|
|
90265
|
-
top = $topMenu.position().top + $topMenu.outerHeight() - $child.outerHeight();
|
|
90266
|
-
|
|
90267
|
-
$childMenu.hide();
|
|
90268
|
-
$child.css({ left: left + "px", top: top + "px" }).show();
|
|
90269
|
-
}).mouseleave(function () {
|
|
90270
|
-
var index = $(this).index();
|
|
90271
|
-
setTimeout(function () {
|
|
90272
|
-
if ($("#childMenu_" + _self.ID + index).attr("data-isShow") != 1) {
|
|
90273
|
-
$("#childMenu_" + _self.ID + index).hide();
|
|
90274
|
-
}
|
|
90275
|
-
}, 10)
|
|
90276
|
-
|
|
90277
|
-
}).click(function () {
|
|
90278
|
-
var $this = $(this);
|
|
90279
|
-
var index = $this.index();
|
|
90280
|
-
|
|
90281
|
-
if ($.type(_self.option.data[index].click) == "function") {
|
|
90282
|
-
_self.option.data[index].click(_self.option.returnData);
|
|
90283
|
-
$this.hide();
|
|
90284
|
-
}
|
|
90285
|
-
}).contextmenu(function()
|
|
90286
|
-
{
|
|
90287
|
-
return false; //屏蔽系统右键菜单
|
|
90288
|
-
});
|
|
90289
|
-
|
|
90290
|
-
|
|
90291
|
-
$childMenu.mouseenter(function () {
|
|
90292
|
-
$(this).attr("data-isShow", "1");
|
|
90293
|
-
}).mouseleave(function () {
|
|
90294
|
-
$(this).attr("data-isShow", "0");
|
|
90295
|
-
}).contextmenu(function()
|
|
90296
|
-
{
|
|
90297
|
-
return false; //屏蔽系统右键菜单
|
|
90298
|
-
});
|
|
90299
|
-
|
|
90300
|
-
$childMenu.find("tr").click(function () {
|
|
90301
|
-
var $this = $(this);
|
|
90302
|
-
var divIndex = parseInt($this.closest("div").attr("data-index"));
|
|
90303
|
-
var trIndex = $this.index();
|
|
90304
|
-
|
|
90305
|
-
if ($.type(_self.option.data[divIndex].children[trIndex].click) == "function") {
|
|
90306
|
-
_self.option.data[divIndex].children[trIndex].click(_self.option.windowIndex || 1);
|
|
90307
|
-
$childMenu.hide();
|
|
90308
|
-
}
|
|
90309
|
-
});
|
|
90310
|
-
}
|
|
90311
|
-
|
|
90312
|
-
this.GetPeriod=function (chart)
|
|
90313
|
-
{
|
|
90314
|
-
var data=
|
|
90315
|
-
[
|
|
90316
|
-
{
|
|
90317
|
-
text: "日线", Value:0,
|
|
90318
|
-
click: function () { chart.ChangePeriod(0); }
|
|
90319
|
-
},
|
|
90320
|
-
{
|
|
90321
|
-
text: "周线",Value:1,
|
|
90322
|
-
click: function () { chart.ChangePeriod(1); }
|
|
90323
|
-
},
|
|
90324
|
-
{
|
|
90325
|
-
text: "双周线",Value:21,
|
|
90326
|
-
click: function () { chart.ChangePeriod(21); }
|
|
90327
|
-
},
|
|
90328
|
-
{
|
|
90329
|
-
text: "月线",Value:2,
|
|
90330
|
-
click: function () { chart.ChangePeriod(2); }
|
|
90331
|
-
},
|
|
90332
|
-
{
|
|
90333
|
-
text: "季线",Value:9,
|
|
90334
|
-
click: function () { chart.ChangePeriod(9); }
|
|
90335
|
-
},
|
|
90336
|
-
{
|
|
90337
|
-
text: "半年",Value:22,
|
|
90338
|
-
click: function () { chart.ChangePeriod(22); }
|
|
90339
|
-
},
|
|
90340
|
-
{
|
|
90341
|
-
text: "年线",Value:3,
|
|
90342
|
-
click: function () { chart.ChangePeriod(3); }
|
|
90343
|
-
},
|
|
90344
|
-
{
|
|
90345
|
-
text: "1分",Value:4,
|
|
90346
|
-
click: function () { chart.ChangePeriod(4); }
|
|
90347
|
-
},
|
|
90348
|
-
{
|
|
90349
|
-
text: "5分",Value:5,
|
|
90350
|
-
click: function () { chart.ChangePeriod(5); }
|
|
90351
|
-
},
|
|
90352
|
-
{
|
|
90353
|
-
text: "15分",Value:6,
|
|
90354
|
-
click: function () { chart.ChangePeriod(6); }
|
|
90355
|
-
},
|
|
90356
|
-
{
|
|
90357
|
-
text: "30分",Value:7,
|
|
90358
|
-
click: function () { chart.ChangePeriod(7); }
|
|
90359
|
-
},
|
|
90360
|
-
{
|
|
90361
|
-
text: "60分",Value:8,
|
|
90362
|
-
click: function () { chart.ChangePeriod(8); }
|
|
90363
|
-
},
|
|
90364
|
-
{
|
|
90365
|
-
text: "2小时",Value:11,
|
|
90366
|
-
click: function () { chart.ChangePeriod(11); }
|
|
90367
|
-
},
|
|
90368
|
-
{
|
|
90369
|
-
text: "4小时",Value:12,
|
|
90370
|
-
click: function () { chart.ChangePeriod(12); }
|
|
90371
|
-
},
|
|
90372
|
-
{
|
|
90373
|
-
text: "分笔",Value:10,
|
|
90374
|
-
click: function () { chart.ChangePeriod(10); }
|
|
90375
|
-
},
|
|
90376
|
-
{
|
|
90377
|
-
text: "自定义周期:3分钟",Value:20003,
|
|
90378
|
-
click: function () { chart.ChangePeriod(20003); }
|
|
90379
|
-
},
|
|
90380
|
-
{
|
|
90381
|
-
text: "自定义周期:35分钟",Value:20035,
|
|
90382
|
-
click: function () { chart.ChangePeriod(20035); }
|
|
90383
|
-
},
|
|
90384
|
-
{
|
|
90385
|
-
text: "自定义周期:8日",Value:40008,
|
|
90386
|
-
click: function () { chart.ChangePeriod(40008); }
|
|
90387
|
-
}
|
|
90388
|
-
];
|
|
90389
|
-
|
|
90390
|
-
for(var i in data)
|
|
90391
|
-
{
|
|
90392
|
-
var item=data[i];
|
|
90393
|
-
if (item.Value==chart.Period)
|
|
90394
|
-
{
|
|
90395
|
-
item.selected=true;
|
|
90396
|
-
break;
|
|
90397
|
-
}
|
|
90398
|
-
}
|
|
90399
|
-
|
|
90400
|
-
return data;
|
|
90401
|
-
}
|
|
90402
|
-
|
|
90403
|
-
this.GetRight=function(chart)
|
|
90404
|
-
{
|
|
90405
|
-
var data=
|
|
90406
|
-
[
|
|
90407
|
-
{
|
|
90408
|
-
text: "不复权",
|
|
90409
|
-
click: function () { chart.ChangeRight(0); }
|
|
90410
|
-
},
|
|
90411
|
-
{
|
|
90412
|
-
text: "前复权",
|
|
90413
|
-
click: function () { chart.ChangeRight(1); }
|
|
90414
|
-
},
|
|
90415
|
-
{
|
|
90416
|
-
text: "后复权",
|
|
90417
|
-
click: function () { chart.ChangeRight(2); }
|
|
90418
|
-
}
|
|
90419
|
-
];
|
|
90420
|
-
|
|
90421
|
-
if (chart.Right>=0 && chart.Right<data.length) data[chart.Right].selected=true;
|
|
90422
|
-
|
|
90423
|
-
return data;
|
|
90424
|
-
}
|
|
90425
|
-
|
|
90426
|
-
//指标
|
|
90427
|
-
this.GetIndex=function (chart)
|
|
90428
|
-
{
|
|
90429
|
-
return [{
|
|
90430
|
-
text: "均线",
|
|
90431
|
-
click: function (windowIndex) {
|
|
90432
|
-
chart.ChangeIndex(windowIndex, '均线')
|
|
90433
|
-
}
|
|
90434
|
-
}, {
|
|
90435
|
-
text: "BOLL",
|
|
90436
|
-
click: function (windowIndex) {
|
|
90437
|
-
chart.ChangeIndex(windowIndex, 'BOLL')
|
|
90438
|
-
},
|
|
90439
|
-
isBorder:true
|
|
90440
|
-
}, {
|
|
90441
|
-
text: "MACD",
|
|
90442
|
-
click: function (windowIndex) {
|
|
90443
|
-
chart.ChangeIndex(windowIndex, 'MACD')
|
|
90444
|
-
}
|
|
90445
|
-
}, {
|
|
90446
|
-
text: "KDJ",
|
|
90447
|
-
click: function (windowIndex) {
|
|
90448
|
-
chart.ChangeIndex(windowIndex, 'KDJ')
|
|
90449
|
-
}
|
|
90450
|
-
}, {
|
|
90451
|
-
text: "VOL",
|
|
90452
|
-
click: function (windowIndex) {
|
|
90453
|
-
chart.ChangeIndex(windowIndex, 'VOL')
|
|
90454
|
-
}
|
|
90455
|
-
}, {
|
|
90456
|
-
text: "RSI",
|
|
90457
|
-
click: function (windowIndex) {
|
|
90458
|
-
chart.ChangeIndex(windowIndex, 'RSI')
|
|
90459
|
-
}
|
|
90460
|
-
}, {
|
|
90461
|
-
text: "BRAR",
|
|
90462
|
-
click: function (windowIndex) {
|
|
90463
|
-
chart.ChangeIndex(windowIndex, 'BRAR')
|
|
90464
|
-
}
|
|
90465
|
-
}, {
|
|
90466
|
-
text: "WR",
|
|
90467
|
-
click: function (windowIndex) {
|
|
90468
|
-
chart.ChangeIndex(windowIndex, 'WR')
|
|
90469
|
-
}
|
|
90470
|
-
}, {
|
|
90471
|
-
text: "BIAS",
|
|
90472
|
-
click: function (windowIndex) {
|
|
90473
|
-
chart.ChangeIndex(windowIndex, 'BIAS')
|
|
90474
|
-
}
|
|
90475
|
-
}, {
|
|
90476
|
-
text: "OBV",
|
|
90477
|
-
click: function (windowIndex) {
|
|
90478
|
-
chart.ChangeIndex(windowIndex, 'OBV')
|
|
90479
|
-
}
|
|
90480
|
-
}, {
|
|
90481
|
-
text: "DMI",
|
|
90482
|
-
click: function (windowIndex) {
|
|
90483
|
-
chart.ChangeIndex(windowIndex, 'DMI')
|
|
90484
|
-
}
|
|
90485
|
-
}, {
|
|
90486
|
-
text: "CR",
|
|
90487
|
-
click: function (windowIndex) {
|
|
90488
|
-
chart.ChangeIndex(windowIndex, 'CR')
|
|
90489
|
-
}
|
|
90490
|
-
}, {
|
|
90491
|
-
text: "PSY",
|
|
90492
|
-
click: function (windowIndex) {
|
|
90493
|
-
chart.ChangeIndex(windowIndex, 'PSY')
|
|
90494
|
-
}
|
|
90495
|
-
}, {
|
|
90496
|
-
text: "CCI",
|
|
90497
|
-
click: function (windowIndex) {
|
|
90498
|
-
chart.ChangeIndex(windowIndex, 'CCI')
|
|
90499
|
-
}
|
|
90500
|
-
}, {
|
|
90501
|
-
text: "DMA",
|
|
90502
|
-
click: function (windowIndex) {
|
|
90503
|
-
chart.ChangeIndex(windowIndex, 'DMA')
|
|
90504
|
-
}
|
|
90505
|
-
}, {
|
|
90506
|
-
text: "TRIX",
|
|
90507
|
-
click: function (windowIndex) {
|
|
90508
|
-
chart.ChangeIndex(windowIndex, 'TRIX')
|
|
90509
|
-
}
|
|
90510
|
-
}, {
|
|
90511
|
-
text: "VR",
|
|
90512
|
-
click: function (windowIndex) {
|
|
90513
|
-
chart.ChangeIndex(windowIndex, 'VR')
|
|
90514
|
-
}
|
|
90515
|
-
}, {
|
|
90516
|
-
text: "EMV",
|
|
90517
|
-
click: function (windowIndex) {
|
|
90518
|
-
chart.ChangeIndex(windowIndex, 'EMV')
|
|
90519
|
-
}
|
|
90520
|
-
}, {
|
|
90521
|
-
text: "ROC",
|
|
90522
|
-
click: function (windowIndex) {
|
|
90523
|
-
chart.ChangeIndex(windowIndex, 'ROC')
|
|
90524
|
-
}
|
|
90525
|
-
}, {
|
|
90526
|
-
text: "MIM",
|
|
90527
|
-
click: function (windowIndex) {
|
|
90528
|
-
chart.ChangeIndex(windowIndex, 'MIM')
|
|
90529
|
-
}
|
|
90530
|
-
}, {
|
|
90531
|
-
text: "FSL",
|
|
90532
|
-
click: function (windowIndex) {
|
|
90533
|
-
chart.ChangeIndex(windowIndex, 'FSL')
|
|
90534
|
-
}
|
|
90535
|
-
} ]
|
|
90536
|
-
}
|
|
90537
|
-
|
|
90538
|
-
//五彩K线
|
|
90539
|
-
this.GetColorIndex=function (chart)
|
|
90540
|
-
{
|
|
90541
|
-
var data=
|
|
90542
|
-
[
|
|
90543
|
-
{
|
|
90544
|
-
text: "十字星",
|
|
90545
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-十字星') }
|
|
90546
|
-
},
|
|
90547
|
-
{
|
|
90548
|
-
text: "早晨之星",
|
|
90549
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-早晨之星') },
|
|
90550
|
-
},
|
|
90551
|
-
{
|
|
90552
|
-
text: "垂死十字",
|
|
90553
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-垂死十字') },
|
|
90554
|
-
},
|
|
90555
|
-
{
|
|
90556
|
-
text: "三只乌鸦",
|
|
90557
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-三只乌鸦') }
|
|
90558
|
-
},
|
|
90559
|
-
{
|
|
90560
|
-
text: "光脚阴线",
|
|
90561
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-光脚阴线') }
|
|
90562
|
-
},
|
|
90563
|
-
{
|
|
90564
|
-
text: "黄昏之星",
|
|
90565
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-黄昏之星') }
|
|
90566
|
-
}
|
|
90567
|
-
];
|
|
90568
|
-
|
|
90569
|
-
if (chart.ColorIndex)
|
|
90570
|
-
{
|
|
90571
|
-
data[data.length-1].isBorder=true;
|
|
90572
|
-
data.push(
|
|
90573
|
-
{
|
|
90574
|
-
text: "删除五彩K线",
|
|
90575
|
-
click: function (windowIndex) { chart.CancelInstructionIndex() }
|
|
90576
|
-
});
|
|
90577
|
-
}
|
|
90578
|
-
|
|
90579
|
-
return data;
|
|
90580
|
-
}
|
|
90581
|
-
|
|
90582
|
-
//专家系统
|
|
90583
|
-
this.GetTradeIndex=function(chart)
|
|
90584
|
-
{
|
|
90585
|
-
var data=
|
|
90586
|
-
[
|
|
90587
|
-
{
|
|
90588
|
-
text: "BIAS",
|
|
90589
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-BIAS') }
|
|
90590
|
-
},
|
|
90591
|
-
{
|
|
90592
|
-
text: "CCI",
|
|
90593
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-CCI') }
|
|
90594
|
-
},
|
|
90595
|
-
{
|
|
90596
|
-
text: "DMI",
|
|
90597
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-DMI') }
|
|
90598
|
-
},
|
|
90599
|
-
{
|
|
90600
|
-
text: "KD",
|
|
90601
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-KD') }
|
|
90602
|
-
},
|
|
90603
|
-
{
|
|
90604
|
-
text: "BOLL",
|
|
90605
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-BOLL') }
|
|
90606
|
-
},
|
|
90607
|
-
{
|
|
90608
|
-
text: "KDJ",
|
|
90609
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-KDJ') }
|
|
90610
|
-
}
|
|
90611
|
-
];
|
|
90612
|
-
|
|
90613
|
-
if (chart.TradeIndex)
|
|
90614
|
-
{
|
|
90615
|
-
data[data.length-1].isBorder=true;
|
|
90616
|
-
data.push(
|
|
90617
|
-
{
|
|
90618
|
-
text: "删除专家系统",
|
|
90619
|
-
click: function (windowIndex) { chart.CancelInstructionIndex()}
|
|
90620
|
-
});
|
|
90621
|
-
}
|
|
90622
|
-
return data;
|
|
90623
|
-
}
|
|
90624
|
-
|
|
90625
|
-
//叠加
|
|
90626
|
-
this.GetOverlay=function (chart)
|
|
90627
|
-
{
|
|
90628
|
-
var data=
|
|
90629
|
-
[
|
|
90630
|
-
{
|
|
90631
|
-
text: "上证指数",
|
|
90632
|
-
click: function () { chart.OverlaySymbol('000001.sh'); }
|
|
90633
|
-
},
|
|
90634
|
-
{
|
|
90635
|
-
text: "深证成指",
|
|
90636
|
-
click: function () { chart.OverlaySymbol('399001.sz'); }
|
|
90637
|
-
},
|
|
90638
|
-
{
|
|
90639
|
-
text: "中小板指",
|
|
90640
|
-
click: function () { chart.OverlaySymbol('399005.sz'); }
|
|
90641
|
-
},
|
|
90642
|
-
{
|
|
90643
|
-
text: "创业板指",
|
|
90644
|
-
click: function () { chart.OverlaySymbol('399006.sz'); }
|
|
90645
|
-
},
|
|
90646
|
-
{
|
|
90647
|
-
text: "沪深300",
|
|
90648
|
-
click: function () { chart.OverlaySymbol('000300.sh'); },
|
|
90649
|
-
}
|
|
90650
|
-
];
|
|
90651
|
-
|
|
90652
|
-
for(var i in chart.OverlayChartPaint)
|
|
90653
|
-
{
|
|
90654
|
-
var item=chart.OverlayChartPaint[i];
|
|
90655
|
-
var symbol=item.Symbol;
|
|
90656
|
-
const mapSymbol=new Map([['000001.sh',0],['399001.sz',1],['399005.sz',2],['399006.sz',3],['000300.sh',4]]);
|
|
90657
|
-
if (mapSymbol.has(symbol))
|
|
90658
|
-
{
|
|
90659
|
-
var menuItem=data[mapSymbol.get(symbol)];
|
|
90660
|
-
let delSymbol=symbol;
|
|
90661
|
-
menuItem.selected=true;
|
|
90662
|
-
menuItem.click=function () { chart.DeleteOverlaySymbol(delSymbol); };
|
|
90663
|
-
}
|
|
90664
|
-
}
|
|
90665
|
-
|
|
90666
|
-
if (chart.OverlayChartPaint && chart.OverlayChartPaint.length>0)
|
|
90667
|
-
{
|
|
90668
|
-
data[data.length-1].isBorder=true;
|
|
90669
|
-
data.push(
|
|
90670
|
-
{
|
|
90671
|
-
text: "取消叠加",
|
|
90672
|
-
click: function () { chart.ClearOverlaySymbol();}
|
|
90673
|
-
}
|
|
90674
|
-
);
|
|
90675
|
-
}
|
|
90676
|
-
|
|
90677
|
-
return data;
|
|
90678
|
-
}
|
|
90679
|
-
|
|
90680
|
-
//K线类型设置
|
|
90681
|
-
this.GetKLineType=function(chart)
|
|
90682
|
-
{
|
|
90683
|
-
var data=
|
|
90684
|
-
[
|
|
90685
|
-
{
|
|
90686
|
-
text: "K线(空心阳线)",
|
|
90687
|
-
click: function () { chart.ChangeKLineDrawType(3);}
|
|
90688
|
-
},
|
|
90689
|
-
{
|
|
90690
|
-
text: "K线(实心阳线)",
|
|
90691
|
-
click: function () { chart.ChangeKLineDrawType(0); }
|
|
90692
|
-
},
|
|
90693
|
-
{
|
|
90694
|
-
text: "美国线",
|
|
90695
|
-
click: function () { chart.ChangeKLineDrawType(2, true ,{ IsThinAKBar:false }); }
|
|
90696
|
-
},
|
|
90697
|
-
{
|
|
90698
|
-
text: "收盘线",
|
|
90699
|
-
click: function () { chart.ChangeKLineDrawType(1); }
|
|
90700
|
-
},
|
|
90701
|
-
{
|
|
90702
|
-
text: "收盘面积",
|
|
90703
|
-
click: function () { chart.ChangeKLineDrawType(4); }
|
|
90704
|
-
},
|
|
90705
|
-
{
|
|
90706
|
-
text: "K线(空心阳线阴线)",
|
|
90707
|
-
click: function () { chart.ChangeKLineDrawType(6);}
|
|
90708
|
-
},
|
|
90709
|
-
{
|
|
90710
|
-
text: "Heikin Ashi",
|
|
90711
|
-
click: function () { chart.ChangeKLineDrawType(11);}
|
|
90712
|
-
},
|
|
90713
|
-
{
|
|
90714
|
-
text: "Line Break",
|
|
90715
|
-
click: function () { chart.ChangeKLineDrawType(12);}
|
|
90716
|
-
},
|
|
90717
|
-
{
|
|
90718
|
-
text: "High-low",
|
|
90719
|
-
click: function () { chart.ChangeKLineDrawType(13);}
|
|
90720
|
-
},
|
|
90721
|
-
{
|
|
90722
|
-
text: "HLC Area",
|
|
90723
|
-
click: function () { chart.ChangeKLineDrawType(15);}
|
|
90724
|
-
}
|
|
90725
|
-
];
|
|
90726
|
-
|
|
90727
|
-
switch(chart.KLineDrawType)
|
|
90728
|
-
{
|
|
90729
|
-
case 0:
|
|
90730
|
-
data[1].selected=true;
|
|
90731
|
-
break;
|
|
90732
|
-
case 1:
|
|
90733
|
-
data[3].selected=true;
|
|
90734
|
-
break;
|
|
90735
|
-
case 2:
|
|
90736
|
-
data[2].selected=true;
|
|
90737
|
-
break;
|
|
90738
|
-
case 3:
|
|
90739
|
-
data[0].selected=true;
|
|
90740
|
-
break;
|
|
90741
|
-
case 4:
|
|
90742
|
-
data[4].selected=true;
|
|
90743
|
-
break;
|
|
90744
|
-
case 6:
|
|
90745
|
-
data[5].selected=true;
|
|
90746
|
-
break;
|
|
90747
|
-
case 11:
|
|
90748
|
-
data[6].selected=true;
|
|
90749
|
-
break;
|
|
90750
|
-
case 12:
|
|
90751
|
-
data[7].selected=true;
|
|
90752
|
-
break;
|
|
90753
|
-
case 13:
|
|
90754
|
-
data[8].selected=true;
|
|
90755
|
-
break;
|
|
90756
|
-
case 15:
|
|
90757
|
-
data[9].selected=true;
|
|
90758
|
-
break;
|
|
90759
|
-
}
|
|
90760
|
-
return data;
|
|
90761
|
-
}
|
|
90762
|
-
|
|
90763
|
-
//指标窗口个数
|
|
90764
|
-
this.GetIndexWindowCount=function(chart)
|
|
90765
|
-
{
|
|
90766
|
-
var data=
|
|
90767
|
-
[
|
|
90768
|
-
{
|
|
90769
|
-
text: "1个窗口",
|
|
90770
|
-
click: function () { chart.ChangeIndexWindowCount(1); }
|
|
90771
|
-
},
|
|
90772
|
-
{
|
|
90773
|
-
text: "2个窗口",
|
|
90774
|
-
click: function () { chart.ChangeIndexWindowCount(2); }
|
|
90775
|
-
},
|
|
90776
|
-
{
|
|
90777
|
-
text: "3个窗口",
|
|
90778
|
-
click: function () { chart.ChangeIndexWindowCount(3); }
|
|
90779
|
-
},
|
|
90780
|
-
{
|
|
90781
|
-
text: "4个窗口",
|
|
90782
|
-
click: function () { chart.ChangeIndexWindowCount(4); }
|
|
90783
|
-
},
|
|
90784
|
-
{
|
|
90785
|
-
text: "5个窗口",
|
|
90786
|
-
click: function () { chart.ChangeIndexWindowCount(5); }
|
|
90787
|
-
}
|
|
90788
|
-
];
|
|
90789
|
-
|
|
90790
|
-
var count=chart.Frame.SubFrame.length;
|
|
90791
|
-
if ((count-1)>=0 && (count-1)<data.length) data[count-1].selected=true; //选中
|
|
90792
|
-
|
|
90793
|
-
return data;
|
|
90794
|
-
}
|
|
90795
|
-
|
|
90796
|
-
//坐标类型
|
|
90797
|
-
this.GetCoordinateType=function(chart)
|
|
90798
|
-
{
|
|
90799
|
-
var data=
|
|
90800
|
-
[
|
|
90801
|
-
{
|
|
90802
|
-
text: "普通坐标",
|
|
90803
|
-
click: function () { chart.ChangeCoordinateType( {Type:0} ); }
|
|
90804
|
-
},
|
|
90805
|
-
{
|
|
90806
|
-
text: "百分比坐标",
|
|
90807
|
-
click: function () { chart.ChangeCoordinateType( {Type:1} ); }
|
|
90808
|
-
},
|
|
90809
|
-
{
|
|
90810
|
-
text: "反转坐标",
|
|
90811
|
-
click: function () { chart.ChangeCoordinateType( { IsReverse:true } ); }
|
|
90812
|
-
},
|
|
90813
|
-
{
|
|
90814
|
-
text: "对数坐标",
|
|
90815
|
-
click: function () { chart.ChangeCoordinateType( {Type:2} ); }
|
|
90816
|
-
},
|
|
90817
|
-
{
|
|
90818
|
-
text: "等比坐标",
|
|
90819
|
-
click: function () { chart.ChangeCoordinateType( {Type:3} ); }
|
|
90820
|
-
},
|
|
90821
|
-
{
|
|
90822
|
-
text: "等分坐标",
|
|
90823
|
-
click: function () { chart.ChangeCoordinateType( {Type:4} ); }
|
|
90824
|
-
},
|
|
90825
|
-
{
|
|
90826
|
-
text: "黄金分割",
|
|
90827
|
-
click: function () { chart.ChangeCoordinateType( {Type:5} ); }
|
|
90828
|
-
}
|
|
90829
|
-
];
|
|
90830
|
-
|
|
90831
|
-
if (chart.Frame && chart.Frame.SubFrame && chart.Frame.SubFrame.length>0)
|
|
90832
|
-
{
|
|
90833
|
-
if (chart.Frame.SubFrame[0].Frame.CoordinateType==1)
|
|
90834
|
-
{
|
|
90835
|
-
data[2].selected=true;
|
|
90836
|
-
data[2].click=function() { chart.ChangeCoordinateType( { IsReverse:false } ); } //取消反转
|
|
90837
|
-
}
|
|
90838
|
-
|
|
90839
|
-
if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==1) data[1].selected=true; //百分比
|
|
90840
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==0) data[0].selected=true; //普通坐标
|
|
90841
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==2) data[3].selected=true; //对数
|
|
90842
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==3) data[4].selected=true; //等比坐标
|
|
90843
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==4) data[5].selected=true; //等分坐标
|
|
90844
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==5) data[6].selected=true; //黄金分割
|
|
90845
|
-
}
|
|
90846
|
-
|
|
90847
|
-
return data;
|
|
90848
|
-
}
|
|
90849
|
-
|
|
90850
|
-
//拖拽模式
|
|
90851
|
-
this.GetDragModeType=function(chart)
|
|
90852
|
-
{
|
|
90853
|
-
var data=
|
|
90854
|
-
[
|
|
90855
|
-
{
|
|
90856
|
-
text: "禁止拖拽",
|
|
90857
|
-
click: function () { chart.DragMode=0; }
|
|
90858
|
-
},
|
|
90859
|
-
{
|
|
90860
|
-
text: "启动拖拽",
|
|
90861
|
-
click: function () { chart.DragMode=1; }
|
|
90862
|
-
},
|
|
90863
|
-
{
|
|
90864
|
-
text: "区间选择",
|
|
90865
|
-
click: function () { chart.DragMode=2; }
|
|
90866
|
-
}
|
|
90867
|
-
];
|
|
90868
|
-
|
|
90869
|
-
if (chart.DragMode>=0 && chart.DragMode<data.length) data[chart.DragMode].selected=true; //选中
|
|
90870
|
-
|
|
90871
|
-
return data;
|
|
90872
|
-
}
|
|
90873
|
-
|
|
90874
|
-
//工具
|
|
90875
|
-
this.GetTools=function(chart)
|
|
90876
|
-
{
|
|
90877
|
-
var data=[];
|
|
90878
|
-
var drawTools=chart.GetExtendChartByClassName('DrawToolsButton');
|
|
90879
|
-
if (drawTools)
|
|
90880
|
-
{
|
|
90881
|
-
data.push(
|
|
90882
|
-
{
|
|
90883
|
-
text: "关闭画图工具",
|
|
90884
|
-
click: function ()
|
|
90885
|
-
{
|
|
90886
|
-
var toolsWidth=drawTools.Chart.Width;
|
|
90887
|
-
var toolsIndex=parseInt(drawTools.Index);
|
|
90888
|
-
for(var i=toolsIndex+1; i<chart.ExtendChartPaint.length; ++i) //在画图工具后面创建的需要减去工具的宽度
|
|
90889
|
-
{
|
|
90890
|
-
var item=chart.ExtendChartPaint[i];
|
|
90891
|
-
if (item.ClassName=='StockChip')
|
|
90892
|
-
{
|
|
90893
|
-
item.Left-=toolsWidth;
|
|
90894
|
-
}
|
|
90895
|
-
}
|
|
90896
|
-
chart.DeleteExtendChart(drawTools);
|
|
90897
|
-
chart.Frame.ChartBorder.Right-=toolsWidth;
|
|
90898
|
-
chart.SetSizeChange(true);
|
|
90899
|
-
chart.Draw();
|
|
90900
|
-
}
|
|
90901
|
-
}
|
|
90902
|
-
);
|
|
90903
|
-
}
|
|
90904
|
-
else
|
|
90905
|
-
{
|
|
90906
|
-
data.push(
|
|
90907
|
-
{
|
|
90908
|
-
text: "画图工具",
|
|
90909
|
-
click: function () {
|
|
90910
|
-
var option={Name:'画图工具', Top:chart.Frame.ChartBorder.Top };
|
|
90911
|
-
var extendChart=chart.CreateExtendChart(option.Name, option); //创建扩展图形
|
|
90912
|
-
chart.SetSizeChange(true);
|
|
90913
|
-
chart.Draw();
|
|
90914
|
-
}
|
|
90915
|
-
}
|
|
90916
|
-
);
|
|
90917
|
-
}
|
|
90918
|
-
|
|
90919
|
-
var StockChip=chart.GetExtendChartByClassName('StockChip');
|
|
90920
|
-
if (StockChip)
|
|
90921
|
-
{
|
|
90922
|
-
data.push(
|
|
90923
|
-
{
|
|
90924
|
-
text: "关闭移动筹码",
|
|
90925
|
-
click: function ()
|
|
90926
|
-
{
|
|
90927
|
-
var chipWidth=StockChip.Chart.Width;
|
|
90928
|
-
var chipIndex=parseInt(StockChip.Index);
|
|
90929
|
-
for(var i=chipIndex+1; i<chart.ExtendChartPaint.length; ++i) //在筹码后面创建的需要筹码的宽度
|
|
90930
|
-
{
|
|
90931
|
-
var item=chart.ExtendChartPaint[i];
|
|
90932
|
-
if (item.ClassName=='DrawToolsButton')
|
|
90933
|
-
{
|
|
90934
|
-
item.Left-=chipWidth;
|
|
90935
|
-
}
|
|
90936
|
-
}
|
|
90937
|
-
chart.DeleteExtendChart(StockChip);
|
|
90938
|
-
chart.Frame.ChartBorder.Right-=chipWidth;
|
|
90939
|
-
chart.SetSizeChange(true);
|
|
90940
|
-
chart.Draw();
|
|
90941
|
-
}
|
|
90942
|
-
|
|
90943
|
-
}
|
|
90944
|
-
);
|
|
90945
|
-
}
|
|
90946
|
-
else
|
|
90947
|
-
{
|
|
90948
|
-
data.push(
|
|
90949
|
-
{
|
|
90950
|
-
text: "移动筹码",
|
|
90951
|
-
click: function () {
|
|
90952
|
-
var option={Name:'筹码分布', ShowType:1, Width:230 };
|
|
90953
|
-
var extendChart=chart.CreateExtendChart(option.Name, option); //创建扩展图形
|
|
90954
|
-
chart.SetSizeChange(true);
|
|
90955
|
-
chart.Draw();
|
|
90956
|
-
}
|
|
90957
|
-
}
|
|
90958
|
-
);
|
|
90959
|
-
}
|
|
90960
|
-
|
|
90961
|
-
return data;
|
|
90962
|
-
}
|
|
90963
|
-
|
|
90964
|
-
//缺口提示
|
|
90965
|
-
this.GetPriceGap=function(chart)
|
|
90966
|
-
{
|
|
90967
|
-
var klineChart=chart.ChartPaint[0];
|
|
90968
|
-
var priceGap=klineChart.PriceGap;
|
|
90969
|
-
var data=
|
|
90970
|
-
[
|
|
90971
|
-
{
|
|
90972
|
-
text: "显示1个缺口",
|
|
90973
|
-
click: function () { chart.ChangePriceGap({ Enable:true, Count:1 }); }
|
|
90974
|
-
},
|
|
90975
|
-
{
|
|
90976
|
-
text: "显示2个缺口",
|
|
90977
|
-
click: function () { chart.ChangePriceGap({ Enable:true, Count:2 }); }
|
|
90978
|
-
},
|
|
90979
|
-
{
|
|
90980
|
-
text: "显示3个缺口",
|
|
90981
|
-
click: function () { chart.ChangePriceGap({ Enable:true, Count:3 }); }
|
|
90982
|
-
},
|
|
90983
|
-
{
|
|
90984
|
-
text: "隐藏缺口",
|
|
90985
|
-
click: function () { chart.ChangePriceGap({ Enable:false }); }
|
|
90986
|
-
}
|
|
90987
|
-
];
|
|
90988
|
-
|
|
90989
|
-
if (!priceGap.Enable || priceGap.Count<=0)
|
|
90990
|
-
{
|
|
90991
|
-
data[data.length-1].selected=true; //选中
|
|
90992
|
-
}
|
|
90993
|
-
else if (priceGap.Enable && priceGap.Count>0)
|
|
90994
|
-
{
|
|
90995
|
-
var index=priceGap.Count-1;
|
|
90996
|
-
if (index>data.length-2) index=data.length-2;
|
|
90997
|
-
data[index].selected=true; //选中
|
|
90998
|
-
}
|
|
90999
|
-
|
|
91000
|
-
return data;
|
|
91001
|
-
}
|
|
91002
|
-
|
|
91003
|
-
this.GetBGSplit=function(chart)
|
|
91004
|
-
{
|
|
91005
|
-
var data=
|
|
91006
|
-
[
|
|
91007
|
-
{
|
|
91008
|
-
text: "启用",
|
|
91009
|
-
click: function ()
|
|
91010
|
-
{
|
|
91011
|
-
chart.CreateExtendChart("SessionBreaksPaint", { });
|
|
91012
|
-
chart.Draw();
|
|
91013
|
-
}
|
|
91014
|
-
},
|
|
91015
|
-
{
|
|
91016
|
-
text: "关闭",
|
|
91017
|
-
click: function ()
|
|
91018
|
-
{
|
|
91019
|
-
var finder=chart.GetExtendChartByClassName("SessionBreaksPaint");
|
|
91020
|
-
if (finder)
|
|
91021
|
-
{
|
|
91022
|
-
chart.DeleteExtendChartByID(finder.Chart.ID);
|
|
91023
|
-
chart.Draw();
|
|
91024
|
-
}
|
|
91025
|
-
}
|
|
91026
|
-
},
|
|
91027
|
-
];
|
|
91028
|
-
|
|
91029
|
-
var finder=chart.GetExtendChartByClassName("SessionBreaksPaint");
|
|
91030
|
-
if (finder) data[0].selected=true;
|
|
91031
|
-
else data[1].selected=true;
|
|
91032
|
-
|
|
91033
|
-
return data;
|
|
91034
|
-
}
|
|
91035
|
-
|
|
91036
|
-
|
|
91037
|
-
this.GetKLineInfo=function(chart)
|
|
91038
|
-
{
|
|
91039
|
-
var setInfo=new Set();
|
|
91040
|
-
for(var i in chart.ChartInfo)
|
|
91041
|
-
{
|
|
91042
|
-
var item=chart.ChartInfo[i];
|
|
91043
|
-
setInfo.add(item.ClassName);
|
|
91044
|
-
}
|
|
91045
|
-
|
|
91046
|
-
var aryKLineInfo=["公告","业绩预告","调研","大宗交易","龙虎榜","互动易"]
|
|
91047
|
-
|
|
91048
|
-
var data=[];
|
|
91049
|
-
for(var i in aryKLineInfo)
|
|
91050
|
-
{
|
|
91051
|
-
var infoName=aryKLineInfo[i];
|
|
91052
|
-
var classInfo=JSKLineInfoMap.GetClassInfo(infoName);
|
|
91053
|
-
if (!classInfo) continue;
|
|
91054
|
-
|
|
91055
|
-
var item=this.CreateKlineInfoItem(infoName, setInfo.has(classInfo.ClassName), chart);
|
|
91056
|
-
data.push(item);
|
|
91057
|
-
}
|
|
91058
|
-
|
|
91059
|
-
if (chart.ChartInfo.length>0)
|
|
91060
|
-
{
|
|
91061
|
-
data[data.length-1].isBorder=true;
|
|
91062
|
-
var item={ text:'删除所有', click:function() { chart.ClearKLineInfo()} };
|
|
91063
|
-
data.push(item);
|
|
91064
|
-
|
|
91065
|
-
}
|
|
91066
|
-
|
|
91067
|
-
return data;
|
|
91068
|
-
}
|
|
91069
|
-
|
|
91070
|
-
this.CreateKlineInfoItem=function(infoName,bExist,chart)
|
|
91071
|
-
{
|
|
91072
|
-
var item=
|
|
91073
|
-
{
|
|
91074
|
-
text:infoName,
|
|
91075
|
-
selected:bExist
|
|
91076
|
-
}
|
|
91077
|
-
|
|
91078
|
-
if (bExist) item.click=function() { chart.DeleteKLineInfo(infoName) };
|
|
91079
|
-
else item.click=function() { chart.AddKLineInfo(infoName,true) }
|
|
91080
|
-
|
|
91081
|
-
return item;
|
|
91082
|
-
}
|
|
91083
|
-
|
|
91084
|
-
this.DoModal=function(event)
|
|
91085
|
-
{
|
|
91086
|
-
var chart=event.data.Chart;
|
|
91087
|
-
var rightMenu=chart.RightMenu;
|
|
91088
|
-
var x = event.offsetX;
|
|
91089
|
-
var y = event.offsetY;
|
|
91090
|
-
|
|
91091
|
-
var dataList=[{
|
|
91092
|
-
text: "分析周期",
|
|
91093
|
-
children: this.GetPeriod(chart)
|
|
91094
|
-
},
|
|
91095
|
-
{
|
|
91096
|
-
text: "复权处理",
|
|
91097
|
-
children: this.GetRight(chart)
|
|
91098
|
-
},
|
|
91099
|
-
{
|
|
91100
|
-
text: "指标切换",
|
|
91101
|
-
children: this.GetIndex(chart)
|
|
91102
|
-
},
|
|
91103
|
-
{
|
|
91104
|
-
text:"五彩K线",
|
|
91105
|
-
children: this.GetColorIndex(chart)
|
|
91106
|
-
},
|
|
91107
|
-
{
|
|
91108
|
-
text:'专家系统',
|
|
91109
|
-
children: this.GetTradeIndex(chart)
|
|
91110
|
-
},
|
|
91111
|
-
{
|
|
91112
|
-
text:'信息地雷',
|
|
91113
|
-
children: this.GetKLineInfo(chart)
|
|
91114
|
-
},
|
|
91115
|
-
{
|
|
91116
|
-
text:'缺口提示',
|
|
91117
|
-
children: this.GetPriceGap(chart)
|
|
91118
|
-
},
|
|
91119
|
-
{
|
|
91120
|
-
text: "叠加品种",
|
|
91121
|
-
children: this.GetOverlay(chart)
|
|
91122
|
-
},
|
|
91123
|
-
{
|
|
91124
|
-
text:'主图线型',
|
|
91125
|
-
children: this.GetKLineType(chart)
|
|
91126
|
-
},
|
|
91127
|
-
{
|
|
91128
|
-
text:"坐标类型",
|
|
91129
|
-
children:this.GetCoordinateType(chart)
|
|
91130
|
-
},
|
|
91131
|
-
{
|
|
91132
|
-
text:'指标窗口个数',
|
|
91133
|
-
children: this.GetIndexWindowCount(chart)
|
|
91134
|
-
},
|
|
91135
|
-
{
|
|
91136
|
-
text:'鼠标拖拽',
|
|
91137
|
-
children: this.GetDragModeType(chart)
|
|
91138
|
-
},
|
|
91139
|
-
{
|
|
91140
|
-
text:"工具",
|
|
91141
|
-
children:this.GetTools(chart)
|
|
91142
|
-
},
|
|
91143
|
-
{
|
|
91144
|
-
text:"背景分割",
|
|
91145
|
-
children:this.GetBGSplit(chart)
|
|
91146
|
-
}
|
|
91147
|
-
];
|
|
91148
|
-
|
|
91149
|
-
var upperSymbol=chart.Symbol.toUpperCase();
|
|
91150
|
-
if(MARKET_SUFFIX_NAME.IsSHSZIndex(chart.Symbol) || MARKET_SUFFIX_NAME.IsBIT(upperSymbol))
|
|
91151
|
-
{
|
|
91152
|
-
dataList.splice(1,1);
|
|
91153
|
-
}
|
|
91154
|
-
|
|
91155
|
-
var identify=event.data.FrameID;
|
|
91156
|
-
var overlayIndex=this.GetOverlayIndex(chart,identify);
|
|
91157
|
-
if (overlayIndex && overlayIndex.length>0)
|
|
91158
|
-
{
|
|
91159
|
-
var delOverlayIndexMenu={ text:'删除叠加指标', children:this.GetDeleteOverlayIndex(chart,overlayIndex) }
|
|
91160
|
-
dataList.splice(3,0,delOverlayIndexMenu);
|
|
91161
|
-
}
|
|
91162
|
-
|
|
91163
|
-
JSConsole.Chart.Log('[KLineRightMenu::DoModal]',identify);
|
|
91164
|
-
rightMenu.Show({
|
|
91165
|
-
windowIndex :identify,
|
|
91166
|
-
x:x+chart.UIElement.offsetLeft,
|
|
91167
|
-
y:y+chart.UIElement.offsetTop,
|
|
91168
|
-
position:chart.Frame.Position,
|
|
91169
|
-
data:dataList
|
|
91170
|
-
})
|
|
91171
|
-
|
|
91172
|
-
$(document).click(function () {
|
|
91173
|
-
rightMenu.Hide();
|
|
91174
|
-
});
|
|
91175
|
-
}
|
|
91176
|
-
|
|
91177
|
-
this.GetOverlayIndex=function(chart, windowsIndex)
|
|
91178
|
-
{
|
|
91179
|
-
if (windowsIndex>=chart.Frame.SubFrame.length || windowsIndex<0) return [];
|
|
91180
|
-
|
|
91181
|
-
var result=[];
|
|
91182
|
-
var item=chart.Frame.SubFrame[windowsIndex];
|
|
91183
|
-
for(var i in item.OverlayIndex)
|
|
91184
|
-
{
|
|
91185
|
-
var overlayItem=item.OverlayIndex[i];
|
|
91186
|
-
result.push({Name:overlayItem.Script.Name, Identify:overlayItem.Identify});
|
|
91187
|
-
}
|
|
91188
|
-
|
|
91189
|
-
return result;
|
|
91190
|
-
}
|
|
91191
|
-
|
|
91192
|
-
this.GetDeleteOverlayIndex=function(chart,overlayIndex)
|
|
91193
|
-
{
|
|
91194
|
-
var data=[];
|
|
91195
|
-
for(var i in overlayIndex)
|
|
91196
|
-
{
|
|
91197
|
-
let identify=overlayIndex[i].Identify;
|
|
91198
|
-
data.push({text:overlayIndex[i].Name, click:function()
|
|
91199
|
-
{
|
|
91200
|
-
chart.DeleteOverlayWindowsIndex(identify)
|
|
91201
|
-
}});
|
|
91202
|
-
}
|
|
91203
|
-
|
|
91204
|
-
return data;
|
|
91205
|
-
}
|
|
91206
|
-
}
|
|
91207
|
-
|
|
91208
|
-
//K线区间选择右键菜单
|
|
91209
|
-
function KLineSelectRightMenu(divElement)
|
|
91210
|
-
{
|
|
91211
|
-
this.newMethod=KLineRightMenu; //派生
|
|
91212
|
-
this.newMethod(divElement);
|
|
91213
|
-
delete this.newMethod;
|
|
91214
|
-
|
|
91215
|
-
this.DoModal=function(event)
|
|
91216
|
-
{
|
|
91217
|
-
var chart=event.data.Chart;
|
|
91218
|
-
var rightMenu=this;
|
|
91219
|
-
var x = event.data.X;
|
|
91220
|
-
var y = event.data.Y;
|
|
91221
|
-
|
|
91222
|
-
var dataList=
|
|
91223
|
-
[
|
|
91224
|
-
{
|
|
91225
|
-
text: "区间统计",
|
|
91226
|
-
click: function ()
|
|
91227
|
-
{
|
|
91228
|
-
JSConsole.Chart.Log('[KLineSelectRightMenu::click] 区间统计');
|
|
91229
|
-
rightMenu.Hide();
|
|
91230
|
-
var dialog=new KLineSelectRectDialog(divElement);
|
|
91231
|
-
dialog.DoModal(event);
|
|
91232
|
-
}
|
|
91233
|
-
},
|
|
91234
|
-
{
|
|
91235
|
-
text:'区间放大',
|
|
91236
|
-
click:function()
|
|
91237
|
-
{
|
|
91238
|
-
JSConsole.Chart.Log('[KLineSelectRightMenu::click] 区间放大');
|
|
91239
|
-
var chart=event.data.Chart;
|
|
91240
|
-
chart.ShowSelectData(event.data.SelectData);
|
|
91241
|
-
}
|
|
91242
|
-
}
|
|
91243
|
-
];
|
|
91244
|
-
|
|
91245
|
-
rightMenu.Show({
|
|
91246
|
-
x:x,
|
|
91247
|
-
y:y,
|
|
91248
|
-
position:chart.Frame.Position,
|
|
91249
|
-
data:dataList
|
|
91250
|
-
});
|
|
91251
|
-
}
|
|
91252
|
-
|
|
91253
|
-
this.Show=function (obj)
|
|
91254
|
-
{
|
|
91255
|
-
var _self = this;
|
|
91256
|
-
$.extend(_self.option, obj);
|
|
91257
|
-
|
|
91258
|
-
//判断是否重复创建
|
|
91259
|
-
if (!_self.ID) _self.Create();
|
|
91260
|
-
//判断下如果DOM没了需要重新创建
|
|
91261
|
-
var divIdName='topMenu_'+_self.ID;
|
|
91262
|
-
var divDom=document.getElementById(divIdName);
|
|
91263
|
-
if (!divDom) _self.Create();
|
|
91264
|
-
|
|
91265
|
-
var $topMenu = $("#topMenu_"+_self.ID),
|
|
91266
|
-
topWidth = $topMenu.outerWidth(),
|
|
91267
|
-
topHeight = $topMenu.outerHeight();
|
|
91268
|
-
|
|
91269
|
-
$topMenu.contextmenu(function()
|
|
91270
|
-
{
|
|
91271
|
-
return false; //屏蔽系统右键菜单
|
|
91272
|
-
});
|
|
91273
|
-
|
|
91274
|
-
var x = _self.option.x,
|
|
91275
|
-
y = _self.option.y;
|
|
91276
|
-
|
|
91277
|
-
if (topWidth > _self.option.position.X + _self.option.position.W- x) //超过了右边距
|
|
91278
|
-
x = x - topWidth;
|
|
91279
|
-
|
|
91280
|
-
if (topHeight > _self.option.position.Y +_self.option.position.H - y)//超过了下边距
|
|
91281
|
-
y = y - topHeight;
|
|
91282
|
-
|
|
91283
|
-
$topMenu.hide();
|
|
91284
|
-
$topMenu.css({ position:"absolute",left: x + "px", top: y + "px" }).show();
|
|
91285
|
-
|
|
91286
|
-
$("#topMenu_" + _self.ID).find("tr").show(); //把菜单列表显示
|
|
91287
|
-
|
|
91288
|
-
this.isInit = true;
|
|
91289
|
-
}
|
|
91290
|
-
}
|
|
91291
|
-
|
|
91292
|
-
//分钟数据右键菜单
|
|
91293
|
-
function MinuteRightMenu(divElement)
|
|
91294
|
-
{
|
|
91295
|
-
this.newMethod=KLineRightMenu; //派生
|
|
91296
|
-
this.newMethod(divElement);
|
|
91297
|
-
delete this.newMethod;
|
|
91298
|
-
|
|
91299
|
-
this.DoModal=function(event)
|
|
91300
|
-
{
|
|
91301
|
-
var chart=event.data.Chart;
|
|
91302
|
-
var rightMenu=chart.RightMenu;
|
|
91303
|
-
var x = event.offsetX;
|
|
91304
|
-
var y = event.offsetY;
|
|
91305
|
-
|
|
91306
|
-
var dataList=
|
|
91307
|
-
[
|
|
91308
|
-
{
|
|
91309
|
-
text: "叠加品种",
|
|
91310
|
-
children: this.GetOverlay(chart)
|
|
91311
|
-
},
|
|
91312
|
-
{
|
|
91313
|
-
text: "多日分时图",
|
|
91314
|
-
children: this.GetDayCount(chart)
|
|
91315
|
-
},
|
|
91316
|
-
{
|
|
91317
|
-
text:'指标窗口个数',
|
|
91318
|
-
children: this.GetIndexWindowCount(chart)
|
|
91319
|
-
},
|
|
91320
|
-
{
|
|
91321
|
-
text: "副图指标切换",
|
|
91322
|
-
children: this.GetIndex(chart)
|
|
91323
|
-
},
|
|
91324
|
-
{
|
|
91325
|
-
text:"区间选择",
|
|
91326
|
-
children:this.GetSelectRect(chart)
|
|
91327
|
-
},
|
|
91328
|
-
|
|
91329
|
-
];
|
|
91330
|
-
|
|
91331
|
-
var symbol=chart.Symbol;
|
|
91332
|
-
if (MARKET_SUFFIX_NAME.IsSHSZStockA(symbol))
|
|
91333
|
-
{
|
|
91334
|
-
dataList.push({text:'集合竞价',children: this.GetShowBeforeData(chart)});
|
|
91335
|
-
}
|
|
91336
|
-
|
|
91337
|
-
dataList.push({text:"工具", children:this.GetTools(chart)});
|
|
91338
|
-
|
|
91339
|
-
var identify=event.data.FrameID;
|
|
91340
|
-
var overlayIndex=this.GetOverlayIndex(chart,identify);
|
|
91341
|
-
if (overlayIndex && overlayIndex.length>0)
|
|
91342
|
-
{
|
|
91343
|
-
var delOverlayIndexMenu={ text:'删除叠加指标', children:this.GetDeleteOverlayIndex(chart,overlayIndex) }
|
|
91344
|
-
dataList.splice(3,0,delOverlayIndexMenu);
|
|
91345
|
-
}
|
|
91346
|
-
|
|
91347
|
-
var identify=event.data.FrameID;
|
|
91348
|
-
JSConsole.Chart.Log('[MinuteRightMenu::DoModal]',identify);
|
|
91349
|
-
rightMenu.Show({
|
|
91350
|
-
windowIndex :identify,
|
|
91351
|
-
x:x+chart.UIElement.offsetLeft,
|
|
91352
|
-
y:y+chart.UIElement.offsetTop,
|
|
91353
|
-
position:chart.Frame.Position,
|
|
91354
|
-
data:dataList
|
|
91355
|
-
})
|
|
91356
|
-
|
|
91357
|
-
$(document).click(function () {
|
|
91358
|
-
rightMenu.Hide();
|
|
91359
|
-
});
|
|
91360
|
-
}
|
|
91361
|
-
|
|
91362
|
-
this.GetDayCount=function(chart)
|
|
91363
|
-
{
|
|
91364
|
-
var data=
|
|
91365
|
-
[
|
|
91366
|
-
{
|
|
91367
|
-
text: "当日分时图",
|
|
91368
|
-
click: function () { chart.ChangeDayCount(1); },
|
|
91369
|
-
isBorder:true
|
|
91370
|
-
},
|
|
91371
|
-
{
|
|
91372
|
-
text: "最近2日",
|
|
91373
|
-
click: function () { chart.ChangeDayCount(2); }
|
|
91374
|
-
},
|
|
91375
|
-
{
|
|
91376
|
-
text: "最近3日",
|
|
91377
|
-
click: function () { chart.ChangeDayCount(3); }
|
|
91378
|
-
},
|
|
91379
|
-
{
|
|
91380
|
-
text: "最近4日",
|
|
91381
|
-
click: function () { chart.ChangeDayCount(4); }
|
|
91382
|
-
},
|
|
91383
|
-
{
|
|
91384
|
-
text: "最近5日",
|
|
91385
|
-
click: function () { chart.ChangeDayCount(5); }
|
|
91386
|
-
},
|
|
91387
|
-
{
|
|
91388
|
-
text: "最近6日",
|
|
91389
|
-
click: function () { chart.ChangeDayCount(6); }
|
|
91390
|
-
}
|
|
91391
|
-
];
|
|
91392
|
-
|
|
91393
|
-
if ((chart.DayCount-1)>=0 && (chart.DayCount-1)<data.length) data[chart.DayCount-1].selected=true;
|
|
91394
|
-
|
|
91395
|
-
return data;
|
|
91396
|
-
}
|
|
91397
|
-
|
|
91398
|
-
this.GetIndex=function (chart)
|
|
91399
|
-
{
|
|
91400
|
-
var data=
|
|
91401
|
-
[
|
|
91402
|
-
{
|
|
91403
|
-
text: "MACD",
|
|
91404
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'MACD') }
|
|
91405
|
-
},
|
|
91406
|
-
{
|
|
91407
|
-
text: "DMI",
|
|
91408
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'DMI') }
|
|
91409
|
-
},
|
|
91410
|
-
{
|
|
91411
|
-
text: "DMA",
|
|
91412
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'DMA') }
|
|
91413
|
-
},
|
|
91414
|
-
{
|
|
91415
|
-
text: "BRAR",
|
|
91416
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'BRAR') }
|
|
91417
|
-
},
|
|
91418
|
-
{
|
|
91419
|
-
text: "KDJ",
|
|
91420
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'KDJ') }
|
|
91421
|
-
},
|
|
91422
|
-
{
|
|
91423
|
-
text: "RSI",
|
|
91424
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'RSI') }
|
|
91425
|
-
},
|
|
91426
|
-
{
|
|
91427
|
-
text: "WR",
|
|
91428
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'WR') }
|
|
91429
|
-
},
|
|
91430
|
-
{
|
|
91431
|
-
text: "CCI",
|
|
91432
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'CCI') }
|
|
91433
|
-
},
|
|
91434
|
-
{
|
|
91435
|
-
text: "TRIX",
|
|
91436
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'TRIX') }
|
|
91437
|
-
}
|
|
91438
|
-
];
|
|
91439
|
-
|
|
91440
|
-
return data;
|
|
91441
|
-
}
|
|
91442
|
-
|
|
91443
|
-
this.GetShowBeforeData=function(chart) //是否显示集合竞价
|
|
91444
|
-
{
|
|
91445
|
-
if (chart.IsShowBeforeData)
|
|
91446
|
-
{
|
|
91447
|
-
var data=
|
|
91448
|
-
[
|
|
91449
|
-
{
|
|
91450
|
-
text: "隐藏",
|
|
91451
|
-
click: function () { chart.ShowCallAuctionData( { Left:false, MultiDay:{ Left:false }} ); },
|
|
91452
|
-
}
|
|
91453
|
-
];
|
|
91454
|
-
|
|
91455
|
-
return data;
|
|
91456
|
-
}
|
|
91457
|
-
else
|
|
91458
|
-
{
|
|
91459
|
-
var data=
|
|
91460
|
-
[
|
|
91461
|
-
{
|
|
91462
|
-
text: "显示",
|
|
91463
|
-
click: function () { chart.ShowCallAuctionData({Left:true, MultiDay:{ Left:true }}); },
|
|
91464
|
-
}
|
|
91465
|
-
];
|
|
91466
|
-
|
|
91467
|
-
return data;
|
|
91468
|
-
}
|
|
91469
|
-
}
|
|
91470
|
-
|
|
91471
|
-
this.GetSelectRect=function(chart) //区间选择
|
|
91472
|
-
{
|
|
91473
|
-
if (chart.EnableSelectRect)
|
|
91474
|
-
{
|
|
91475
|
-
var data=
|
|
91476
|
-
[
|
|
91477
|
-
{
|
|
91478
|
-
text: "禁用区间选择",
|
|
91479
|
-
click: function () { chart.EnableSelectRect=false; },
|
|
91480
|
-
}
|
|
91481
|
-
];
|
|
91482
|
-
|
|
91483
|
-
return data;
|
|
91484
|
-
}
|
|
91485
|
-
else
|
|
91486
|
-
{
|
|
91487
|
-
var data=
|
|
91488
|
-
[
|
|
91489
|
-
{
|
|
91490
|
-
text: "启动区间选择",
|
|
91491
|
-
click: function () { chart.EnableSelectRect=true },
|
|
91492
|
-
}
|
|
91493
|
-
];
|
|
91494
|
-
|
|
91495
|
-
return data;
|
|
91496
|
-
}
|
|
91497
|
-
}
|
|
91498
|
-
|
|
91499
|
-
//指标窗口个数
|
|
91500
|
-
this.GetIndexWindowCount=function(chart)
|
|
91501
|
-
{
|
|
91502
|
-
var data=
|
|
91503
|
-
[
|
|
91504
|
-
{
|
|
91505
|
-
text: "1个窗口",
|
|
91506
|
-
click: function () { chart.ChangeIndexWindowCount(2); }
|
|
91507
|
-
},
|
|
91508
|
-
{
|
|
91509
|
-
text: "2个窗口",
|
|
91510
|
-
click: function () { chart.ChangeIndexWindowCount(3); }
|
|
91511
|
-
},
|
|
91512
|
-
{
|
|
91513
|
-
text: "3个窗口",
|
|
91514
|
-
click: function () { chart.ChangeIndexWindowCount(4); }
|
|
91515
|
-
},
|
|
91516
|
-
{
|
|
91517
|
-
text: "4个窗口",
|
|
91518
|
-
click: function () { chart.ChangeIndexWindowCount(5); }
|
|
91519
|
-
},
|
|
91520
|
-
{
|
|
91521
|
-
text: "5个窗口",
|
|
91522
|
-
click: function () { chart.ChangeIndexWindowCount(6); }
|
|
91523
|
-
}
|
|
91524
|
-
];
|
|
91525
|
-
|
|
91526
|
-
var count=chart.Frame.SubFrame.length-1;
|
|
91527
|
-
if ((count-1)>=0 && (count-1)<data.length) data[count-1].selected=true; //选中
|
|
91528
|
-
|
|
91529
|
-
return data;
|
|
91530
|
-
}
|
|
91531
|
-
|
|
91532
|
-
//工具
|
|
91533
|
-
this.GetTools=function(chart)
|
|
91534
|
-
{
|
|
91535
|
-
var data=[];
|
|
91536
|
-
var drawTools=chart.GetExtendChartByClassName('DrawToolsButton');
|
|
91537
|
-
if (drawTools)
|
|
91538
|
-
{
|
|
91539
|
-
data.push(
|
|
91540
|
-
{
|
|
91541
|
-
text: "关闭画图工具",
|
|
91542
|
-
click: function ()
|
|
91543
|
-
{
|
|
91544
|
-
var toolsWidth=drawTools.Chart.Width;
|
|
91545
|
-
var toolsIndex=parseInt(drawTools.Index);
|
|
91546
|
-
chart.DeleteExtendChart(drawTools);
|
|
91547
|
-
chart.Frame.ChartBorder.Right-=toolsWidth;
|
|
91548
|
-
chart.SetSizeChange(true);
|
|
91549
|
-
chart.Draw();
|
|
91550
|
-
}
|
|
91551
|
-
}
|
|
91552
|
-
);
|
|
91553
|
-
}
|
|
91554
|
-
else
|
|
91555
|
-
{
|
|
91556
|
-
data.push(
|
|
91557
|
-
{
|
|
91558
|
-
text: "画图工具",
|
|
91559
|
-
click: function () {
|
|
91560
|
-
var option={Name:'画图工具', Top:chart.Frame.ChartBorder.Top };
|
|
91561
|
-
var extendChart=chart.CreateExtendChart(option.Name, option); //创建扩展图形
|
|
91562
|
-
chart.SetSizeChange(true);
|
|
91563
|
-
chart.Draw();
|
|
91564
|
-
}
|
|
91565
|
-
}
|
|
91566
|
-
);
|
|
91567
|
-
}
|
|
91568
|
-
|
|
91569
|
-
return data;
|
|
91570
|
-
}
|
|
91571
|
-
}
|
|
91572
|
-
|
|
91573
90178
|
//画图工具 单个图形设置
|
|
91574
90179
|
function ChartPictureSettingMenu(divElement)
|
|
91575
90180
|
{
|
|
@@ -135650,6 +134255,7 @@ function JSPopMenu()
|
|
|
135650
134255
|
this.ClickCallback=null; //点击回调
|
|
135651
134256
|
this.CheckedClassName="UMyChart_MenuItem_Span_Checked iconfont icon-checked"; //选中图标
|
|
135652
134257
|
this.RightArrowClassName="UMyChart_MenuItem_Span_Arrow iconfont icon-menu_arraw_right"; //右侧箭头
|
|
134258
|
+
this.SelectedClassName="UMyChart_MenuItem_Tr_Selected";
|
|
135653
134259
|
|
|
135654
134260
|
this.AryTDClassName=
|
|
135655
134261
|
[
|
|
@@ -135722,7 +134328,7 @@ function JSPopMenu()
|
|
|
135722
134328
|
{
|
|
135723
134329
|
var trDom=document.createElement("tr");
|
|
135724
134330
|
trDom.className='UMyChart_MenuItem_Tr';
|
|
135725
|
-
|
|
134331
|
+
|
|
135726
134332
|
var prtTdDom=null;
|
|
135727
134333
|
for(var i=0;i<this.AryTDClassName.length;++i)
|
|
135728
134334
|
{
|
|
@@ -135735,6 +134341,7 @@ function JSPopMenu()
|
|
|
135735
134341
|
{
|
|
135736
134342
|
var spanDom=document.createElement("span");
|
|
135737
134343
|
spanDom.className=this.CheckedClassName;
|
|
134344
|
+
spanDom.style["font-size"]="10px";
|
|
135738
134345
|
tdDom.appendChild(spanDom);
|
|
135739
134346
|
}
|
|
135740
134347
|
}
|
|
@@ -135752,6 +134359,7 @@ function JSPopMenu()
|
|
|
135752
134359
|
{
|
|
135753
134360
|
var spanDom=document.createElement("span");
|
|
135754
134361
|
spanDom.className=this.RightArrowClassName;
|
|
134362
|
+
spanDom.style["font-size"]="10px";
|
|
135755
134363
|
tdDom.appendChild(spanDom);
|
|
135756
134364
|
}
|
|
135757
134365
|
}
|
|
@@ -135779,7 +134387,21 @@ function JSPopMenu()
|
|
|
135779
134387
|
var subItem=item.SubMenu[i];
|
|
135780
134388
|
if (subItem.Name==JSPopMenu.SEPARATOR_LINE_NAME)
|
|
135781
134389
|
{
|
|
135782
|
-
|
|
134390
|
+
var trSeparator=document.createElement("tr");
|
|
134391
|
+
trSeparator.className='UMyChart_MenuItem_Tr_Separator';
|
|
134392
|
+
var tdDom=document.createElement("td");
|
|
134393
|
+
tdDom.className="UMyChart_MenuItem_Td_Status_Separator";
|
|
134394
|
+
trSeparator.appendChild(tdDom);
|
|
134395
|
+
var tdDom=document.createElement("td");
|
|
134396
|
+
tdDom.className="UMyChart_MenuItem_Td_Separator";
|
|
134397
|
+
trSeparator.appendChild(tdDom);
|
|
134398
|
+
var tdDom=document.createElement("td");
|
|
134399
|
+
tdDom.className="UMyChart_MenuItem_Td_Separator";
|
|
134400
|
+
trSeparator.appendChild(tdDom);
|
|
134401
|
+
var tdDom=document.createElement("td");
|
|
134402
|
+
tdDom.className="UMyChart_MenuItem_Td_Separator";
|
|
134403
|
+
trSeparator.appendChild(tdDom);
|
|
134404
|
+
subTbody.appendChild(trSeparator);
|
|
135783
134405
|
continue;
|
|
135784
134406
|
}
|
|
135785
134407
|
|
|
@@ -135821,6 +134443,17 @@ function JSPopMenu()
|
|
|
135821
134443
|
if (!this.RootDOM) return;
|
|
135822
134444
|
if (!IFrameSplitOperator.IsNumber(x) || !IFrameSplitOperator.IsNumber(y)) return;
|
|
135823
134445
|
|
|
134446
|
+
//菜单在当前屏幕无法显示需要调整
|
|
134447
|
+
var menuHeight=this.RootDOM.offsetHeight;
|
|
134448
|
+
var yMenuBottom=y+menuHeight;
|
|
134449
|
+
var yBottom=window.innerHeight-15;
|
|
134450
|
+
if (yMenuBottom>yBottom) y=yBottom-menuHeight;
|
|
134451
|
+
|
|
134452
|
+
var menuWidth=this.RootDOM.offsetWidth;
|
|
134453
|
+
var yMenuRight=x+menuWidth;
|
|
134454
|
+
var yRight=window.innerWidth-15;
|
|
134455
|
+
if (yMenuRight>yRight) x=yRight-menuWidth;
|
|
134456
|
+
|
|
135824
134457
|
this.RootDOM.style.visibility='visible';
|
|
135825
134458
|
this.RootDOM.style.top = y + "px";
|
|
135826
134459
|
this.RootDOM.style.left = x + "px";
|
|
@@ -135839,6 +134472,8 @@ function JSPopMenu()
|
|
|
135839
134472
|
if (parentItem && parentItem.PopMenu && parentItem.PopMenu!=subMenu)
|
|
135840
134473
|
{
|
|
135841
134474
|
parentItem.PopMenu.style.visibility="hidden";
|
|
134475
|
+
if (parentItem.PopRow) parentItem.PopRow.classList.remove(this.SelectedClassName);
|
|
134476
|
+
|
|
135842
134477
|
parentItem.PopMenu=null;
|
|
135843
134478
|
parentItem.PopRow=null;
|
|
135844
134479
|
}
|
|
@@ -135852,8 +134487,23 @@ function JSPopMenu()
|
|
|
135852
134487
|
else
|
|
135853
134488
|
{
|
|
135854
134489
|
var rtParent=trDom.getBoundingClientRect();
|
|
135855
|
-
|
|
135856
|
-
|
|
134490
|
+
var x=rtParent.right, y=rtParent.top;
|
|
134491
|
+
|
|
134492
|
+
//菜单在当前屏幕无法显示需要调整
|
|
134493
|
+
var yBottom=window.innerHeight-15;
|
|
134494
|
+
var yRight=window.innerWidth-15;
|
|
134495
|
+
var menuHeight=subMenu.offsetHeight;
|
|
134496
|
+
var menuWidth=subMenu.offsetWidth;
|
|
134497
|
+
var yMenuBottom=y+menuHeight;
|
|
134498
|
+
var yMenuRight=x+menuWidth;
|
|
134499
|
+
|
|
134500
|
+
if (yMenuBottom>yBottom) y=yBottom-menuHeight;
|
|
134501
|
+
if (yMenuRight>yRight) x=rtParent.left-menuWidth;
|
|
134502
|
+
|
|
134503
|
+
subMenu.style.left=`${x}px`;
|
|
134504
|
+
subMenu.style.top=`${y}px`;
|
|
134505
|
+
|
|
134506
|
+
trDom.classList.add(this.SelectedClassName);
|
|
135857
134507
|
|
|
135858
134508
|
/*
|
|
135859
134509
|
if (this.Data.Position==JSPopMenu.POSITION_ID.TAB_MENU_ID)
|
|
@@ -136014,7 +134664,7 @@ function HQChartScriptWorker()
|
|
|
136014
134664
|
|
|
136015
134665
|
|
|
136016
134666
|
|
|
136017
|
-
var HQCHART_VERSION="1.1.
|
|
134667
|
+
var HQCHART_VERSION="1.1.13190";
|
|
136018
134668
|
|
|
136019
134669
|
function PrintHQChartVersion()
|
|
136020
134670
|
{
|
|
@@ -136146,7 +134796,8 @@ export default {
|
|
|
136146
134796
|
JSCHART_DRAG_ID:JSCHART_DRAG_ID,
|
|
136147
134797
|
JSCHART_BUTTON_ID:JSCHART_BUTTON_ID,
|
|
136148
134798
|
JSCHART_DATA_FIELD_ID:JSCHART_DATA_FIELD_ID,
|
|
136149
|
-
JSCHART_WORKER_MESSAGE_ID:JSCHART_WORKER_MESSAGE_ID
|
|
134799
|
+
JSCHART_WORKER_MESSAGE_ID:JSCHART_WORKER_MESSAGE_ID,
|
|
134800
|
+
JSCHART_MENU_ID:JSCHART_MENU_ID
|
|
136150
134801
|
},
|
|
136151
134802
|
|
|
136152
134803
|
|