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
package/src/jscommon/umychart.js
CHANGED
|
@@ -279,9 +279,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
279
279
|
var pixelRatio=GetDevicePixelRatio();
|
|
280
280
|
|
|
281
281
|
//右键菜单
|
|
282
|
-
if (option.IsShowRightMenu
|
|
282
|
+
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
283
283
|
if (option.ScriptError) chart.ScriptErrorCallback=option.ScriptError;
|
|
284
|
-
chart.SelectRectRightMenu=new KLineSelectRightMenu(this.DivElement);
|
|
285
284
|
if (option.EnableScrollUpDown==true) chart.EnableScrollUpDown=option.EnableScrollUpDown;
|
|
286
285
|
if (option.DisableMouse==true) chart.DisableMouse=option.DisableMouse;
|
|
287
286
|
if (option.TouchMoveMinAngle) chart.TouchMoveMinAngle=option.TouchMoveMinAngle;
|
|
@@ -695,7 +694,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
695
694
|
chart.MinuteDialog=this.MinuteDialog;
|
|
696
695
|
|
|
697
696
|
//右键菜单
|
|
698
|
-
if (option.IsShowRightMenu
|
|
697
|
+
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
699
698
|
|
|
700
699
|
if (option.KLine) //k线图的属性设置
|
|
701
700
|
{
|
|
@@ -915,7 +914,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
915
914
|
|
|
916
915
|
if (option.MinuteInfo) chart.CreateMinuteInfo(option.MinuteInfo);
|
|
917
916
|
|
|
918
|
-
if (option.IsShowRightMenu
|
|
917
|
+
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
919
918
|
|
|
920
919
|
if (IFrameSplitOperator.IsNumber(option.DayCount)) chart.DayCount=option.DayCount;
|
|
921
920
|
|
|
@@ -1634,6 +1633,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1634
1633
|
if (!chart) return false;
|
|
1635
1634
|
|
|
1636
1635
|
this.JSChartContainer=chart;
|
|
1636
|
+
chart.DivElement=this.DivElement;
|
|
1637
1637
|
|
|
1638
1638
|
if (option.DefaultCursor) chart.DefaultCursor=option.DefaultCursor;
|
|
1639
1639
|
if (option.OnCreatedCallback) option.OnCreatedCallback(chart);
|
|
@@ -1641,13 +1641,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1641
1641
|
//是否自动更新
|
|
1642
1642
|
if (option.IsAutoUpdate!=null) chart.IsAutoUpdate=option.IsAutoUpdate;
|
|
1643
1643
|
if (option.AutoUpdateFrequency>0) chart.AutoUpdateFrequency=option.AutoUpdateFrequency;
|
|
1644
|
+
|
|
1644
1645
|
//内置菜单
|
|
1645
|
-
if (option.EnablePopMenuV2===true)
|
|
1646
|
-
|
|
1647
|
-
chart.JSPopMenu=new JSPopMenu();
|
|
1648
|
-
chart.JSPopMenu.Inital();
|
|
1649
|
-
chart.EnablePopMenuV2=true;
|
|
1650
|
-
}
|
|
1646
|
+
if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
|
|
1647
|
+
|
|
1651
1648
|
//注册事件
|
|
1652
1649
|
if (option.EventCallback)
|
|
1653
1650
|
{
|
|
@@ -2650,6 +2647,10 @@ var JSCHART_MENU_ID=
|
|
|
2650
2647
|
|
|
2651
2648
|
CMD_ENABLE_SELECT_RECT_ID:22, //启动区间选择
|
|
2652
2649
|
CMD_CHANGE_DAY_COUNT_ID:23, //切换天数
|
|
2650
|
+
CMD_SHOW_BEFORE_DATA_ID:24, //显示|隐藏集合竞价
|
|
2651
|
+
|
|
2652
|
+
CMD_SELECTED_ZOOM_ID:25, //选中放大
|
|
2653
|
+
CMD_SELECTED_SUMMARY_ID:26, //区间统计
|
|
2653
2654
|
}
|
|
2654
2655
|
|
|
2655
2656
|
|
|
@@ -2737,11 +2738,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
2737
2738
|
this.LoadDataSplashTitle="数据加载中"; //下载数据提示信息
|
|
2738
2739
|
this.DefaultCursor="default"; //crosshair , default 默认手型
|
|
2739
2740
|
|
|
2740
|
-
this.EnablePopMenuV2=false;
|
|
2741
|
-
this.JSPopMenu; //内置菜单
|
|
2742
|
-
//this.JSPopMenu=new JSPopMenu(); //内置菜单
|
|
2743
|
-
//this.JSPopMenu.Inital();
|
|
2744
|
-
|
|
2745
2741
|
//绘图缓存
|
|
2746
2742
|
this.CacheCanvas=null;
|
|
2747
2743
|
this.CacheElement=null;
|
|
@@ -2820,9 +2816,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
2820
2816
|
this.SelectRect.oncontextmenu=function() { return false; }; //屏蔽选中区域系统右键菜单
|
|
2821
2817
|
uielement.parentNode.appendChild(this.SelectRect);
|
|
2822
2818
|
|
|
2823
|
-
//区间选择右键菜单
|
|
2824
|
-
this.SelectRectRightMenu;
|
|
2825
|
-
|
|
2826
2819
|
//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
|
|
2827
2820
|
this.FrameSplitData=new Map();
|
|
2828
2821
|
this.FrameSplitData.set("double",new SplitData());
|
|
@@ -2882,12 +2875,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
2882
2875
|
|
|
2883
2876
|
this.StockCache={ Data:null }; //扩展数据缓存数据
|
|
2884
2877
|
|
|
2878
|
+
this.JSPopMenu; //内置菜单
|
|
2879
|
+
this.IsShowRightMenu=true; //显示右键菜单
|
|
2880
|
+
|
|
2885
2881
|
|
|
2886
2882
|
this.ClearStockCache=function()
|
|
2887
2883
|
{
|
|
2888
2884
|
this.StockCache.Data=null;
|
|
2889
2885
|
}
|
|
2890
2886
|
|
|
2887
|
+
this.InitalPopMenu=function() //初始化弹出窗口
|
|
2888
|
+
{
|
|
2889
|
+
if (this.JSPopMenu) return;
|
|
2890
|
+
|
|
2891
|
+
this.JSPopMenu=new JSPopMenu(); //内置菜单
|
|
2892
|
+
this.JSPopMenu.Inital();
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2891
2895
|
//obj={ Element:, Canvas: }
|
|
2892
2896
|
this.SetCorssCursorElement=function(obj)
|
|
2893
2897
|
{
|
|
@@ -3056,6 +3060,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3056
3060
|
this.UIOnContextMenu=function(e)
|
|
3057
3061
|
{
|
|
3058
3062
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
3063
|
+
if (!this.IsShowRightMenu) return;
|
|
3059
3064
|
|
|
3060
3065
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
3061
3066
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
@@ -3297,7 +3302,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3297
3302
|
}
|
|
3298
3303
|
|
|
3299
3304
|
this.HideSelectRect();
|
|
3300
|
-
if (this.SelectRectRightMenu) this.SelectRectRightMenu.Hide();
|
|
3301
3305
|
if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
|
|
3302
3306
|
|
|
3303
3307
|
var paint=this.GetRectSelectPaint();
|
|
@@ -3937,17 +3941,19 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3937
3941
|
}
|
|
3938
3942
|
else
|
|
3939
3943
|
{
|
|
3940
|
-
if (isShowMenu
|
|
3944
|
+
if (isShowMenu)
|
|
3941
3945
|
{
|
|
3942
|
-
|
|
3943
|
-
{
|
|
3946
|
+
var data=
|
|
3947
|
+
{
|
|
3944
3948
|
Chart:this,
|
|
3945
3949
|
X:drag.LastMove.X-uielement.getBoundingClientRect().left,
|
|
3946
3950
|
Y:drag.LastMove.Y-uielement.getBoundingClientRect().top,
|
|
3947
3951
|
SelectData:selectData, //区间选择的数据
|
|
3948
3952
|
RectSelectPaint:paint //区间选择背景
|
|
3949
3953
|
};
|
|
3950
|
-
|
|
3954
|
+
|
|
3955
|
+
e.data=data;
|
|
3956
|
+
this.PopupSelectRectMenuV2(data, e);
|
|
3951
3957
|
}
|
|
3952
3958
|
}
|
|
3953
3959
|
}
|
|
@@ -9204,6 +9210,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9204
9210
|
if (this.ChangeDayCount && param!=null)
|
|
9205
9211
|
this.ChangeDayCount(param);
|
|
9206
9212
|
break;
|
|
9213
|
+
case JSCHART_MENU_ID.CMD_SHOW_BEFORE_DATA_ID:
|
|
9214
|
+
if (this.ShowCallAuctionData && IFrameSplitOperator.IsBool(srcParam))
|
|
9215
|
+
this.ShowCallAuctionData({ Left:srcParam, MultiDay:{ Left:srcParam }});
|
|
9216
|
+
break;
|
|
9217
|
+
|
|
9218
|
+
case JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID:
|
|
9219
|
+
if (this.ShowSelectData && srcParam) this.ShowSelectData(srcParam);
|
|
9220
|
+
break;
|
|
9221
|
+
case JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID:
|
|
9222
|
+
var dlg=new KLineSelectRectDialog(this.DivElement);
|
|
9223
|
+
dlg.DoModal(srcParam);
|
|
9224
|
+
break;
|
|
9207
9225
|
}
|
|
9208
9226
|
}
|
|
9209
9227
|
}
|
|
@@ -55901,8 +55919,9 @@ function ChartDrawHLine()
|
|
|
55901
55919
|
|
|
55902
55920
|
this.Button=
|
|
55903
55921
|
{
|
|
55904
|
-
CloseIcon: { Text:'\ue62b', Color:'rgb(255,255,255)', Family:"iconfont", Size:16 },
|
|
55905
|
-
SettingIcon: { Text:'\ue623',Color:'rgb(255,255,255)', Family:"iconfont", Size:16 }
|
|
55922
|
+
CloseIcon: { Text:'\ue62b', Color:'rgb(255,255,255)', Family:"iconfont", Size:16, ID:JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE, TooltipText:null },
|
|
55923
|
+
SettingIcon: { Text:'\ue623',Color:'rgb(255,255,255)', Family:"iconfont", Size:16, ID:JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING, TooltipText:null }
|
|
55924
|
+
//修改ID, Text , TooltipText 可以外部定制按钮
|
|
55906
55925
|
}
|
|
55907
55926
|
|
|
55908
55927
|
this.AryButton=[];
|
|
@@ -56096,6 +56115,7 @@ function ChartDrawHLine()
|
|
|
56096
56115
|
this.CalculateButtonSize();
|
|
56097
56116
|
this.DrawValueText(drawPoint[0].Y, rtDraw, labInfo);
|
|
56098
56117
|
if (labInfo) this.DrawRightLab(labInfo, rtDraw);
|
|
56118
|
+
if (labInfo) this.DrawCustomHLine(labInfo, drawPoint[0].Y);
|
|
56099
56119
|
}
|
|
56100
56120
|
|
|
56101
56121
|
|
|
@@ -56235,6 +56255,53 @@ function ChartDrawHLine()
|
|
|
56235
56255
|
}
|
|
56236
56256
|
}
|
|
56237
56257
|
|
|
56258
|
+
this.DrawCustomHLine=function(labInfo, yLine)
|
|
56259
|
+
{
|
|
56260
|
+
if (!labInfo) return;
|
|
56261
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(labInfo.AryLine)) return;
|
|
56262
|
+
|
|
56263
|
+
var left=this.Frame.ChartBorder.GetLeft();
|
|
56264
|
+
var right=this.Frame.ChartBorder.GetRight();
|
|
56265
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
56266
|
+
|
|
56267
|
+
var yMax=yLine, yMin=yLine;
|
|
56268
|
+
for(var i=0;i<labInfo.AryLine.length;++i)
|
|
56269
|
+
{
|
|
56270
|
+
var item=labInfo.AryLine[i];
|
|
56271
|
+
if (!IFrameSplitOperator.IsNumber(item.Value)) continue;
|
|
56272
|
+
|
|
56273
|
+
var y=this.Frame.GetYFromData(item.Value);
|
|
56274
|
+
var yFixed=ToFixedPoint(y);
|
|
56275
|
+
var xRight=right;
|
|
56276
|
+
if (IFrameSplitOperator.IsNumber(item.Width)) xRight=left+item.Width*pixelRatio;
|
|
56277
|
+
if (item.Color) this.Canvas.strokeStyle=item.Color;
|
|
56278
|
+
else this.Canvas.strokeStyle=this.LineColor;
|
|
56279
|
+
|
|
56280
|
+
this.Canvas.beginPath();
|
|
56281
|
+
this.Canvas.moveTo(left,yFixed);
|
|
56282
|
+
this.Canvas.lineTo(xRight,yFixed);
|
|
56283
|
+
this.Canvas.stroke();
|
|
56284
|
+
|
|
56285
|
+
if (yMax<yFixed) yMax=yFixed;
|
|
56286
|
+
if (yMin>yFixed) yMin=yFixed;
|
|
56287
|
+
}
|
|
56288
|
+
|
|
56289
|
+
if (yMax!=yMin && labInfo.VLine)
|
|
56290
|
+
{
|
|
56291
|
+
var item=labInfo.VLine;
|
|
56292
|
+
var x=left+20*pixelRatio;
|
|
56293
|
+
if (IFrameSplitOperator.IsNumber(item.XOffset)) x=left+item.XOffset*pixelRatio;
|
|
56294
|
+
x=ToFixedPoint(x);
|
|
56295
|
+
if (item.Color) this.Canvas.strokeStyle=item.Color;
|
|
56296
|
+
else this.Canvas.strokeStyle=this.LineColor;
|
|
56297
|
+
|
|
56298
|
+
this.Canvas.beginPath();
|
|
56299
|
+
this.Canvas.moveTo(x,yMax);
|
|
56300
|
+
this.Canvas.lineTo(x,yMin);
|
|
56301
|
+
this.Canvas.stroke();
|
|
56302
|
+
}
|
|
56303
|
+
}
|
|
56304
|
+
|
|
56238
56305
|
this.DrawValueText=function(y, rtDraw, labInfo)
|
|
56239
56306
|
{
|
|
56240
56307
|
var left=this.Frame.ChartBorder.GetLeft();
|
|
@@ -56379,7 +56446,7 @@ function ChartDrawHLine()
|
|
|
56379
56446
|
this.Canvas.fillStyle=icon.Color;
|
|
56380
56447
|
this.Canvas.fillText(this.Button.SettingIcon.Text,xCenter,yCenter);
|
|
56381
56448
|
|
|
56382
|
-
this.AryButton.push({Rect:rtButton, ID:
|
|
56449
|
+
this.AryButton.push({Rect:rtButton, ID:icon.ID, TooltipText:icon.TooltipText});
|
|
56383
56450
|
|
|
56384
56451
|
/*
|
|
56385
56452
|
if (this.ColseButtonSize>0)
|
|
@@ -56411,7 +56478,7 @@ function ChartDrawHLine()
|
|
|
56411
56478
|
this.Canvas.fillStyle=icon.Color;
|
|
56412
56479
|
this.Canvas.fillText(this.Button.CloseIcon.Text,xCenter,yCenter);
|
|
56413
56480
|
|
|
56414
|
-
this.AryButton.push({Rect:rtButton,ID:
|
|
56481
|
+
this.AryButton.push({Rect:rtButton,ID:icon.ID, TooltipText:icon.TooltipText });
|
|
56415
56482
|
|
|
56416
56483
|
left=rtButton.Right;
|
|
56417
56484
|
}
|
|
@@ -68411,10 +68478,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
68411
68478
|
isShowMenu=data.IsShowMenu;
|
|
68412
68479
|
}
|
|
68413
68480
|
|
|
68414
|
-
|
|
68415
|
-
if (isShowMenu && this.SelectRectRightMenu)
|
|
68481
|
+
if (isShowMenu)
|
|
68416
68482
|
{
|
|
68417
|
-
|
|
68483
|
+
var data=
|
|
68418
68484
|
{
|
|
68419
68485
|
Chart:this,
|
|
68420
68486
|
X:x,
|
|
@@ -68422,8 +68488,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
68422
68488
|
SelectData:selectData, //区间选择的数据
|
|
68423
68489
|
RectSelectPaint:paint //区间选择背景
|
|
68424
68490
|
};
|
|
68491
|
+
e.data=data;
|
|
68425
68492
|
|
|
68426
|
-
this.
|
|
68493
|
+
this.PopupSelectRectMenuV2(data, e);
|
|
68427
68494
|
}
|
|
68428
68495
|
}
|
|
68429
68496
|
|
|
@@ -68458,7 +68525,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
68458
68525
|
this.ShowSelectData=function(selectData)
|
|
68459
68526
|
{
|
|
68460
68527
|
this.HideSelectRect();
|
|
68461
|
-
if (this.SelectRectRightMenu) this.SelectRectRightMenu.Hide();
|
|
68462
68528
|
|
|
68463
68529
|
JSConsole.Chart.Log('[KLineChartContainer::ShowSelectData] selectData', selectData);
|
|
68464
68530
|
var dataOffset=selectData.Start;
|
|
@@ -68543,9 +68609,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
68543
68609
|
isShowMenu=data.IsShowMenu;
|
|
68544
68610
|
}
|
|
68545
68611
|
|
|
68546
|
-
if (isShowMenu
|
|
68612
|
+
if (isShowMenu)
|
|
68547
68613
|
{
|
|
68548
|
-
|
|
68614
|
+
var data=
|
|
68549
68615
|
{
|
|
68550
68616
|
Chart:this,
|
|
68551
68617
|
X:corssCursor.LastPoint.X/pixelTatio,
|
|
@@ -68553,7 +68619,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
68553
68619
|
SelectData:selectData, //区间选择的数据
|
|
68554
68620
|
RectSelectPaint:paint //区间选择背景
|
|
68555
68621
|
};
|
|
68556
|
-
|
|
68622
|
+
e.data=data
|
|
68623
|
+
|
|
68624
|
+
this.PopupSelectRectMenuV2(data, e);
|
|
68557
68625
|
}
|
|
68558
68626
|
}
|
|
68559
68627
|
|
|
@@ -72464,22 +72532,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72464
72532
|
this.OnRightMenu=function(x,y,e)
|
|
72465
72533
|
{
|
|
72466
72534
|
var pixelTatio = GetDevicePixelRatio(); //x,y 需要乘以放大倍速
|
|
72467
|
-
|
|
72468
|
-
{
|
|
72469
|
-
|
|
72470
|
-
this.PopuRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
72471
|
-
}
|
|
72472
|
-
else if (this.RightMenu)
|
|
72473
|
-
{
|
|
72474
|
-
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
72475
|
-
e.data={ Chart:this, FrameID:frameId };
|
|
72476
|
-
this.RightMenu.DoModal(e);
|
|
72477
|
-
}
|
|
72478
|
-
|
|
72535
|
+
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
72536
|
+
this.PopupRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
72537
|
+
|
|
72479
72538
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CONTEXT_MENU);
|
|
72480
72539
|
if (event)
|
|
72481
72540
|
{
|
|
72482
|
-
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
72483
72541
|
var data={ X:x, Y:y, Event:e, FrameID:frameId };
|
|
72484
72542
|
event.Callback(event,data,this);
|
|
72485
72543
|
}
|
|
@@ -72746,7 +72804,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72746
72804
|
return aryMenu;
|
|
72747
72805
|
}
|
|
72748
72806
|
|
|
72749
|
-
this.
|
|
72807
|
+
this.PopupRightMenuV2=function(data,e)
|
|
72750
72808
|
{
|
|
72751
72809
|
if (!this.JSPopMenu) return;
|
|
72752
72810
|
var x=data.X, y=data.Y;
|
|
@@ -72757,6 +72815,20 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72757
72815
|
this.PopuMenuByRClick(menuData, x, y);
|
|
72758
72816
|
}
|
|
72759
72817
|
|
|
72818
|
+
this.PopupSelectRectMenuV2=function(data, e)
|
|
72819
|
+
{
|
|
72820
|
+
var aryMenu=
|
|
72821
|
+
[
|
|
72822
|
+
{ Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e] }},
|
|
72823
|
+
{ Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[data.SelectData] }}
|
|
72824
|
+
];
|
|
72825
|
+
|
|
72826
|
+
var menuData={ Menu:aryMenu, Position:JSPopMenu.POSITION_ID.RIGHT_MENU_ID };
|
|
72827
|
+
menuData.ClickCallback=(data)=>{ this.OnClickRightMenu(data); }
|
|
72828
|
+
var x=data.X, y=data.Y;
|
|
72829
|
+
this.PopuMenuByRClick(menuData, x, y);
|
|
72830
|
+
}
|
|
72831
|
+
|
|
72760
72832
|
//重新加载画图工具(切换股票|周期)
|
|
72761
72833
|
this.ReloadChartDrawPicture=function()
|
|
72762
72834
|
{
|
|
@@ -76123,22 +76195,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76123
76195
|
this.OnRightMenu=function(x,y,e)
|
|
76124
76196
|
{
|
|
76125
76197
|
var pixelTatio = GetDevicePixelRatio(); //x,y 需要乘以放大倍速
|
|
76126
|
-
|
|
76127
|
-
{
|
|
76128
|
-
|
|
76129
|
-
this.PopuRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
76130
|
-
}
|
|
76131
|
-
else if (this.RightMenu)
|
|
76132
|
-
{
|
|
76133
|
-
var frameId=this.Frame.PtInFrame(x,y);
|
|
76134
|
-
e.data={ Chart:this, FrameID:frameId };
|
|
76135
|
-
this.RightMenu.DoModal(e);
|
|
76136
|
-
}
|
|
76137
|
-
|
|
76198
|
+
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
76199
|
+
this.PopupRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
76200
|
+
|
|
76138
76201
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CONTEXT_MENU);
|
|
76139
76202
|
if (event)
|
|
76140
76203
|
{
|
|
76141
|
-
var frameId=this.Frame.PtInFrame(x,y);
|
|
76142
76204
|
var data={ X:x, Y:y, Event:e, FrameID:frameId };
|
|
76143
76205
|
event.Callback(event,data,this);
|
|
76144
76206
|
}
|
|
@@ -76156,6 +76218,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76156
76218
|
if (item && item.Symbol) aryOverlaySymbol.push(item.Symbol)
|
|
76157
76219
|
}
|
|
76158
76220
|
|
|
76221
|
+
var bShowDrawTool=false;
|
|
76222
|
+
if (this.GetExtendChartByClassName('DrawToolsButton')) bShowDrawTool=true; //画图工具
|
|
76223
|
+
|
|
76159
76224
|
var aryMenu=
|
|
76160
76225
|
[
|
|
76161
76226
|
{
|
|
@@ -76208,10 +76273,23 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76208
76273
|
},
|
|
76209
76274
|
{
|
|
76210
76275
|
Name:"区间选择",Data:{ ID: JSCHART_MENU_ID.CMD_ENABLE_SELECT_RECT_ID, Args:[!this.EnableSelectRect]}, Checked:this.EnableSelectRect
|
|
76276
|
+
},
|
|
76277
|
+
{
|
|
76278
|
+
Name:"其他设置",
|
|
76279
|
+
SubMenu:
|
|
76280
|
+
[
|
|
76281
|
+
{ Name:"画图工具", Data:{ ID:bShowDrawTool?JSCHART_MENU_ID.CMD_HIDE_DRAWTOOL_ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:bShowDrawTool},
|
|
76282
|
+
]
|
|
76211
76283
|
}
|
|
76212
76284
|
|
|
76213
76285
|
];
|
|
76214
76286
|
|
|
76287
|
+
if (MARKET_SUFFIX_NAME.IsSHSZStockA(this.Symbol))
|
|
76288
|
+
{
|
|
76289
|
+
var item={ Name:"集合竞价",Data:{ ID: JSCHART_MENU_ID.CMD_SHOW_BEFORE_DATA_ID, Args:[!this.IsShowBeforeData] }, Checked:this.IsShowBeforeData };
|
|
76290
|
+
aryMenu.splice(4,0,item);
|
|
76291
|
+
}
|
|
76292
|
+
|
|
76215
76293
|
|
|
76216
76294
|
//删除菜单
|
|
76217
76295
|
for(var i=0;i<aryMenu.length;++i)
|
|
@@ -76234,7 +76312,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
76234
76312
|
return aryMenu;
|
|
76235
76313
|
}
|
|
76236
76314
|
|
|
76237
|
-
this.
|
|
76315
|
+
this.PopupRightMenuV2=function(data,e)
|
|
76238
76316
|
{
|
|
76239
76317
|
if (!this.JSPopMenu) return;
|
|
76240
76318
|
var x=data.X, y=data.Y;
|
|
@@ -86161,1479 +86239,6 @@ function WaitDialog(divElement)
|
|
|
86161
86239
|
}
|
|
86162
86240
|
}
|
|
86163
86241
|
|
|
86164
|
-
//K线右键菜单类
|
|
86165
|
-
//id:"kline"
|
|
86166
|
-
function KLineRightMenu(divElement)
|
|
86167
|
-
{
|
|
86168
|
-
this.newMethod=IDivDialog; //派生
|
|
86169
|
-
this.newMethod(divElement);
|
|
86170
|
-
delete this.newMethod;
|
|
86171
|
-
|
|
86172
|
-
this.option={};
|
|
86173
|
-
|
|
86174
|
-
this.Create = function () {
|
|
86175
|
-
var _self = this;
|
|
86176
|
-
|
|
86177
|
-
this.ID=Guid();
|
|
86178
|
-
|
|
86179
|
-
_self.BindData();
|
|
86180
|
-
_self.BindEvent();
|
|
86181
|
-
}
|
|
86182
|
-
this.BindData=function(){
|
|
86183
|
-
var _self = this;
|
|
86184
|
-
|
|
86185
|
-
var id=this.DivElement.id;
|
|
86186
|
-
var $body = $("#" + id);
|
|
86187
|
-
|
|
86188
|
-
$body.find("div[id^='topMenu_']").remove();
|
|
86189
|
-
$body.find("div[id^='childMenu_']").remove();
|
|
86190
|
-
|
|
86191
|
-
var $topMenu = $("<div />");
|
|
86192
|
-
$topMenu.attr("id", "topMenu_"+_self.ID).addClass("context-menu-wrapper topmenu").hide();
|
|
86193
|
-
$body.append($topMenu);
|
|
86194
|
-
|
|
86195
|
-
var $topTable = $("<table />");
|
|
86196
|
-
$topTable.attr({ id: "topTable_" + _self.ID, cellspacing: "0", cellpadding: "0" }).addClass("context-menu");
|
|
86197
|
-
$topMenu.append($topTable);
|
|
86198
|
-
|
|
86199
|
-
$topTable.append(_self.childrenList(_self.option.data));
|
|
86200
|
-
|
|
86201
|
-
for (var i = 0; i < _self.option.data.length; i++) {
|
|
86202
|
-
var isHasChildren = typeof _self.option.data[i].children != "undefined";
|
|
86203
|
-
|
|
86204
|
-
if (isHasChildren) {
|
|
86205
|
-
|
|
86206
|
-
var $childMenu = $("<div />");
|
|
86207
|
-
$childMenu.attr({ id: "childMenu_"+_self.ID + i, "data-index": i }).addClass("context-menu-wrapper").hide();
|
|
86208
|
-
$body.append($childMenu);
|
|
86209
|
-
|
|
86210
|
-
var $childTable = $("<table />");
|
|
86211
|
-
$childTable.attr({ id: "childTable_" + _self.ID + i, cellspacing: "0", cellpadding: "0" }).addClass("context-menu");
|
|
86212
|
-
$childMenu.append($childTable);
|
|
86213
|
-
|
|
86214
|
-
$childTable.append(_self.childrenList(_self.option.data[i].children));
|
|
86215
|
-
}
|
|
86216
|
-
}
|
|
86217
|
-
}
|
|
86218
|
-
|
|
86219
|
-
this.Update=function()
|
|
86220
|
-
{
|
|
86221
|
-
var _self = this;
|
|
86222
|
-
//var id=this.DivElement.id;
|
|
86223
|
-
//var $body=$("#"+id);
|
|
86224
|
-
//
|
|
86225
|
-
//var $topTable = $("#topTable_" + _self.ID);
|
|
86226
|
-
//$topTable.empty();
|
|
86227
|
-
//$topTable.append(_self.childrenList(_self.option.data));
|
|
86228
|
-
//
|
|
86229
|
-
//for (var i = 0; i < _self.option.data.length; i++) {
|
|
86230
|
-
// var isHasChildren = typeof _self.option.data[i].children != "undefined";
|
|
86231
|
-
//
|
|
86232
|
-
// if (isHasChildren) {
|
|
86233
|
-
// var $childTable = $("#childTable_" + _self.ID + i);
|
|
86234
|
-
// $childTable.empty();
|
|
86235
|
-
// $childTable.append(_self.childrenList(_self.option.data[i].children));
|
|
86236
|
-
// }
|
|
86237
|
-
//}
|
|
86238
|
-
|
|
86239
|
-
_self.BindData();
|
|
86240
|
-
_self.BindEvent();
|
|
86241
|
-
}
|
|
86242
|
-
|
|
86243
|
-
this.childrenList = function(list) {
|
|
86244
|
-
var result = [];
|
|
86245
|
-
|
|
86246
|
-
for (var i = 0; i < list.length; i++) {
|
|
86247
|
-
var isBorder = typeof list[i].isBorder != "undefined" && list[i].isBorder;
|
|
86248
|
-
|
|
86249
|
-
var $tr = $("<tr />");
|
|
86250
|
-
$tr.addClass("font_Arial context-menu");
|
|
86251
|
-
if (isBorder)
|
|
86252
|
-
$tr.addClass("border");
|
|
86253
|
-
|
|
86254
|
-
var $td1 = $("<td />");
|
|
86255
|
-
if(list[i].selected){
|
|
86256
|
-
$td1.addClass("spacer context-menu").html("√");
|
|
86257
|
-
}else{
|
|
86258
|
-
$td1.addClass("spacer context-menu");
|
|
86259
|
-
}
|
|
86260
|
-
|
|
86261
|
-
var $td2 = $("<td />");
|
|
86262
|
-
$td2.addClass("text").html(list[i].text);
|
|
86263
|
-
|
|
86264
|
-
var $td3 = $("<td />");
|
|
86265
|
-
$td3.addClass("right shortcut");
|
|
86266
|
-
|
|
86267
|
-
var $td4 = $("<td />");
|
|
86268
|
-
$td4.addClass(typeof list[i].children != "undefined" ? "submenu-arrow" : "context-menu spacer");
|
|
86269
|
-
|
|
86270
|
-
$tr.append($td1).append($td2).append($td3).append($td4);
|
|
86271
|
-
|
|
86272
|
-
result.push($tr);
|
|
86273
|
-
}
|
|
86274
|
-
return result;
|
|
86275
|
-
}
|
|
86276
|
-
|
|
86277
|
-
this.Show=function (obj) {
|
|
86278
|
-
var _self = this;
|
|
86279
|
-
$.extend(_self.option, obj);
|
|
86280
|
-
|
|
86281
|
-
if (!_self.ID) _self.Create(); //判断是否重复创建
|
|
86282
|
-
else _self.Update(); //更新菜单状态
|
|
86283
|
-
|
|
86284
|
-
var $topMenu = $("#topMenu_"+_self.ID),
|
|
86285
|
-
topWidth = $topMenu.outerWidth(),
|
|
86286
|
-
topHeight = $topMenu.outerHeight();
|
|
86287
|
-
|
|
86288
|
-
var x = _self.option.x,
|
|
86289
|
-
y = _self.option.y;
|
|
86290
|
-
|
|
86291
|
-
if (topWidth > _self.option.position.X + _self.option.position.W- x) //超过了右边距
|
|
86292
|
-
x = x - topWidth;
|
|
86293
|
-
|
|
86294
|
-
if (topHeight > _self.option.position.Y +_self.option.position.H - y)//超过了下边距
|
|
86295
|
-
y = y - topHeight;
|
|
86296
|
-
|
|
86297
|
-
$topMenu.hide();
|
|
86298
|
-
$topMenu.css({ position:"absolute",left: x + "px", top: y + "px" }).show();
|
|
86299
|
-
|
|
86300
|
-
this.isInit = true;
|
|
86301
|
-
}
|
|
86302
|
-
|
|
86303
|
-
this.Hide=function () {
|
|
86304
|
-
var _self = this;
|
|
86305
|
-
if (typeof($)=="undefined") return;
|
|
86306
|
-
$("#topMenu_" + _self.ID).hide();
|
|
86307
|
-
$("[id^='childMenu_" + _self.ID + "']").hide();
|
|
86308
|
-
}
|
|
86309
|
-
|
|
86310
|
-
this.BindEvent=function () {
|
|
86311
|
-
var _self = this;
|
|
86312
|
-
var $childMenu = $("[id^='childMenu_" + _self.ID + "']");
|
|
86313
|
-
|
|
86314
|
-
$("#topTable_" + _self.ID).find("tr").mouseenter(function () {
|
|
86315
|
-
var $this = $(this),
|
|
86316
|
-
index = $this.index(),
|
|
86317
|
-
$topMenu = $("#topMenu_" + _self.ID),
|
|
86318
|
-
$child = $("#childMenu_" + _self.ID + index),
|
|
86319
|
-
trWidth = $this.outerWidth(),
|
|
86320
|
-
trHeight = $this.outerHeight();
|
|
86321
|
-
|
|
86322
|
-
var left = $topMenu.position().left + trWidth + 1;
|
|
86323
|
-
var top = $topMenu.position().top + (trHeight * index);
|
|
86324
|
-
|
|
86325
|
-
if (trWidth > _self.option.position.X + _self.option.position.W - left) //超过了右边距
|
|
86326
|
-
left = left - trWidth - $topMenu.outerWidth() - 2;
|
|
86327
|
-
|
|
86328
|
-
if ($child.outerHeight() > _self.option.position.Y +_self.option.position.H - top)//超过了下边距
|
|
86329
|
-
top = $topMenu.position().top + $topMenu.outerHeight() - $child.outerHeight();
|
|
86330
|
-
|
|
86331
|
-
$childMenu.hide();
|
|
86332
|
-
$child.css({ left: left + "px", top: top + "px" }).show();
|
|
86333
|
-
}).mouseleave(function () {
|
|
86334
|
-
var index = $(this).index();
|
|
86335
|
-
setTimeout(function () {
|
|
86336
|
-
if ($("#childMenu_" + _self.ID + index).attr("data-isShow") != 1) {
|
|
86337
|
-
$("#childMenu_" + _self.ID + index).hide();
|
|
86338
|
-
}
|
|
86339
|
-
}, 10)
|
|
86340
|
-
|
|
86341
|
-
}).click(function () {
|
|
86342
|
-
var $this = $(this);
|
|
86343
|
-
var index = $this.index();
|
|
86344
|
-
|
|
86345
|
-
if ($.type(_self.option.data[index].click) == "function") {
|
|
86346
|
-
_self.option.data[index].click(_self.option.returnData);
|
|
86347
|
-
$this.hide();
|
|
86348
|
-
}
|
|
86349
|
-
}).contextmenu(function()
|
|
86350
|
-
{
|
|
86351
|
-
return false; //屏蔽系统右键菜单
|
|
86352
|
-
});
|
|
86353
|
-
|
|
86354
|
-
|
|
86355
|
-
$childMenu.mouseenter(function () {
|
|
86356
|
-
$(this).attr("data-isShow", "1");
|
|
86357
|
-
}).mouseleave(function () {
|
|
86358
|
-
$(this).attr("data-isShow", "0");
|
|
86359
|
-
}).contextmenu(function()
|
|
86360
|
-
{
|
|
86361
|
-
return false; //屏蔽系统右键菜单
|
|
86362
|
-
});
|
|
86363
|
-
|
|
86364
|
-
$childMenu.find("tr").click(function () {
|
|
86365
|
-
var $this = $(this);
|
|
86366
|
-
var divIndex = parseInt($this.closest("div").attr("data-index"));
|
|
86367
|
-
var trIndex = $this.index();
|
|
86368
|
-
|
|
86369
|
-
if ($.type(_self.option.data[divIndex].children[trIndex].click) == "function") {
|
|
86370
|
-
_self.option.data[divIndex].children[trIndex].click(_self.option.windowIndex || 1);
|
|
86371
|
-
$childMenu.hide();
|
|
86372
|
-
}
|
|
86373
|
-
});
|
|
86374
|
-
}
|
|
86375
|
-
|
|
86376
|
-
this.GetPeriod=function (chart)
|
|
86377
|
-
{
|
|
86378
|
-
var data=
|
|
86379
|
-
[
|
|
86380
|
-
{
|
|
86381
|
-
text: "日线", Value:0,
|
|
86382
|
-
click: function () { chart.ChangePeriod(0); }
|
|
86383
|
-
},
|
|
86384
|
-
{
|
|
86385
|
-
text: "周线",Value:1,
|
|
86386
|
-
click: function () { chart.ChangePeriod(1); }
|
|
86387
|
-
},
|
|
86388
|
-
{
|
|
86389
|
-
text: "双周线",Value:21,
|
|
86390
|
-
click: function () { chart.ChangePeriod(21); }
|
|
86391
|
-
},
|
|
86392
|
-
{
|
|
86393
|
-
text: "月线",Value:2,
|
|
86394
|
-
click: function () { chart.ChangePeriod(2); }
|
|
86395
|
-
},
|
|
86396
|
-
{
|
|
86397
|
-
text: "季线",Value:9,
|
|
86398
|
-
click: function () { chart.ChangePeriod(9); }
|
|
86399
|
-
},
|
|
86400
|
-
{
|
|
86401
|
-
text: "半年",Value:22,
|
|
86402
|
-
click: function () { chart.ChangePeriod(22); }
|
|
86403
|
-
},
|
|
86404
|
-
{
|
|
86405
|
-
text: "年线",Value:3,
|
|
86406
|
-
click: function () { chart.ChangePeriod(3); }
|
|
86407
|
-
},
|
|
86408
|
-
{
|
|
86409
|
-
text: "1分",Value:4,
|
|
86410
|
-
click: function () { chart.ChangePeriod(4); }
|
|
86411
|
-
},
|
|
86412
|
-
{
|
|
86413
|
-
text: "5分",Value:5,
|
|
86414
|
-
click: function () { chart.ChangePeriod(5); }
|
|
86415
|
-
},
|
|
86416
|
-
{
|
|
86417
|
-
text: "15分",Value:6,
|
|
86418
|
-
click: function () { chart.ChangePeriod(6); }
|
|
86419
|
-
},
|
|
86420
|
-
{
|
|
86421
|
-
text: "30分",Value:7,
|
|
86422
|
-
click: function () { chart.ChangePeriod(7); }
|
|
86423
|
-
},
|
|
86424
|
-
{
|
|
86425
|
-
text: "60分",Value:8,
|
|
86426
|
-
click: function () { chart.ChangePeriod(8); }
|
|
86427
|
-
},
|
|
86428
|
-
{
|
|
86429
|
-
text: "2小时",Value:11,
|
|
86430
|
-
click: function () { chart.ChangePeriod(11); }
|
|
86431
|
-
},
|
|
86432
|
-
{
|
|
86433
|
-
text: "4小时",Value:12,
|
|
86434
|
-
click: function () { chart.ChangePeriod(12); }
|
|
86435
|
-
},
|
|
86436
|
-
{
|
|
86437
|
-
text: "分笔",Value:10,
|
|
86438
|
-
click: function () { chart.ChangePeriod(10); }
|
|
86439
|
-
},
|
|
86440
|
-
{
|
|
86441
|
-
text: "自定义周期:3分钟",Value:20003,
|
|
86442
|
-
click: function () { chart.ChangePeriod(20003); }
|
|
86443
|
-
},
|
|
86444
|
-
{
|
|
86445
|
-
text: "自定义周期:35分钟",Value:20035,
|
|
86446
|
-
click: function () { chart.ChangePeriod(20035); }
|
|
86447
|
-
},
|
|
86448
|
-
{
|
|
86449
|
-
text: "自定义周期:8日",Value:40008,
|
|
86450
|
-
click: function () { chart.ChangePeriod(40008); }
|
|
86451
|
-
}
|
|
86452
|
-
];
|
|
86453
|
-
|
|
86454
|
-
for(var i in data)
|
|
86455
|
-
{
|
|
86456
|
-
var item=data[i];
|
|
86457
|
-
if (item.Value==chart.Period)
|
|
86458
|
-
{
|
|
86459
|
-
item.selected=true;
|
|
86460
|
-
break;
|
|
86461
|
-
}
|
|
86462
|
-
}
|
|
86463
|
-
|
|
86464
|
-
return data;
|
|
86465
|
-
}
|
|
86466
|
-
|
|
86467
|
-
this.GetRight=function(chart)
|
|
86468
|
-
{
|
|
86469
|
-
var data=
|
|
86470
|
-
[
|
|
86471
|
-
{
|
|
86472
|
-
text: "不复权",
|
|
86473
|
-
click: function () { chart.ChangeRight(0); }
|
|
86474
|
-
},
|
|
86475
|
-
{
|
|
86476
|
-
text: "前复权",
|
|
86477
|
-
click: function () { chart.ChangeRight(1); }
|
|
86478
|
-
},
|
|
86479
|
-
{
|
|
86480
|
-
text: "后复权",
|
|
86481
|
-
click: function () { chart.ChangeRight(2); }
|
|
86482
|
-
}
|
|
86483
|
-
];
|
|
86484
|
-
|
|
86485
|
-
if (chart.Right>=0 && chart.Right<data.length) data[chart.Right].selected=true;
|
|
86486
|
-
|
|
86487
|
-
return data;
|
|
86488
|
-
}
|
|
86489
|
-
|
|
86490
|
-
//指标
|
|
86491
|
-
this.GetIndex=function (chart)
|
|
86492
|
-
{
|
|
86493
|
-
return [{
|
|
86494
|
-
text: "均线",
|
|
86495
|
-
click: function (windowIndex) {
|
|
86496
|
-
chart.ChangeIndex(windowIndex, '均线')
|
|
86497
|
-
}
|
|
86498
|
-
}, {
|
|
86499
|
-
text: "BOLL",
|
|
86500
|
-
click: function (windowIndex) {
|
|
86501
|
-
chart.ChangeIndex(windowIndex, 'BOLL')
|
|
86502
|
-
},
|
|
86503
|
-
isBorder:true
|
|
86504
|
-
}, {
|
|
86505
|
-
text: "MACD",
|
|
86506
|
-
click: function (windowIndex) {
|
|
86507
|
-
chart.ChangeIndex(windowIndex, 'MACD')
|
|
86508
|
-
}
|
|
86509
|
-
}, {
|
|
86510
|
-
text: "KDJ",
|
|
86511
|
-
click: function (windowIndex) {
|
|
86512
|
-
chart.ChangeIndex(windowIndex, 'KDJ')
|
|
86513
|
-
}
|
|
86514
|
-
}, {
|
|
86515
|
-
text: "VOL",
|
|
86516
|
-
click: function (windowIndex) {
|
|
86517
|
-
chart.ChangeIndex(windowIndex, 'VOL')
|
|
86518
|
-
}
|
|
86519
|
-
}, {
|
|
86520
|
-
text: "RSI",
|
|
86521
|
-
click: function (windowIndex) {
|
|
86522
|
-
chart.ChangeIndex(windowIndex, 'RSI')
|
|
86523
|
-
}
|
|
86524
|
-
}, {
|
|
86525
|
-
text: "BRAR",
|
|
86526
|
-
click: function (windowIndex) {
|
|
86527
|
-
chart.ChangeIndex(windowIndex, 'BRAR')
|
|
86528
|
-
}
|
|
86529
|
-
}, {
|
|
86530
|
-
text: "WR",
|
|
86531
|
-
click: function (windowIndex) {
|
|
86532
|
-
chart.ChangeIndex(windowIndex, 'WR')
|
|
86533
|
-
}
|
|
86534
|
-
}, {
|
|
86535
|
-
text: "BIAS",
|
|
86536
|
-
click: function (windowIndex) {
|
|
86537
|
-
chart.ChangeIndex(windowIndex, 'BIAS')
|
|
86538
|
-
}
|
|
86539
|
-
}, {
|
|
86540
|
-
text: "OBV",
|
|
86541
|
-
click: function (windowIndex) {
|
|
86542
|
-
chart.ChangeIndex(windowIndex, 'OBV')
|
|
86543
|
-
}
|
|
86544
|
-
}, {
|
|
86545
|
-
text: "DMI",
|
|
86546
|
-
click: function (windowIndex) {
|
|
86547
|
-
chart.ChangeIndex(windowIndex, 'DMI')
|
|
86548
|
-
}
|
|
86549
|
-
}, {
|
|
86550
|
-
text: "CR",
|
|
86551
|
-
click: function (windowIndex) {
|
|
86552
|
-
chart.ChangeIndex(windowIndex, 'CR')
|
|
86553
|
-
}
|
|
86554
|
-
}, {
|
|
86555
|
-
text: "PSY",
|
|
86556
|
-
click: function (windowIndex) {
|
|
86557
|
-
chart.ChangeIndex(windowIndex, 'PSY')
|
|
86558
|
-
}
|
|
86559
|
-
}, {
|
|
86560
|
-
text: "CCI",
|
|
86561
|
-
click: function (windowIndex) {
|
|
86562
|
-
chart.ChangeIndex(windowIndex, 'CCI')
|
|
86563
|
-
}
|
|
86564
|
-
}, {
|
|
86565
|
-
text: "DMA",
|
|
86566
|
-
click: function (windowIndex) {
|
|
86567
|
-
chart.ChangeIndex(windowIndex, 'DMA')
|
|
86568
|
-
}
|
|
86569
|
-
}, {
|
|
86570
|
-
text: "TRIX",
|
|
86571
|
-
click: function (windowIndex) {
|
|
86572
|
-
chart.ChangeIndex(windowIndex, 'TRIX')
|
|
86573
|
-
}
|
|
86574
|
-
}, {
|
|
86575
|
-
text: "VR",
|
|
86576
|
-
click: function (windowIndex) {
|
|
86577
|
-
chart.ChangeIndex(windowIndex, 'VR')
|
|
86578
|
-
}
|
|
86579
|
-
}, {
|
|
86580
|
-
text: "EMV",
|
|
86581
|
-
click: function (windowIndex) {
|
|
86582
|
-
chart.ChangeIndex(windowIndex, 'EMV')
|
|
86583
|
-
}
|
|
86584
|
-
}, {
|
|
86585
|
-
text: "ROC",
|
|
86586
|
-
click: function (windowIndex) {
|
|
86587
|
-
chart.ChangeIndex(windowIndex, 'ROC')
|
|
86588
|
-
}
|
|
86589
|
-
}, {
|
|
86590
|
-
text: "MIM",
|
|
86591
|
-
click: function (windowIndex) {
|
|
86592
|
-
chart.ChangeIndex(windowIndex, 'MIM')
|
|
86593
|
-
}
|
|
86594
|
-
}, {
|
|
86595
|
-
text: "FSL",
|
|
86596
|
-
click: function (windowIndex) {
|
|
86597
|
-
chart.ChangeIndex(windowIndex, 'FSL')
|
|
86598
|
-
}
|
|
86599
|
-
} ]
|
|
86600
|
-
}
|
|
86601
|
-
|
|
86602
|
-
//五彩K线
|
|
86603
|
-
this.GetColorIndex=function (chart)
|
|
86604
|
-
{
|
|
86605
|
-
var data=
|
|
86606
|
-
[
|
|
86607
|
-
{
|
|
86608
|
-
text: "十字星",
|
|
86609
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-十字星') }
|
|
86610
|
-
},
|
|
86611
|
-
{
|
|
86612
|
-
text: "早晨之星",
|
|
86613
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-早晨之星') },
|
|
86614
|
-
},
|
|
86615
|
-
{
|
|
86616
|
-
text: "垂死十字",
|
|
86617
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-垂死十字') },
|
|
86618
|
-
},
|
|
86619
|
-
{
|
|
86620
|
-
text: "三只乌鸦",
|
|
86621
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-三只乌鸦') }
|
|
86622
|
-
},
|
|
86623
|
-
{
|
|
86624
|
-
text: "光脚阴线",
|
|
86625
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-光脚阴线') }
|
|
86626
|
-
},
|
|
86627
|
-
{
|
|
86628
|
-
text: "黄昏之星",
|
|
86629
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-黄昏之星') }
|
|
86630
|
-
}
|
|
86631
|
-
];
|
|
86632
|
-
|
|
86633
|
-
if (chart.ColorIndex)
|
|
86634
|
-
{
|
|
86635
|
-
data[data.length-1].isBorder=true;
|
|
86636
|
-
data.push(
|
|
86637
|
-
{
|
|
86638
|
-
text: "删除五彩K线",
|
|
86639
|
-
click: function (windowIndex) { chart.CancelInstructionIndex() }
|
|
86640
|
-
});
|
|
86641
|
-
}
|
|
86642
|
-
|
|
86643
|
-
return data;
|
|
86644
|
-
}
|
|
86645
|
-
|
|
86646
|
-
//专家系统
|
|
86647
|
-
this.GetTradeIndex=function(chart)
|
|
86648
|
-
{
|
|
86649
|
-
var data=
|
|
86650
|
-
[
|
|
86651
|
-
{
|
|
86652
|
-
text: "BIAS",
|
|
86653
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-BIAS') }
|
|
86654
|
-
},
|
|
86655
|
-
{
|
|
86656
|
-
text: "CCI",
|
|
86657
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-CCI') }
|
|
86658
|
-
},
|
|
86659
|
-
{
|
|
86660
|
-
text: "DMI",
|
|
86661
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-DMI') }
|
|
86662
|
-
},
|
|
86663
|
-
{
|
|
86664
|
-
text: "KD",
|
|
86665
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-KD') }
|
|
86666
|
-
},
|
|
86667
|
-
{
|
|
86668
|
-
text: "BOLL",
|
|
86669
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-BOLL') }
|
|
86670
|
-
},
|
|
86671
|
-
{
|
|
86672
|
-
text: "KDJ",
|
|
86673
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-KDJ') }
|
|
86674
|
-
}
|
|
86675
|
-
];
|
|
86676
|
-
|
|
86677
|
-
if (chart.TradeIndex)
|
|
86678
|
-
{
|
|
86679
|
-
data[data.length-1].isBorder=true;
|
|
86680
|
-
data.push(
|
|
86681
|
-
{
|
|
86682
|
-
text: "删除专家系统",
|
|
86683
|
-
click: function (windowIndex) { chart.CancelInstructionIndex()}
|
|
86684
|
-
});
|
|
86685
|
-
}
|
|
86686
|
-
return data;
|
|
86687
|
-
}
|
|
86688
|
-
|
|
86689
|
-
//叠加
|
|
86690
|
-
this.GetOverlay=function (chart)
|
|
86691
|
-
{
|
|
86692
|
-
var data=
|
|
86693
|
-
[
|
|
86694
|
-
{
|
|
86695
|
-
text: "上证指数",
|
|
86696
|
-
click: function () { chart.OverlaySymbol('000001.sh'); }
|
|
86697
|
-
},
|
|
86698
|
-
{
|
|
86699
|
-
text: "深证成指",
|
|
86700
|
-
click: function () { chart.OverlaySymbol('399001.sz'); }
|
|
86701
|
-
},
|
|
86702
|
-
{
|
|
86703
|
-
text: "中小板指",
|
|
86704
|
-
click: function () { chart.OverlaySymbol('399005.sz'); }
|
|
86705
|
-
},
|
|
86706
|
-
{
|
|
86707
|
-
text: "创业板指",
|
|
86708
|
-
click: function () { chart.OverlaySymbol('399006.sz'); }
|
|
86709
|
-
},
|
|
86710
|
-
{
|
|
86711
|
-
text: "沪深300",
|
|
86712
|
-
click: function () { chart.OverlaySymbol('000300.sh'); },
|
|
86713
|
-
}
|
|
86714
|
-
];
|
|
86715
|
-
|
|
86716
|
-
for(var i in chart.OverlayChartPaint)
|
|
86717
|
-
{
|
|
86718
|
-
var item=chart.OverlayChartPaint[i];
|
|
86719
|
-
var symbol=item.Symbol;
|
|
86720
|
-
const mapSymbol=new Map([['000001.sh',0],['399001.sz',1],['399005.sz',2],['399006.sz',3],['000300.sh',4]]);
|
|
86721
|
-
if (mapSymbol.has(symbol))
|
|
86722
|
-
{
|
|
86723
|
-
var menuItem=data[mapSymbol.get(symbol)];
|
|
86724
|
-
let delSymbol=symbol;
|
|
86725
|
-
menuItem.selected=true;
|
|
86726
|
-
menuItem.click=function () { chart.DeleteOverlaySymbol(delSymbol); };
|
|
86727
|
-
}
|
|
86728
|
-
}
|
|
86729
|
-
|
|
86730
|
-
if (chart.OverlayChartPaint && chart.OverlayChartPaint.length>0)
|
|
86731
|
-
{
|
|
86732
|
-
data[data.length-1].isBorder=true;
|
|
86733
|
-
data.push(
|
|
86734
|
-
{
|
|
86735
|
-
text: "取消叠加",
|
|
86736
|
-
click: function () { chart.ClearOverlaySymbol();}
|
|
86737
|
-
}
|
|
86738
|
-
);
|
|
86739
|
-
}
|
|
86740
|
-
|
|
86741
|
-
return data;
|
|
86742
|
-
}
|
|
86743
|
-
|
|
86744
|
-
//K线类型设置
|
|
86745
|
-
this.GetKLineType=function(chart)
|
|
86746
|
-
{
|
|
86747
|
-
var data=
|
|
86748
|
-
[
|
|
86749
|
-
{
|
|
86750
|
-
text: "K线(空心阳线)",
|
|
86751
|
-
click: function () { chart.ChangeKLineDrawType(3);}
|
|
86752
|
-
},
|
|
86753
|
-
{
|
|
86754
|
-
text: "K线(实心阳线)",
|
|
86755
|
-
click: function () { chart.ChangeKLineDrawType(0); }
|
|
86756
|
-
},
|
|
86757
|
-
{
|
|
86758
|
-
text: "美国线",
|
|
86759
|
-
click: function () { chart.ChangeKLineDrawType(2, true ,{ IsThinAKBar:false }); }
|
|
86760
|
-
},
|
|
86761
|
-
{
|
|
86762
|
-
text: "收盘线",
|
|
86763
|
-
click: function () { chart.ChangeKLineDrawType(1); }
|
|
86764
|
-
},
|
|
86765
|
-
{
|
|
86766
|
-
text: "收盘面积",
|
|
86767
|
-
click: function () { chart.ChangeKLineDrawType(4); }
|
|
86768
|
-
},
|
|
86769
|
-
{
|
|
86770
|
-
text: "K线(空心阳线阴线)",
|
|
86771
|
-
click: function () { chart.ChangeKLineDrawType(6);}
|
|
86772
|
-
},
|
|
86773
|
-
{
|
|
86774
|
-
text: "Heikin Ashi",
|
|
86775
|
-
click: function () { chart.ChangeKLineDrawType(11);}
|
|
86776
|
-
},
|
|
86777
|
-
{
|
|
86778
|
-
text: "Line Break",
|
|
86779
|
-
click: function () { chart.ChangeKLineDrawType(12);}
|
|
86780
|
-
},
|
|
86781
|
-
{
|
|
86782
|
-
text: "High-low",
|
|
86783
|
-
click: function () { chart.ChangeKLineDrawType(13);}
|
|
86784
|
-
},
|
|
86785
|
-
{
|
|
86786
|
-
text: "HLC Area",
|
|
86787
|
-
click: function () { chart.ChangeKLineDrawType(15);}
|
|
86788
|
-
}
|
|
86789
|
-
];
|
|
86790
|
-
|
|
86791
|
-
switch(chart.KLineDrawType)
|
|
86792
|
-
{
|
|
86793
|
-
case 0:
|
|
86794
|
-
data[1].selected=true;
|
|
86795
|
-
break;
|
|
86796
|
-
case 1:
|
|
86797
|
-
data[3].selected=true;
|
|
86798
|
-
break;
|
|
86799
|
-
case 2:
|
|
86800
|
-
data[2].selected=true;
|
|
86801
|
-
break;
|
|
86802
|
-
case 3:
|
|
86803
|
-
data[0].selected=true;
|
|
86804
|
-
break;
|
|
86805
|
-
case 4:
|
|
86806
|
-
data[4].selected=true;
|
|
86807
|
-
break;
|
|
86808
|
-
case 6:
|
|
86809
|
-
data[5].selected=true;
|
|
86810
|
-
break;
|
|
86811
|
-
case 11:
|
|
86812
|
-
data[6].selected=true;
|
|
86813
|
-
break;
|
|
86814
|
-
case 12:
|
|
86815
|
-
data[7].selected=true;
|
|
86816
|
-
break;
|
|
86817
|
-
case 13:
|
|
86818
|
-
data[8].selected=true;
|
|
86819
|
-
break;
|
|
86820
|
-
case 15:
|
|
86821
|
-
data[9].selected=true;
|
|
86822
|
-
break;
|
|
86823
|
-
}
|
|
86824
|
-
return data;
|
|
86825
|
-
}
|
|
86826
|
-
|
|
86827
|
-
//指标窗口个数
|
|
86828
|
-
this.GetIndexWindowCount=function(chart)
|
|
86829
|
-
{
|
|
86830
|
-
var data=
|
|
86831
|
-
[
|
|
86832
|
-
{
|
|
86833
|
-
text: "1个窗口",
|
|
86834
|
-
click: function () { chart.ChangeIndexWindowCount(1); }
|
|
86835
|
-
},
|
|
86836
|
-
{
|
|
86837
|
-
text: "2个窗口",
|
|
86838
|
-
click: function () { chart.ChangeIndexWindowCount(2); }
|
|
86839
|
-
},
|
|
86840
|
-
{
|
|
86841
|
-
text: "3个窗口",
|
|
86842
|
-
click: function () { chart.ChangeIndexWindowCount(3); }
|
|
86843
|
-
},
|
|
86844
|
-
{
|
|
86845
|
-
text: "4个窗口",
|
|
86846
|
-
click: function () { chart.ChangeIndexWindowCount(4); }
|
|
86847
|
-
},
|
|
86848
|
-
{
|
|
86849
|
-
text: "5个窗口",
|
|
86850
|
-
click: function () { chart.ChangeIndexWindowCount(5); }
|
|
86851
|
-
}
|
|
86852
|
-
];
|
|
86853
|
-
|
|
86854
|
-
var count=chart.Frame.SubFrame.length;
|
|
86855
|
-
if ((count-1)>=0 && (count-1)<data.length) data[count-1].selected=true; //选中
|
|
86856
|
-
|
|
86857
|
-
return data;
|
|
86858
|
-
}
|
|
86859
|
-
|
|
86860
|
-
//坐标类型
|
|
86861
|
-
this.GetCoordinateType=function(chart)
|
|
86862
|
-
{
|
|
86863
|
-
var data=
|
|
86864
|
-
[
|
|
86865
|
-
{
|
|
86866
|
-
text: "普通坐标",
|
|
86867
|
-
click: function () { chart.ChangeCoordinateType( {Type:0} ); }
|
|
86868
|
-
},
|
|
86869
|
-
{
|
|
86870
|
-
text: "百分比坐标",
|
|
86871
|
-
click: function () { chart.ChangeCoordinateType( {Type:1} ); }
|
|
86872
|
-
},
|
|
86873
|
-
{
|
|
86874
|
-
text: "反转坐标",
|
|
86875
|
-
click: function () { chart.ChangeCoordinateType( { IsReverse:true } ); }
|
|
86876
|
-
},
|
|
86877
|
-
{
|
|
86878
|
-
text: "对数坐标",
|
|
86879
|
-
click: function () { chart.ChangeCoordinateType( {Type:2} ); }
|
|
86880
|
-
},
|
|
86881
|
-
{
|
|
86882
|
-
text: "等比坐标",
|
|
86883
|
-
click: function () { chart.ChangeCoordinateType( {Type:3} ); }
|
|
86884
|
-
},
|
|
86885
|
-
{
|
|
86886
|
-
text: "等分坐标",
|
|
86887
|
-
click: function () { chart.ChangeCoordinateType( {Type:4} ); }
|
|
86888
|
-
},
|
|
86889
|
-
{
|
|
86890
|
-
text: "黄金分割",
|
|
86891
|
-
click: function () { chart.ChangeCoordinateType( {Type:5} ); }
|
|
86892
|
-
}
|
|
86893
|
-
];
|
|
86894
|
-
|
|
86895
|
-
if (chart.Frame && chart.Frame.SubFrame && chart.Frame.SubFrame.length>0)
|
|
86896
|
-
{
|
|
86897
|
-
if (chart.Frame.SubFrame[0].Frame.CoordinateType==1)
|
|
86898
|
-
{
|
|
86899
|
-
data[2].selected=true;
|
|
86900
|
-
data[2].click=function() { chart.ChangeCoordinateType( { IsReverse:false } ); } //取消反转
|
|
86901
|
-
}
|
|
86902
|
-
|
|
86903
|
-
if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==1) data[1].selected=true; //百分比
|
|
86904
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==0) data[0].selected=true; //普通坐标
|
|
86905
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==2) data[3].selected=true; //对数
|
|
86906
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==3) data[4].selected=true; //等比坐标
|
|
86907
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==4) data[5].selected=true; //等分坐标
|
|
86908
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==5) data[6].selected=true; //黄金分割
|
|
86909
|
-
}
|
|
86910
|
-
|
|
86911
|
-
return data;
|
|
86912
|
-
}
|
|
86913
|
-
|
|
86914
|
-
//拖拽模式
|
|
86915
|
-
this.GetDragModeType=function(chart)
|
|
86916
|
-
{
|
|
86917
|
-
var data=
|
|
86918
|
-
[
|
|
86919
|
-
{
|
|
86920
|
-
text: "禁止拖拽",
|
|
86921
|
-
click: function () { chart.DragMode=0; }
|
|
86922
|
-
},
|
|
86923
|
-
{
|
|
86924
|
-
text: "启动拖拽",
|
|
86925
|
-
click: function () { chart.DragMode=1; }
|
|
86926
|
-
},
|
|
86927
|
-
{
|
|
86928
|
-
text: "区间选择",
|
|
86929
|
-
click: function () { chart.DragMode=2; }
|
|
86930
|
-
}
|
|
86931
|
-
];
|
|
86932
|
-
|
|
86933
|
-
if (chart.DragMode>=0 && chart.DragMode<data.length) data[chart.DragMode].selected=true; //选中
|
|
86934
|
-
|
|
86935
|
-
return data;
|
|
86936
|
-
}
|
|
86937
|
-
|
|
86938
|
-
//工具
|
|
86939
|
-
this.GetTools=function(chart)
|
|
86940
|
-
{
|
|
86941
|
-
var data=[];
|
|
86942
|
-
var drawTools=chart.GetExtendChartByClassName('DrawToolsButton');
|
|
86943
|
-
if (drawTools)
|
|
86944
|
-
{
|
|
86945
|
-
data.push(
|
|
86946
|
-
{
|
|
86947
|
-
text: "关闭画图工具",
|
|
86948
|
-
click: function ()
|
|
86949
|
-
{
|
|
86950
|
-
var toolsWidth=drawTools.Chart.Width;
|
|
86951
|
-
var toolsIndex=parseInt(drawTools.Index);
|
|
86952
|
-
for(var i=toolsIndex+1; i<chart.ExtendChartPaint.length; ++i) //在画图工具后面创建的需要减去工具的宽度
|
|
86953
|
-
{
|
|
86954
|
-
var item=chart.ExtendChartPaint[i];
|
|
86955
|
-
if (item.ClassName=='StockChip')
|
|
86956
|
-
{
|
|
86957
|
-
item.Left-=toolsWidth;
|
|
86958
|
-
}
|
|
86959
|
-
}
|
|
86960
|
-
chart.DeleteExtendChart(drawTools);
|
|
86961
|
-
chart.Frame.ChartBorder.Right-=toolsWidth;
|
|
86962
|
-
chart.SetSizeChange(true);
|
|
86963
|
-
chart.Draw();
|
|
86964
|
-
}
|
|
86965
|
-
}
|
|
86966
|
-
);
|
|
86967
|
-
}
|
|
86968
|
-
else
|
|
86969
|
-
{
|
|
86970
|
-
data.push(
|
|
86971
|
-
{
|
|
86972
|
-
text: "画图工具",
|
|
86973
|
-
click: function () {
|
|
86974
|
-
var option={Name:'画图工具', Top:chart.Frame.ChartBorder.Top };
|
|
86975
|
-
var extendChart=chart.CreateExtendChart(option.Name, option); //创建扩展图形
|
|
86976
|
-
chart.SetSizeChange(true);
|
|
86977
|
-
chart.Draw();
|
|
86978
|
-
}
|
|
86979
|
-
}
|
|
86980
|
-
);
|
|
86981
|
-
}
|
|
86982
|
-
|
|
86983
|
-
var StockChip=chart.GetExtendChartByClassName('StockChip');
|
|
86984
|
-
if (StockChip)
|
|
86985
|
-
{
|
|
86986
|
-
data.push(
|
|
86987
|
-
{
|
|
86988
|
-
text: "关闭移动筹码",
|
|
86989
|
-
click: function ()
|
|
86990
|
-
{
|
|
86991
|
-
var chipWidth=StockChip.Chart.Width;
|
|
86992
|
-
var chipIndex=parseInt(StockChip.Index);
|
|
86993
|
-
for(var i=chipIndex+1; i<chart.ExtendChartPaint.length; ++i) //在筹码后面创建的需要筹码的宽度
|
|
86994
|
-
{
|
|
86995
|
-
var item=chart.ExtendChartPaint[i];
|
|
86996
|
-
if (item.ClassName=='DrawToolsButton')
|
|
86997
|
-
{
|
|
86998
|
-
item.Left-=chipWidth;
|
|
86999
|
-
}
|
|
87000
|
-
}
|
|
87001
|
-
chart.DeleteExtendChart(StockChip);
|
|
87002
|
-
chart.Frame.ChartBorder.Right-=chipWidth;
|
|
87003
|
-
chart.SetSizeChange(true);
|
|
87004
|
-
chart.Draw();
|
|
87005
|
-
}
|
|
87006
|
-
|
|
87007
|
-
}
|
|
87008
|
-
);
|
|
87009
|
-
}
|
|
87010
|
-
else
|
|
87011
|
-
{
|
|
87012
|
-
data.push(
|
|
87013
|
-
{
|
|
87014
|
-
text: "移动筹码",
|
|
87015
|
-
click: function () {
|
|
87016
|
-
var option={Name:'筹码分布', ShowType:1, Width:230 };
|
|
87017
|
-
var extendChart=chart.CreateExtendChart(option.Name, option); //创建扩展图形
|
|
87018
|
-
chart.SetSizeChange(true);
|
|
87019
|
-
chart.Draw();
|
|
87020
|
-
}
|
|
87021
|
-
}
|
|
87022
|
-
);
|
|
87023
|
-
}
|
|
87024
|
-
|
|
87025
|
-
return data;
|
|
87026
|
-
}
|
|
87027
|
-
|
|
87028
|
-
//缺口提示
|
|
87029
|
-
this.GetPriceGap=function(chart)
|
|
87030
|
-
{
|
|
87031
|
-
var klineChart=chart.ChartPaint[0];
|
|
87032
|
-
var priceGap=klineChart.PriceGap;
|
|
87033
|
-
var data=
|
|
87034
|
-
[
|
|
87035
|
-
{
|
|
87036
|
-
text: "显示1个缺口",
|
|
87037
|
-
click: function () { chart.ChangePriceGap({ Enable:true, Count:1 }); }
|
|
87038
|
-
},
|
|
87039
|
-
{
|
|
87040
|
-
text: "显示2个缺口",
|
|
87041
|
-
click: function () { chart.ChangePriceGap({ Enable:true, Count:2 }); }
|
|
87042
|
-
},
|
|
87043
|
-
{
|
|
87044
|
-
text: "显示3个缺口",
|
|
87045
|
-
click: function () { chart.ChangePriceGap({ Enable:true, Count:3 }); }
|
|
87046
|
-
},
|
|
87047
|
-
{
|
|
87048
|
-
text: "隐藏缺口",
|
|
87049
|
-
click: function () { chart.ChangePriceGap({ Enable:false }); }
|
|
87050
|
-
}
|
|
87051
|
-
];
|
|
87052
|
-
|
|
87053
|
-
if (!priceGap.Enable || priceGap.Count<=0)
|
|
87054
|
-
{
|
|
87055
|
-
data[data.length-1].selected=true; //选中
|
|
87056
|
-
}
|
|
87057
|
-
else if (priceGap.Enable && priceGap.Count>0)
|
|
87058
|
-
{
|
|
87059
|
-
var index=priceGap.Count-1;
|
|
87060
|
-
if (index>data.length-2) index=data.length-2;
|
|
87061
|
-
data[index].selected=true; //选中
|
|
87062
|
-
}
|
|
87063
|
-
|
|
87064
|
-
return data;
|
|
87065
|
-
}
|
|
87066
|
-
|
|
87067
|
-
this.GetBGSplit=function(chart)
|
|
87068
|
-
{
|
|
87069
|
-
var data=
|
|
87070
|
-
[
|
|
87071
|
-
{
|
|
87072
|
-
text: "启用",
|
|
87073
|
-
click: function ()
|
|
87074
|
-
{
|
|
87075
|
-
chart.CreateExtendChart("SessionBreaksPaint", { });
|
|
87076
|
-
chart.Draw();
|
|
87077
|
-
}
|
|
87078
|
-
},
|
|
87079
|
-
{
|
|
87080
|
-
text: "关闭",
|
|
87081
|
-
click: function ()
|
|
87082
|
-
{
|
|
87083
|
-
var finder=chart.GetExtendChartByClassName("SessionBreaksPaint");
|
|
87084
|
-
if (finder)
|
|
87085
|
-
{
|
|
87086
|
-
chart.DeleteExtendChartByID(finder.Chart.ID);
|
|
87087
|
-
chart.Draw();
|
|
87088
|
-
}
|
|
87089
|
-
}
|
|
87090
|
-
},
|
|
87091
|
-
];
|
|
87092
|
-
|
|
87093
|
-
var finder=chart.GetExtendChartByClassName("SessionBreaksPaint");
|
|
87094
|
-
if (finder) data[0].selected=true;
|
|
87095
|
-
else data[1].selected=true;
|
|
87096
|
-
|
|
87097
|
-
return data;
|
|
87098
|
-
}
|
|
87099
|
-
|
|
87100
|
-
|
|
87101
|
-
this.GetKLineInfo=function(chart)
|
|
87102
|
-
{
|
|
87103
|
-
var setInfo=new Set();
|
|
87104
|
-
for(var i in chart.ChartInfo)
|
|
87105
|
-
{
|
|
87106
|
-
var item=chart.ChartInfo[i];
|
|
87107
|
-
setInfo.add(item.ClassName);
|
|
87108
|
-
}
|
|
87109
|
-
|
|
87110
|
-
var aryKLineInfo=["公告","业绩预告","调研","大宗交易","龙虎榜","互动易"]
|
|
87111
|
-
|
|
87112
|
-
var data=[];
|
|
87113
|
-
for(var i in aryKLineInfo)
|
|
87114
|
-
{
|
|
87115
|
-
var infoName=aryKLineInfo[i];
|
|
87116
|
-
var classInfo=JSKLineInfoMap.GetClassInfo(infoName);
|
|
87117
|
-
if (!classInfo) continue;
|
|
87118
|
-
|
|
87119
|
-
var item=this.CreateKlineInfoItem(infoName, setInfo.has(classInfo.ClassName), chart);
|
|
87120
|
-
data.push(item);
|
|
87121
|
-
}
|
|
87122
|
-
|
|
87123
|
-
if (chart.ChartInfo.length>0)
|
|
87124
|
-
{
|
|
87125
|
-
data[data.length-1].isBorder=true;
|
|
87126
|
-
var item={ text:'删除所有', click:function() { chart.ClearKLineInfo()} };
|
|
87127
|
-
data.push(item);
|
|
87128
|
-
|
|
87129
|
-
}
|
|
87130
|
-
|
|
87131
|
-
return data;
|
|
87132
|
-
}
|
|
87133
|
-
|
|
87134
|
-
this.CreateKlineInfoItem=function(infoName,bExist,chart)
|
|
87135
|
-
{
|
|
87136
|
-
var item=
|
|
87137
|
-
{
|
|
87138
|
-
text:infoName,
|
|
87139
|
-
selected:bExist
|
|
87140
|
-
}
|
|
87141
|
-
|
|
87142
|
-
if (bExist) item.click=function() { chart.DeleteKLineInfo(infoName) };
|
|
87143
|
-
else item.click=function() { chart.AddKLineInfo(infoName,true) }
|
|
87144
|
-
|
|
87145
|
-
return item;
|
|
87146
|
-
}
|
|
87147
|
-
|
|
87148
|
-
this.DoModal=function(event)
|
|
87149
|
-
{
|
|
87150
|
-
var chart=event.data.Chart;
|
|
87151
|
-
var rightMenu=chart.RightMenu;
|
|
87152
|
-
var x = event.offsetX;
|
|
87153
|
-
var y = event.offsetY;
|
|
87154
|
-
|
|
87155
|
-
var dataList=[{
|
|
87156
|
-
text: "分析周期",
|
|
87157
|
-
children: this.GetPeriod(chart)
|
|
87158
|
-
},
|
|
87159
|
-
{
|
|
87160
|
-
text: "复权处理",
|
|
87161
|
-
children: this.GetRight(chart)
|
|
87162
|
-
},
|
|
87163
|
-
{
|
|
87164
|
-
text: "指标切换",
|
|
87165
|
-
children: this.GetIndex(chart)
|
|
87166
|
-
},
|
|
87167
|
-
{
|
|
87168
|
-
text:"五彩K线",
|
|
87169
|
-
children: this.GetColorIndex(chart)
|
|
87170
|
-
},
|
|
87171
|
-
{
|
|
87172
|
-
text:'专家系统',
|
|
87173
|
-
children: this.GetTradeIndex(chart)
|
|
87174
|
-
},
|
|
87175
|
-
{
|
|
87176
|
-
text:'信息地雷',
|
|
87177
|
-
children: this.GetKLineInfo(chart)
|
|
87178
|
-
},
|
|
87179
|
-
{
|
|
87180
|
-
text:'缺口提示',
|
|
87181
|
-
children: this.GetPriceGap(chart)
|
|
87182
|
-
},
|
|
87183
|
-
{
|
|
87184
|
-
text: "叠加品种",
|
|
87185
|
-
children: this.GetOverlay(chart)
|
|
87186
|
-
},
|
|
87187
|
-
{
|
|
87188
|
-
text:'主图线型',
|
|
87189
|
-
children: this.GetKLineType(chart)
|
|
87190
|
-
},
|
|
87191
|
-
{
|
|
87192
|
-
text:"坐标类型",
|
|
87193
|
-
children:this.GetCoordinateType(chart)
|
|
87194
|
-
},
|
|
87195
|
-
{
|
|
87196
|
-
text:'指标窗口个数',
|
|
87197
|
-
children: this.GetIndexWindowCount(chart)
|
|
87198
|
-
},
|
|
87199
|
-
{
|
|
87200
|
-
text:'鼠标拖拽',
|
|
87201
|
-
children: this.GetDragModeType(chart)
|
|
87202
|
-
},
|
|
87203
|
-
{
|
|
87204
|
-
text:"工具",
|
|
87205
|
-
children:this.GetTools(chart)
|
|
87206
|
-
},
|
|
87207
|
-
{
|
|
87208
|
-
text:"背景分割",
|
|
87209
|
-
children:this.GetBGSplit(chart)
|
|
87210
|
-
}
|
|
87211
|
-
];
|
|
87212
|
-
|
|
87213
|
-
var upperSymbol=chart.Symbol.toUpperCase();
|
|
87214
|
-
if(MARKET_SUFFIX_NAME.IsSHSZIndex(chart.Symbol) || MARKET_SUFFIX_NAME.IsBIT(upperSymbol))
|
|
87215
|
-
{
|
|
87216
|
-
dataList.splice(1,1);
|
|
87217
|
-
}
|
|
87218
|
-
|
|
87219
|
-
var identify=event.data.FrameID;
|
|
87220
|
-
var overlayIndex=this.GetOverlayIndex(chart,identify);
|
|
87221
|
-
if (overlayIndex && overlayIndex.length>0)
|
|
87222
|
-
{
|
|
87223
|
-
var delOverlayIndexMenu={ text:'删除叠加指标', children:this.GetDeleteOverlayIndex(chart,overlayIndex) }
|
|
87224
|
-
dataList.splice(3,0,delOverlayIndexMenu);
|
|
87225
|
-
}
|
|
87226
|
-
|
|
87227
|
-
JSConsole.Chart.Log('[KLineRightMenu::DoModal]',identify);
|
|
87228
|
-
rightMenu.Show({
|
|
87229
|
-
windowIndex :identify,
|
|
87230
|
-
x:x+chart.UIElement.offsetLeft,
|
|
87231
|
-
y:y+chart.UIElement.offsetTop,
|
|
87232
|
-
position:chart.Frame.Position,
|
|
87233
|
-
data:dataList
|
|
87234
|
-
})
|
|
87235
|
-
|
|
87236
|
-
$(document).click(function () {
|
|
87237
|
-
rightMenu.Hide();
|
|
87238
|
-
});
|
|
87239
|
-
}
|
|
87240
|
-
|
|
87241
|
-
this.GetOverlayIndex=function(chart, windowsIndex)
|
|
87242
|
-
{
|
|
87243
|
-
if (windowsIndex>=chart.Frame.SubFrame.length || windowsIndex<0) return [];
|
|
87244
|
-
|
|
87245
|
-
var result=[];
|
|
87246
|
-
var item=chart.Frame.SubFrame[windowsIndex];
|
|
87247
|
-
for(var i in item.OverlayIndex)
|
|
87248
|
-
{
|
|
87249
|
-
var overlayItem=item.OverlayIndex[i];
|
|
87250
|
-
result.push({Name:overlayItem.Script.Name, Identify:overlayItem.Identify});
|
|
87251
|
-
}
|
|
87252
|
-
|
|
87253
|
-
return result;
|
|
87254
|
-
}
|
|
87255
|
-
|
|
87256
|
-
this.GetDeleteOverlayIndex=function(chart,overlayIndex)
|
|
87257
|
-
{
|
|
87258
|
-
var data=[];
|
|
87259
|
-
for(var i in overlayIndex)
|
|
87260
|
-
{
|
|
87261
|
-
let identify=overlayIndex[i].Identify;
|
|
87262
|
-
data.push({text:overlayIndex[i].Name, click:function()
|
|
87263
|
-
{
|
|
87264
|
-
chart.DeleteOverlayWindowsIndex(identify)
|
|
87265
|
-
}});
|
|
87266
|
-
}
|
|
87267
|
-
|
|
87268
|
-
return data;
|
|
87269
|
-
}
|
|
87270
|
-
}
|
|
87271
|
-
|
|
87272
|
-
//K线区间选择右键菜单
|
|
87273
|
-
function KLineSelectRightMenu(divElement)
|
|
87274
|
-
{
|
|
87275
|
-
this.newMethod=KLineRightMenu; //派生
|
|
87276
|
-
this.newMethod(divElement);
|
|
87277
|
-
delete this.newMethod;
|
|
87278
|
-
|
|
87279
|
-
this.DoModal=function(event)
|
|
87280
|
-
{
|
|
87281
|
-
var chart=event.data.Chart;
|
|
87282
|
-
var rightMenu=this;
|
|
87283
|
-
var x = event.data.X;
|
|
87284
|
-
var y = event.data.Y;
|
|
87285
|
-
|
|
87286
|
-
var dataList=
|
|
87287
|
-
[
|
|
87288
|
-
{
|
|
87289
|
-
text: "区间统计",
|
|
87290
|
-
click: function ()
|
|
87291
|
-
{
|
|
87292
|
-
JSConsole.Chart.Log('[KLineSelectRightMenu::click] 区间统计');
|
|
87293
|
-
rightMenu.Hide();
|
|
87294
|
-
var dialog=new KLineSelectRectDialog(divElement);
|
|
87295
|
-
dialog.DoModal(event);
|
|
87296
|
-
}
|
|
87297
|
-
},
|
|
87298
|
-
{
|
|
87299
|
-
text:'区间放大',
|
|
87300
|
-
click:function()
|
|
87301
|
-
{
|
|
87302
|
-
JSConsole.Chart.Log('[KLineSelectRightMenu::click] 区间放大');
|
|
87303
|
-
var chart=event.data.Chart;
|
|
87304
|
-
chart.ShowSelectData(event.data.SelectData);
|
|
87305
|
-
}
|
|
87306
|
-
}
|
|
87307
|
-
];
|
|
87308
|
-
|
|
87309
|
-
rightMenu.Show({
|
|
87310
|
-
x:x,
|
|
87311
|
-
y:y,
|
|
87312
|
-
position:chart.Frame.Position,
|
|
87313
|
-
data:dataList
|
|
87314
|
-
});
|
|
87315
|
-
}
|
|
87316
|
-
|
|
87317
|
-
this.Show=function (obj)
|
|
87318
|
-
{
|
|
87319
|
-
var _self = this;
|
|
87320
|
-
$.extend(_self.option, obj);
|
|
87321
|
-
|
|
87322
|
-
//判断是否重复创建
|
|
87323
|
-
if (!_self.ID) _self.Create();
|
|
87324
|
-
//判断下如果DOM没了需要重新创建
|
|
87325
|
-
var divIdName='topMenu_'+_self.ID;
|
|
87326
|
-
var divDom=document.getElementById(divIdName);
|
|
87327
|
-
if (!divDom) _self.Create();
|
|
87328
|
-
|
|
87329
|
-
var $topMenu = $("#topMenu_"+_self.ID),
|
|
87330
|
-
topWidth = $topMenu.outerWidth(),
|
|
87331
|
-
topHeight = $topMenu.outerHeight();
|
|
87332
|
-
|
|
87333
|
-
$topMenu.contextmenu(function()
|
|
87334
|
-
{
|
|
87335
|
-
return false; //屏蔽系统右键菜单
|
|
87336
|
-
});
|
|
87337
|
-
|
|
87338
|
-
var x = _self.option.x,
|
|
87339
|
-
y = _self.option.y;
|
|
87340
|
-
|
|
87341
|
-
if (topWidth > _self.option.position.X + _self.option.position.W- x) //超过了右边距
|
|
87342
|
-
x = x - topWidth;
|
|
87343
|
-
|
|
87344
|
-
if (topHeight > _self.option.position.Y +_self.option.position.H - y)//超过了下边距
|
|
87345
|
-
y = y - topHeight;
|
|
87346
|
-
|
|
87347
|
-
$topMenu.hide();
|
|
87348
|
-
$topMenu.css({ position:"absolute",left: x + "px", top: y + "px" }).show();
|
|
87349
|
-
|
|
87350
|
-
$("#topMenu_" + _self.ID).find("tr").show(); //把菜单列表显示
|
|
87351
|
-
|
|
87352
|
-
this.isInit = true;
|
|
87353
|
-
}
|
|
87354
|
-
}
|
|
87355
|
-
|
|
87356
|
-
//分钟数据右键菜单
|
|
87357
|
-
function MinuteRightMenu(divElement)
|
|
87358
|
-
{
|
|
87359
|
-
this.newMethod=KLineRightMenu; //派生
|
|
87360
|
-
this.newMethod(divElement);
|
|
87361
|
-
delete this.newMethod;
|
|
87362
|
-
|
|
87363
|
-
this.DoModal=function(event)
|
|
87364
|
-
{
|
|
87365
|
-
var chart=event.data.Chart;
|
|
87366
|
-
var rightMenu=chart.RightMenu;
|
|
87367
|
-
var x = event.offsetX;
|
|
87368
|
-
var y = event.offsetY;
|
|
87369
|
-
|
|
87370
|
-
var dataList=
|
|
87371
|
-
[
|
|
87372
|
-
{
|
|
87373
|
-
text: "叠加品种",
|
|
87374
|
-
children: this.GetOverlay(chart)
|
|
87375
|
-
},
|
|
87376
|
-
{
|
|
87377
|
-
text: "多日分时图",
|
|
87378
|
-
children: this.GetDayCount(chart)
|
|
87379
|
-
},
|
|
87380
|
-
{
|
|
87381
|
-
text:'指标窗口个数',
|
|
87382
|
-
children: this.GetIndexWindowCount(chart)
|
|
87383
|
-
},
|
|
87384
|
-
{
|
|
87385
|
-
text: "副图指标切换",
|
|
87386
|
-
children: this.GetIndex(chart)
|
|
87387
|
-
},
|
|
87388
|
-
{
|
|
87389
|
-
text:"区间选择",
|
|
87390
|
-
children:this.GetSelectRect(chart)
|
|
87391
|
-
},
|
|
87392
|
-
|
|
87393
|
-
];
|
|
87394
|
-
|
|
87395
|
-
var symbol=chart.Symbol;
|
|
87396
|
-
if (MARKET_SUFFIX_NAME.IsSHSZStockA(symbol))
|
|
87397
|
-
{
|
|
87398
|
-
dataList.push({text:'集合竞价',children: this.GetShowBeforeData(chart)});
|
|
87399
|
-
}
|
|
87400
|
-
|
|
87401
|
-
dataList.push({text:"工具", children:this.GetTools(chart)});
|
|
87402
|
-
|
|
87403
|
-
var identify=event.data.FrameID;
|
|
87404
|
-
var overlayIndex=this.GetOverlayIndex(chart,identify);
|
|
87405
|
-
if (overlayIndex && overlayIndex.length>0)
|
|
87406
|
-
{
|
|
87407
|
-
var delOverlayIndexMenu={ text:'删除叠加指标', children:this.GetDeleteOverlayIndex(chart,overlayIndex) }
|
|
87408
|
-
dataList.splice(3,0,delOverlayIndexMenu);
|
|
87409
|
-
}
|
|
87410
|
-
|
|
87411
|
-
var identify=event.data.FrameID;
|
|
87412
|
-
JSConsole.Chart.Log('[MinuteRightMenu::DoModal]',identify);
|
|
87413
|
-
rightMenu.Show({
|
|
87414
|
-
windowIndex :identify,
|
|
87415
|
-
x:x+chart.UIElement.offsetLeft,
|
|
87416
|
-
y:y+chart.UIElement.offsetTop,
|
|
87417
|
-
position:chart.Frame.Position,
|
|
87418
|
-
data:dataList
|
|
87419
|
-
})
|
|
87420
|
-
|
|
87421
|
-
$(document).click(function () {
|
|
87422
|
-
rightMenu.Hide();
|
|
87423
|
-
});
|
|
87424
|
-
}
|
|
87425
|
-
|
|
87426
|
-
this.GetDayCount=function(chart)
|
|
87427
|
-
{
|
|
87428
|
-
var data=
|
|
87429
|
-
[
|
|
87430
|
-
{
|
|
87431
|
-
text: "当日分时图",
|
|
87432
|
-
click: function () { chart.ChangeDayCount(1); },
|
|
87433
|
-
isBorder:true
|
|
87434
|
-
},
|
|
87435
|
-
{
|
|
87436
|
-
text: "最近2日",
|
|
87437
|
-
click: function () { chart.ChangeDayCount(2); }
|
|
87438
|
-
},
|
|
87439
|
-
{
|
|
87440
|
-
text: "最近3日",
|
|
87441
|
-
click: function () { chart.ChangeDayCount(3); }
|
|
87442
|
-
},
|
|
87443
|
-
{
|
|
87444
|
-
text: "最近4日",
|
|
87445
|
-
click: function () { chart.ChangeDayCount(4); }
|
|
87446
|
-
},
|
|
87447
|
-
{
|
|
87448
|
-
text: "最近5日",
|
|
87449
|
-
click: function () { chart.ChangeDayCount(5); }
|
|
87450
|
-
},
|
|
87451
|
-
{
|
|
87452
|
-
text: "最近6日",
|
|
87453
|
-
click: function () { chart.ChangeDayCount(6); }
|
|
87454
|
-
}
|
|
87455
|
-
];
|
|
87456
|
-
|
|
87457
|
-
if ((chart.DayCount-1)>=0 && (chart.DayCount-1)<data.length) data[chart.DayCount-1].selected=true;
|
|
87458
|
-
|
|
87459
|
-
return data;
|
|
87460
|
-
}
|
|
87461
|
-
|
|
87462
|
-
this.GetIndex=function (chart)
|
|
87463
|
-
{
|
|
87464
|
-
var data=
|
|
87465
|
-
[
|
|
87466
|
-
{
|
|
87467
|
-
text: "MACD",
|
|
87468
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'MACD') }
|
|
87469
|
-
},
|
|
87470
|
-
{
|
|
87471
|
-
text: "DMI",
|
|
87472
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'DMI') }
|
|
87473
|
-
},
|
|
87474
|
-
{
|
|
87475
|
-
text: "DMA",
|
|
87476
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'DMA') }
|
|
87477
|
-
},
|
|
87478
|
-
{
|
|
87479
|
-
text: "BRAR",
|
|
87480
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'BRAR') }
|
|
87481
|
-
},
|
|
87482
|
-
{
|
|
87483
|
-
text: "KDJ",
|
|
87484
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'KDJ') }
|
|
87485
|
-
},
|
|
87486
|
-
{
|
|
87487
|
-
text: "RSI",
|
|
87488
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'RSI') }
|
|
87489
|
-
},
|
|
87490
|
-
{
|
|
87491
|
-
text: "WR",
|
|
87492
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'WR') }
|
|
87493
|
-
},
|
|
87494
|
-
{
|
|
87495
|
-
text: "CCI",
|
|
87496
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'CCI') }
|
|
87497
|
-
},
|
|
87498
|
-
{
|
|
87499
|
-
text: "TRIX",
|
|
87500
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'TRIX') }
|
|
87501
|
-
}
|
|
87502
|
-
];
|
|
87503
|
-
|
|
87504
|
-
return data;
|
|
87505
|
-
}
|
|
87506
|
-
|
|
87507
|
-
this.GetShowBeforeData=function(chart) //是否显示集合竞价
|
|
87508
|
-
{
|
|
87509
|
-
if (chart.IsShowBeforeData)
|
|
87510
|
-
{
|
|
87511
|
-
var data=
|
|
87512
|
-
[
|
|
87513
|
-
{
|
|
87514
|
-
text: "隐藏",
|
|
87515
|
-
click: function () { chart.ShowCallAuctionData( { Left:false, MultiDay:{ Left:false }} ); },
|
|
87516
|
-
}
|
|
87517
|
-
];
|
|
87518
|
-
|
|
87519
|
-
return data;
|
|
87520
|
-
}
|
|
87521
|
-
else
|
|
87522
|
-
{
|
|
87523
|
-
var data=
|
|
87524
|
-
[
|
|
87525
|
-
{
|
|
87526
|
-
text: "显示",
|
|
87527
|
-
click: function () { chart.ShowCallAuctionData({Left:true, MultiDay:{ Left:true }}); },
|
|
87528
|
-
}
|
|
87529
|
-
];
|
|
87530
|
-
|
|
87531
|
-
return data;
|
|
87532
|
-
}
|
|
87533
|
-
}
|
|
87534
|
-
|
|
87535
|
-
this.GetSelectRect=function(chart) //区间选择
|
|
87536
|
-
{
|
|
87537
|
-
if (chart.EnableSelectRect)
|
|
87538
|
-
{
|
|
87539
|
-
var data=
|
|
87540
|
-
[
|
|
87541
|
-
{
|
|
87542
|
-
text: "禁用区间选择",
|
|
87543
|
-
click: function () { chart.EnableSelectRect=false; },
|
|
87544
|
-
}
|
|
87545
|
-
];
|
|
87546
|
-
|
|
87547
|
-
return data;
|
|
87548
|
-
}
|
|
87549
|
-
else
|
|
87550
|
-
{
|
|
87551
|
-
var data=
|
|
87552
|
-
[
|
|
87553
|
-
{
|
|
87554
|
-
text: "启动区间选择",
|
|
87555
|
-
click: function () { chart.EnableSelectRect=true },
|
|
87556
|
-
}
|
|
87557
|
-
];
|
|
87558
|
-
|
|
87559
|
-
return data;
|
|
87560
|
-
}
|
|
87561
|
-
}
|
|
87562
|
-
|
|
87563
|
-
//指标窗口个数
|
|
87564
|
-
this.GetIndexWindowCount=function(chart)
|
|
87565
|
-
{
|
|
87566
|
-
var data=
|
|
87567
|
-
[
|
|
87568
|
-
{
|
|
87569
|
-
text: "1个窗口",
|
|
87570
|
-
click: function () { chart.ChangeIndexWindowCount(2); }
|
|
87571
|
-
},
|
|
87572
|
-
{
|
|
87573
|
-
text: "2个窗口",
|
|
87574
|
-
click: function () { chart.ChangeIndexWindowCount(3); }
|
|
87575
|
-
},
|
|
87576
|
-
{
|
|
87577
|
-
text: "3个窗口",
|
|
87578
|
-
click: function () { chart.ChangeIndexWindowCount(4); }
|
|
87579
|
-
},
|
|
87580
|
-
{
|
|
87581
|
-
text: "4个窗口",
|
|
87582
|
-
click: function () { chart.ChangeIndexWindowCount(5); }
|
|
87583
|
-
},
|
|
87584
|
-
{
|
|
87585
|
-
text: "5个窗口",
|
|
87586
|
-
click: function () { chart.ChangeIndexWindowCount(6); }
|
|
87587
|
-
}
|
|
87588
|
-
];
|
|
87589
|
-
|
|
87590
|
-
var count=chart.Frame.SubFrame.length-1;
|
|
87591
|
-
if ((count-1)>=0 && (count-1)<data.length) data[count-1].selected=true; //选中
|
|
87592
|
-
|
|
87593
|
-
return data;
|
|
87594
|
-
}
|
|
87595
|
-
|
|
87596
|
-
//工具
|
|
87597
|
-
this.GetTools=function(chart)
|
|
87598
|
-
{
|
|
87599
|
-
var data=[];
|
|
87600
|
-
var drawTools=chart.GetExtendChartByClassName('DrawToolsButton');
|
|
87601
|
-
if (drawTools)
|
|
87602
|
-
{
|
|
87603
|
-
data.push(
|
|
87604
|
-
{
|
|
87605
|
-
text: "关闭画图工具",
|
|
87606
|
-
click: function ()
|
|
87607
|
-
{
|
|
87608
|
-
var toolsWidth=drawTools.Chart.Width;
|
|
87609
|
-
var toolsIndex=parseInt(drawTools.Index);
|
|
87610
|
-
chart.DeleteExtendChart(drawTools);
|
|
87611
|
-
chart.Frame.ChartBorder.Right-=toolsWidth;
|
|
87612
|
-
chart.SetSizeChange(true);
|
|
87613
|
-
chart.Draw();
|
|
87614
|
-
}
|
|
87615
|
-
}
|
|
87616
|
-
);
|
|
87617
|
-
}
|
|
87618
|
-
else
|
|
87619
|
-
{
|
|
87620
|
-
data.push(
|
|
87621
|
-
{
|
|
87622
|
-
text: "画图工具",
|
|
87623
|
-
click: function () {
|
|
87624
|
-
var option={Name:'画图工具', Top:chart.Frame.ChartBorder.Top };
|
|
87625
|
-
var extendChart=chart.CreateExtendChart(option.Name, option); //创建扩展图形
|
|
87626
|
-
chart.SetSizeChange(true);
|
|
87627
|
-
chart.Draw();
|
|
87628
|
-
}
|
|
87629
|
-
}
|
|
87630
|
-
);
|
|
87631
|
-
}
|
|
87632
|
-
|
|
87633
|
-
return data;
|
|
87634
|
-
}
|
|
87635
|
-
}
|
|
87636
|
-
|
|
87637
86242
|
//画图工具 单个图形设置
|
|
87638
86243
|
function ChartPictureSettingMenu(divElement)
|
|
87639
86244
|
{
|