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
|
@@ -4171,9 +4171,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4171
4171
|
var pixelRatio=GetDevicePixelRatio();
|
|
4172
4172
|
|
|
4173
4173
|
//右键菜单
|
|
4174
|
-
if (option.IsShowRightMenu
|
|
4174
|
+
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
4175
4175
|
if (option.ScriptError) chart.ScriptErrorCallback=option.ScriptError;
|
|
4176
|
-
chart.SelectRectRightMenu=new KLineSelectRightMenu(this.DivElement);
|
|
4177
4176
|
if (option.EnableScrollUpDown==true) chart.EnableScrollUpDown=option.EnableScrollUpDown;
|
|
4178
4177
|
if (option.DisableMouse==true) chart.DisableMouse=option.DisableMouse;
|
|
4179
4178
|
if (option.TouchMoveMinAngle) chart.TouchMoveMinAngle=option.TouchMoveMinAngle;
|
|
@@ -4587,7 +4586,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4587
4586
|
chart.MinuteDialog=this.MinuteDialog;
|
|
4588
4587
|
|
|
4589
4588
|
//右键菜单
|
|
4590
|
-
if (option.IsShowRightMenu
|
|
4589
|
+
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
4591
4590
|
|
|
4592
4591
|
if (option.KLine) //k线图的属性设置
|
|
4593
4592
|
{
|
|
@@ -4807,7 +4806,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4807
4806
|
|
|
4808
4807
|
if (option.MinuteInfo) chart.CreateMinuteInfo(option.MinuteInfo);
|
|
4809
4808
|
|
|
4810
|
-
if (option.IsShowRightMenu
|
|
4809
|
+
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
4811
4810
|
|
|
4812
4811
|
if (IFrameSplitOperator.IsNumber(option.DayCount)) chart.DayCount=option.DayCount;
|
|
4813
4812
|
|
|
@@ -5526,6 +5525,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5526
5525
|
if (!chart) return false;
|
|
5527
5526
|
|
|
5528
5527
|
this.JSChartContainer=chart;
|
|
5528
|
+
chart.DivElement=this.DivElement;
|
|
5529
5529
|
|
|
5530
5530
|
if (option.DefaultCursor) chart.DefaultCursor=option.DefaultCursor;
|
|
5531
5531
|
if (option.OnCreatedCallback) option.OnCreatedCallback(chart);
|
|
@@ -5533,13 +5533,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5533
5533
|
//是否自动更新
|
|
5534
5534
|
if (option.IsAutoUpdate!=null) chart.IsAutoUpdate=option.IsAutoUpdate;
|
|
5535
5535
|
if (option.AutoUpdateFrequency>0) chart.AutoUpdateFrequency=option.AutoUpdateFrequency;
|
|
5536
|
+
|
|
5536
5537
|
//内置菜单
|
|
5537
|
-
if (option.EnablePopMenuV2===true)
|
|
5538
|
-
|
|
5539
|
-
chart.JSPopMenu=new JSPopMenu();
|
|
5540
|
-
chart.JSPopMenu.Inital();
|
|
5541
|
-
chart.EnablePopMenuV2=true;
|
|
5542
|
-
}
|
|
5538
|
+
if (option.EnablePopMenuV2===true) chart.InitalPopMenu();
|
|
5539
|
+
|
|
5543
5540
|
//注册事件
|
|
5544
5541
|
if (option.EventCallback)
|
|
5545
5542
|
{
|
|
@@ -6542,6 +6539,10 @@ var JSCHART_MENU_ID=
|
|
|
6542
6539
|
|
|
6543
6540
|
CMD_ENABLE_SELECT_RECT_ID:22, //启动区间选择
|
|
6544
6541
|
CMD_CHANGE_DAY_COUNT_ID:23, //切换天数
|
|
6542
|
+
CMD_SHOW_BEFORE_DATA_ID:24, //显示|隐藏集合竞价
|
|
6543
|
+
|
|
6544
|
+
CMD_SELECTED_ZOOM_ID:25, //选中放大
|
|
6545
|
+
CMD_SELECTED_SUMMARY_ID:26, //区间统计
|
|
6545
6546
|
}
|
|
6546
6547
|
|
|
6547
6548
|
|
|
@@ -6629,11 +6630,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6629
6630
|
this.LoadDataSplashTitle="数据加载中"; //下载数据提示信息
|
|
6630
6631
|
this.DefaultCursor="default"; //crosshair , default 默认手型
|
|
6631
6632
|
|
|
6632
|
-
this.EnablePopMenuV2=false;
|
|
6633
|
-
this.JSPopMenu; //内置菜单
|
|
6634
|
-
//this.JSPopMenu=new JSPopMenu(); //内置菜单
|
|
6635
|
-
//this.JSPopMenu.Inital();
|
|
6636
|
-
|
|
6637
6633
|
//绘图缓存
|
|
6638
6634
|
this.CacheCanvas=null;
|
|
6639
6635
|
this.CacheElement=null;
|
|
@@ -6712,9 +6708,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6712
6708
|
this.SelectRect.oncontextmenu=function() { return false; }; //屏蔽选中区域系统右键菜单
|
|
6713
6709
|
uielement.parentNode.appendChild(this.SelectRect);
|
|
6714
6710
|
|
|
6715
|
-
//区间选择右键菜单
|
|
6716
|
-
this.SelectRectRightMenu;
|
|
6717
|
-
|
|
6718
6711
|
//坐标轴风格方法 double-更加数值型分割 price-更加股票价格分割
|
|
6719
6712
|
this.FrameSplitData=new Map();
|
|
6720
6713
|
this.FrameSplitData.set("double",new SplitData());
|
|
@@ -6774,12 +6767,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6774
6767
|
|
|
6775
6768
|
this.StockCache={ Data:null }; //扩展数据缓存数据
|
|
6776
6769
|
|
|
6770
|
+
this.JSPopMenu; //内置菜单
|
|
6771
|
+
this.IsShowRightMenu=true; //显示右键菜单
|
|
6772
|
+
|
|
6777
6773
|
|
|
6778
6774
|
this.ClearStockCache=function()
|
|
6779
6775
|
{
|
|
6780
6776
|
this.StockCache.Data=null;
|
|
6781
6777
|
}
|
|
6782
6778
|
|
|
6779
|
+
this.InitalPopMenu=function() //初始化弹出窗口
|
|
6780
|
+
{
|
|
6781
|
+
if (this.JSPopMenu) return;
|
|
6782
|
+
|
|
6783
|
+
this.JSPopMenu=new JSPopMenu(); //内置菜单
|
|
6784
|
+
this.JSPopMenu.Inital();
|
|
6785
|
+
}
|
|
6786
|
+
|
|
6783
6787
|
//obj={ Element:, Canvas: }
|
|
6784
6788
|
this.SetCorssCursorElement=function(obj)
|
|
6785
6789
|
{
|
|
@@ -6948,6 +6952,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6948
6952
|
this.UIOnContextMenu=function(e)
|
|
6949
6953
|
{
|
|
6950
6954
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
6955
|
+
if (!this.IsShowRightMenu) return;
|
|
6951
6956
|
|
|
6952
6957
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
6953
6958
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
@@ -7189,7 +7194,6 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7189
7194
|
}
|
|
7190
7195
|
|
|
7191
7196
|
this.HideSelectRect();
|
|
7192
|
-
if (this.SelectRectRightMenu) this.SelectRectRightMenu.Hide();
|
|
7193
7197
|
if (this.ChartPictureMenu) this.ChartPictureMenu.Hide();
|
|
7194
7198
|
|
|
7195
7199
|
var paint=this.GetRectSelectPaint();
|
|
@@ -7829,17 +7833,19 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7829
7833
|
}
|
|
7830
7834
|
else
|
|
7831
7835
|
{
|
|
7832
|
-
if (isShowMenu
|
|
7836
|
+
if (isShowMenu)
|
|
7833
7837
|
{
|
|
7834
|
-
|
|
7835
|
-
{
|
|
7838
|
+
var data=
|
|
7839
|
+
{
|
|
7836
7840
|
Chart:this,
|
|
7837
7841
|
X:drag.LastMove.X-uielement.getBoundingClientRect().left,
|
|
7838
7842
|
Y:drag.LastMove.Y-uielement.getBoundingClientRect().top,
|
|
7839
7843
|
SelectData:selectData, //区间选择的数据
|
|
7840
7844
|
RectSelectPaint:paint //区间选择背景
|
|
7841
7845
|
};
|
|
7842
|
-
|
|
7846
|
+
|
|
7847
|
+
e.data=data;
|
|
7848
|
+
this.PopupSelectRectMenuV2(data, e);
|
|
7843
7849
|
}
|
|
7844
7850
|
}
|
|
7845
7851
|
}
|
|
@@ -13096,6 +13102,18 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13096
13102
|
if (this.ChangeDayCount && param!=null)
|
|
13097
13103
|
this.ChangeDayCount(param);
|
|
13098
13104
|
break;
|
|
13105
|
+
case JSCHART_MENU_ID.CMD_SHOW_BEFORE_DATA_ID:
|
|
13106
|
+
if (this.ShowCallAuctionData && IFrameSplitOperator.IsBool(srcParam))
|
|
13107
|
+
this.ShowCallAuctionData({ Left:srcParam, MultiDay:{ Left:srcParam }});
|
|
13108
|
+
break;
|
|
13109
|
+
|
|
13110
|
+
case JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID:
|
|
13111
|
+
if (this.ShowSelectData && srcParam) this.ShowSelectData(srcParam);
|
|
13112
|
+
break;
|
|
13113
|
+
case JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID:
|
|
13114
|
+
var dlg=new KLineSelectRectDialog(this.DivElement);
|
|
13115
|
+
dlg.DoModal(srcParam);
|
|
13116
|
+
break;
|
|
13099
13117
|
}
|
|
13100
13118
|
}
|
|
13101
13119
|
}
|
|
@@ -59793,8 +59811,9 @@ function ChartDrawHLine()
|
|
|
59793
59811
|
|
|
59794
59812
|
this.Button=
|
|
59795
59813
|
{
|
|
59796
|
-
CloseIcon: { Text:'\ue62b', Color:'rgb(255,255,255)', Family:"iconfont", Size:16 },
|
|
59797
|
-
SettingIcon: { Text:'\ue623',Color:'rgb(255,255,255)', Family:"iconfont", Size:16 }
|
|
59814
|
+
CloseIcon: { Text:'\ue62b', Color:'rgb(255,255,255)', Family:"iconfont", Size:16, ID:JSCHART_BUTTON_ID.DRAW_PICTURE_DELETE, TooltipText:null },
|
|
59815
|
+
SettingIcon: { Text:'\ue623',Color:'rgb(255,255,255)', Family:"iconfont", Size:16, ID:JSCHART_BUTTON_ID.DRAW_PICTURE_SETTING, TooltipText:null }
|
|
59816
|
+
//修改ID, Text , TooltipText 可以外部定制按钮
|
|
59798
59817
|
}
|
|
59799
59818
|
|
|
59800
59819
|
this.AryButton=[];
|
|
@@ -59988,6 +60007,7 @@ function ChartDrawHLine()
|
|
|
59988
60007
|
this.CalculateButtonSize();
|
|
59989
60008
|
this.DrawValueText(drawPoint[0].Y, rtDraw, labInfo);
|
|
59990
60009
|
if (labInfo) this.DrawRightLab(labInfo, rtDraw);
|
|
60010
|
+
if (labInfo) this.DrawCustomHLine(labInfo, drawPoint[0].Y);
|
|
59991
60011
|
}
|
|
59992
60012
|
|
|
59993
60013
|
|
|
@@ -60127,6 +60147,53 @@ function ChartDrawHLine()
|
|
|
60127
60147
|
}
|
|
60128
60148
|
}
|
|
60129
60149
|
|
|
60150
|
+
this.DrawCustomHLine=function(labInfo, yLine)
|
|
60151
|
+
{
|
|
60152
|
+
if (!labInfo) return;
|
|
60153
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(labInfo.AryLine)) return;
|
|
60154
|
+
|
|
60155
|
+
var left=this.Frame.ChartBorder.GetLeft();
|
|
60156
|
+
var right=this.Frame.ChartBorder.GetRight();
|
|
60157
|
+
var pixelRatio=GetDevicePixelRatio();
|
|
60158
|
+
|
|
60159
|
+
var yMax=yLine, yMin=yLine;
|
|
60160
|
+
for(var i=0;i<labInfo.AryLine.length;++i)
|
|
60161
|
+
{
|
|
60162
|
+
var item=labInfo.AryLine[i];
|
|
60163
|
+
if (!IFrameSplitOperator.IsNumber(item.Value)) continue;
|
|
60164
|
+
|
|
60165
|
+
var y=this.Frame.GetYFromData(item.Value);
|
|
60166
|
+
var yFixed=ToFixedPoint(y);
|
|
60167
|
+
var xRight=right;
|
|
60168
|
+
if (IFrameSplitOperator.IsNumber(item.Width)) xRight=left+item.Width*pixelRatio;
|
|
60169
|
+
if (item.Color) this.Canvas.strokeStyle=item.Color;
|
|
60170
|
+
else this.Canvas.strokeStyle=this.LineColor;
|
|
60171
|
+
|
|
60172
|
+
this.Canvas.beginPath();
|
|
60173
|
+
this.Canvas.moveTo(left,yFixed);
|
|
60174
|
+
this.Canvas.lineTo(xRight,yFixed);
|
|
60175
|
+
this.Canvas.stroke();
|
|
60176
|
+
|
|
60177
|
+
if (yMax<yFixed) yMax=yFixed;
|
|
60178
|
+
if (yMin>yFixed) yMin=yFixed;
|
|
60179
|
+
}
|
|
60180
|
+
|
|
60181
|
+
if (yMax!=yMin && labInfo.VLine)
|
|
60182
|
+
{
|
|
60183
|
+
var item=labInfo.VLine;
|
|
60184
|
+
var x=left+20*pixelRatio;
|
|
60185
|
+
if (IFrameSplitOperator.IsNumber(item.XOffset)) x=left+item.XOffset*pixelRatio;
|
|
60186
|
+
x=ToFixedPoint(x);
|
|
60187
|
+
if (item.Color) this.Canvas.strokeStyle=item.Color;
|
|
60188
|
+
else this.Canvas.strokeStyle=this.LineColor;
|
|
60189
|
+
|
|
60190
|
+
this.Canvas.beginPath();
|
|
60191
|
+
this.Canvas.moveTo(x,yMax);
|
|
60192
|
+
this.Canvas.lineTo(x,yMin);
|
|
60193
|
+
this.Canvas.stroke();
|
|
60194
|
+
}
|
|
60195
|
+
}
|
|
60196
|
+
|
|
60130
60197
|
this.DrawValueText=function(y, rtDraw, labInfo)
|
|
60131
60198
|
{
|
|
60132
60199
|
var left=this.Frame.ChartBorder.GetLeft();
|
|
@@ -60271,7 +60338,7 @@ function ChartDrawHLine()
|
|
|
60271
60338
|
this.Canvas.fillStyle=icon.Color;
|
|
60272
60339
|
this.Canvas.fillText(this.Button.SettingIcon.Text,xCenter,yCenter);
|
|
60273
60340
|
|
|
60274
|
-
this.AryButton.push({Rect:rtButton, ID:
|
|
60341
|
+
this.AryButton.push({Rect:rtButton, ID:icon.ID, TooltipText:icon.TooltipText});
|
|
60275
60342
|
|
|
60276
60343
|
/*
|
|
60277
60344
|
if (this.ColseButtonSize>0)
|
|
@@ -60303,7 +60370,7 @@ function ChartDrawHLine()
|
|
|
60303
60370
|
this.Canvas.fillStyle=icon.Color;
|
|
60304
60371
|
this.Canvas.fillText(this.Button.CloseIcon.Text,xCenter,yCenter);
|
|
60305
60372
|
|
|
60306
|
-
this.AryButton.push({Rect:rtButton,ID:
|
|
60373
|
+
this.AryButton.push({Rect:rtButton,ID:icon.ID, TooltipText:icon.TooltipText });
|
|
60307
60374
|
|
|
60308
60375
|
left=rtButton.Right;
|
|
60309
60376
|
}
|
|
@@ -72303,10 +72370,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72303
72370
|
isShowMenu=data.IsShowMenu;
|
|
72304
72371
|
}
|
|
72305
72372
|
|
|
72306
|
-
|
|
72307
|
-
if (isShowMenu && this.SelectRectRightMenu)
|
|
72373
|
+
if (isShowMenu)
|
|
72308
72374
|
{
|
|
72309
|
-
|
|
72375
|
+
var data=
|
|
72310
72376
|
{
|
|
72311
72377
|
Chart:this,
|
|
72312
72378
|
X:x,
|
|
@@ -72314,8 +72380,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72314
72380
|
SelectData:selectData, //区间选择的数据
|
|
72315
72381
|
RectSelectPaint:paint //区间选择背景
|
|
72316
72382
|
};
|
|
72383
|
+
e.data=data;
|
|
72317
72384
|
|
|
72318
|
-
this.
|
|
72385
|
+
this.PopupSelectRectMenuV2(data, e);
|
|
72319
72386
|
}
|
|
72320
72387
|
}
|
|
72321
72388
|
|
|
@@ -72350,7 +72417,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72350
72417
|
this.ShowSelectData=function(selectData)
|
|
72351
72418
|
{
|
|
72352
72419
|
this.HideSelectRect();
|
|
72353
|
-
if (this.SelectRectRightMenu) this.SelectRectRightMenu.Hide();
|
|
72354
72420
|
|
|
72355
72421
|
JSConsole.Chart.Log('[KLineChartContainer::ShowSelectData] selectData', selectData);
|
|
72356
72422
|
var dataOffset=selectData.Start;
|
|
@@ -72435,9 +72501,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72435
72501
|
isShowMenu=data.IsShowMenu;
|
|
72436
72502
|
}
|
|
72437
72503
|
|
|
72438
|
-
if (isShowMenu
|
|
72504
|
+
if (isShowMenu)
|
|
72439
72505
|
{
|
|
72440
|
-
|
|
72506
|
+
var data=
|
|
72441
72507
|
{
|
|
72442
72508
|
Chart:this,
|
|
72443
72509
|
X:corssCursor.LastPoint.X/pixelTatio,
|
|
@@ -72445,7 +72511,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
72445
72511
|
SelectData:selectData, //区间选择的数据
|
|
72446
72512
|
RectSelectPaint:paint //区间选择背景
|
|
72447
72513
|
};
|
|
72448
|
-
|
|
72514
|
+
e.data=data
|
|
72515
|
+
|
|
72516
|
+
this.PopupSelectRectMenuV2(data, e);
|
|
72449
72517
|
}
|
|
72450
72518
|
}
|
|
72451
72519
|
|
|
@@ -76356,22 +76424,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76356
76424
|
this.OnRightMenu=function(x,y,e)
|
|
76357
76425
|
{
|
|
76358
76426
|
var pixelTatio = GetDevicePixelRatio(); //x,y 需要乘以放大倍速
|
|
76359
|
-
|
|
76360
|
-
{
|
|
76361
|
-
|
|
76362
|
-
this.PopuRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
76363
|
-
}
|
|
76364
|
-
else if (this.RightMenu)
|
|
76365
|
-
{
|
|
76366
|
-
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
76367
|
-
e.data={ Chart:this, FrameID:frameId };
|
|
76368
|
-
this.RightMenu.DoModal(e);
|
|
76369
|
-
}
|
|
76370
|
-
|
|
76427
|
+
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
76428
|
+
this.PopupRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
76429
|
+
|
|
76371
76430
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CONTEXT_MENU);
|
|
76372
76431
|
if (event)
|
|
76373
76432
|
{
|
|
76374
|
-
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
76375
76433
|
var data={ X:x, Y:y, Event:e, FrameID:frameId };
|
|
76376
76434
|
event.Callback(event,data,this);
|
|
76377
76435
|
}
|
|
@@ -76638,7 +76696,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76638
76696
|
return aryMenu;
|
|
76639
76697
|
}
|
|
76640
76698
|
|
|
76641
|
-
this.
|
|
76699
|
+
this.PopupRightMenuV2=function(data,e)
|
|
76642
76700
|
{
|
|
76643
76701
|
if (!this.JSPopMenu) return;
|
|
76644
76702
|
var x=data.X, y=data.Y;
|
|
@@ -76649,6 +76707,20 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76649
76707
|
this.PopuMenuByRClick(menuData, x, y);
|
|
76650
76708
|
}
|
|
76651
76709
|
|
|
76710
|
+
this.PopupSelectRectMenuV2=function(data, e)
|
|
76711
|
+
{
|
|
76712
|
+
var aryMenu=
|
|
76713
|
+
[
|
|
76714
|
+
{ Name:"区间统计", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_SUMMARY_ID, Args:[e] }},
|
|
76715
|
+
{ Name:"区间放大", Data:{ ID:JSCHART_MENU_ID.CMD_SELECTED_ZOOM_ID, Args:[data.SelectData] }}
|
|
76716
|
+
];
|
|
76717
|
+
|
|
76718
|
+
var menuData={ Menu:aryMenu, Position:JSPopMenu.POSITION_ID.RIGHT_MENU_ID };
|
|
76719
|
+
menuData.ClickCallback=(data)=>{ this.OnClickRightMenu(data); }
|
|
76720
|
+
var x=data.X, y=data.Y;
|
|
76721
|
+
this.PopuMenuByRClick(menuData, x, y);
|
|
76722
|
+
}
|
|
76723
|
+
|
|
76652
76724
|
//重新加载画图工具(切换股票|周期)
|
|
76653
76725
|
this.ReloadChartDrawPicture=function()
|
|
76654
76726
|
{
|
|
@@ -80015,22 +80087,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80015
80087
|
this.OnRightMenu=function(x,y,e)
|
|
80016
80088
|
{
|
|
80017
80089
|
var pixelTatio = GetDevicePixelRatio(); //x,y 需要乘以放大倍速
|
|
80018
|
-
|
|
80019
|
-
{
|
|
80020
|
-
|
|
80021
|
-
this.PopuRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
80022
|
-
}
|
|
80023
|
-
else if (this.RightMenu)
|
|
80024
|
-
{
|
|
80025
|
-
var frameId=this.Frame.PtInFrame(x,y);
|
|
80026
|
-
e.data={ Chart:this, FrameID:frameId };
|
|
80027
|
-
this.RightMenu.DoModal(e);
|
|
80028
|
-
}
|
|
80029
|
-
|
|
80090
|
+
var frameId=this.Frame.PtInFrame(x*pixelTatio,y*pixelTatio);
|
|
80091
|
+
this.PopupRightMenuV2({X:e.offsetX, Y:e.offsetY, FrameID:frameId}, e);
|
|
80092
|
+
|
|
80030
80093
|
var event=this.GetEventCallback(JSCHART_EVENT_ID.ON_CONTEXT_MENU);
|
|
80031
80094
|
if (event)
|
|
80032
80095
|
{
|
|
80033
|
-
var frameId=this.Frame.PtInFrame(x,y);
|
|
80034
80096
|
var data={ X:x, Y:y, Event:e, FrameID:frameId };
|
|
80035
80097
|
event.Callback(event,data,this);
|
|
80036
80098
|
}
|
|
@@ -80048,6 +80110,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80048
80110
|
if (item && item.Symbol) aryOverlaySymbol.push(item.Symbol)
|
|
80049
80111
|
}
|
|
80050
80112
|
|
|
80113
|
+
var bShowDrawTool=false;
|
|
80114
|
+
if (this.GetExtendChartByClassName('DrawToolsButton')) bShowDrawTool=true; //画图工具
|
|
80115
|
+
|
|
80051
80116
|
var aryMenu=
|
|
80052
80117
|
[
|
|
80053
80118
|
{
|
|
@@ -80100,10 +80165,23 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80100
80165
|
},
|
|
80101
80166
|
{
|
|
80102
80167
|
Name:"区间选择",Data:{ ID: JSCHART_MENU_ID.CMD_ENABLE_SELECT_RECT_ID, Args:[!this.EnableSelectRect]}, Checked:this.EnableSelectRect
|
|
80168
|
+
},
|
|
80169
|
+
{
|
|
80170
|
+
Name:"其他设置",
|
|
80171
|
+
SubMenu:
|
|
80172
|
+
[
|
|
80173
|
+
{ Name:"画图工具", Data:{ ID:bShowDrawTool?JSCHART_MENU_ID.CMD_HIDE_DRAWTOOL_ID:JSCHART_MENU_ID.CMD_SHOW_DRAWTOOL_ID, Args:[]}, Checked:bShowDrawTool},
|
|
80174
|
+
]
|
|
80103
80175
|
}
|
|
80104
80176
|
|
|
80105
80177
|
];
|
|
80106
80178
|
|
|
80179
|
+
if (MARKET_SUFFIX_NAME.IsSHSZStockA(this.Symbol))
|
|
80180
|
+
{
|
|
80181
|
+
var item={ Name:"集合竞价",Data:{ ID: JSCHART_MENU_ID.CMD_SHOW_BEFORE_DATA_ID, Args:[!this.IsShowBeforeData] }, Checked:this.IsShowBeforeData };
|
|
80182
|
+
aryMenu.splice(4,0,item);
|
|
80183
|
+
}
|
|
80184
|
+
|
|
80107
80185
|
|
|
80108
80186
|
//删除菜单
|
|
80109
80187
|
for(var i=0;i<aryMenu.length;++i)
|
|
@@ -80126,7 +80204,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80126
80204
|
return aryMenu;
|
|
80127
80205
|
}
|
|
80128
80206
|
|
|
80129
|
-
this.
|
|
80207
|
+
this.PopupRightMenuV2=function(data,e)
|
|
80130
80208
|
{
|
|
80131
80209
|
if (!this.JSPopMenu) return;
|
|
80132
80210
|
var x=data.X, y=data.Y;
|
|
@@ -90053,1479 +90131,6 @@ function WaitDialog(divElement)
|
|
|
90053
90131
|
}
|
|
90054
90132
|
}
|
|
90055
90133
|
|
|
90056
|
-
//K线右键菜单类
|
|
90057
|
-
//id:"kline"
|
|
90058
|
-
function KLineRightMenu(divElement)
|
|
90059
|
-
{
|
|
90060
|
-
this.newMethod=IDivDialog; //派生
|
|
90061
|
-
this.newMethod(divElement);
|
|
90062
|
-
delete this.newMethod;
|
|
90063
|
-
|
|
90064
|
-
this.option={};
|
|
90065
|
-
|
|
90066
|
-
this.Create = function () {
|
|
90067
|
-
var _self = this;
|
|
90068
|
-
|
|
90069
|
-
this.ID=Guid();
|
|
90070
|
-
|
|
90071
|
-
_self.BindData();
|
|
90072
|
-
_self.BindEvent();
|
|
90073
|
-
}
|
|
90074
|
-
this.BindData=function(){
|
|
90075
|
-
var _self = this;
|
|
90076
|
-
|
|
90077
|
-
var id=this.DivElement.id;
|
|
90078
|
-
var $body = $("#" + id);
|
|
90079
|
-
|
|
90080
|
-
$body.find("div[id^='topMenu_']").remove();
|
|
90081
|
-
$body.find("div[id^='childMenu_']").remove();
|
|
90082
|
-
|
|
90083
|
-
var $topMenu = $("<div />");
|
|
90084
|
-
$topMenu.attr("id", "topMenu_"+_self.ID).addClass("context-menu-wrapper topmenu").hide();
|
|
90085
|
-
$body.append($topMenu);
|
|
90086
|
-
|
|
90087
|
-
var $topTable = $("<table />");
|
|
90088
|
-
$topTable.attr({ id: "topTable_" + _self.ID, cellspacing: "0", cellpadding: "0" }).addClass("context-menu");
|
|
90089
|
-
$topMenu.append($topTable);
|
|
90090
|
-
|
|
90091
|
-
$topTable.append(_self.childrenList(_self.option.data));
|
|
90092
|
-
|
|
90093
|
-
for (var i = 0; i < _self.option.data.length; i++) {
|
|
90094
|
-
var isHasChildren = typeof _self.option.data[i].children != "undefined";
|
|
90095
|
-
|
|
90096
|
-
if (isHasChildren) {
|
|
90097
|
-
|
|
90098
|
-
var $childMenu = $("<div />");
|
|
90099
|
-
$childMenu.attr({ id: "childMenu_"+_self.ID + i, "data-index": i }).addClass("context-menu-wrapper").hide();
|
|
90100
|
-
$body.append($childMenu);
|
|
90101
|
-
|
|
90102
|
-
var $childTable = $("<table />");
|
|
90103
|
-
$childTable.attr({ id: "childTable_" + _self.ID + i, cellspacing: "0", cellpadding: "0" }).addClass("context-menu");
|
|
90104
|
-
$childMenu.append($childTable);
|
|
90105
|
-
|
|
90106
|
-
$childTable.append(_self.childrenList(_self.option.data[i].children));
|
|
90107
|
-
}
|
|
90108
|
-
}
|
|
90109
|
-
}
|
|
90110
|
-
|
|
90111
|
-
this.Update=function()
|
|
90112
|
-
{
|
|
90113
|
-
var _self = this;
|
|
90114
|
-
//var id=this.DivElement.id;
|
|
90115
|
-
//var $body=$("#"+id);
|
|
90116
|
-
//
|
|
90117
|
-
//var $topTable = $("#topTable_" + _self.ID);
|
|
90118
|
-
//$topTable.empty();
|
|
90119
|
-
//$topTable.append(_self.childrenList(_self.option.data));
|
|
90120
|
-
//
|
|
90121
|
-
//for (var i = 0; i < _self.option.data.length; i++) {
|
|
90122
|
-
// var isHasChildren = typeof _self.option.data[i].children != "undefined";
|
|
90123
|
-
//
|
|
90124
|
-
// if (isHasChildren) {
|
|
90125
|
-
// var $childTable = $("#childTable_" + _self.ID + i);
|
|
90126
|
-
// $childTable.empty();
|
|
90127
|
-
// $childTable.append(_self.childrenList(_self.option.data[i].children));
|
|
90128
|
-
// }
|
|
90129
|
-
//}
|
|
90130
|
-
|
|
90131
|
-
_self.BindData();
|
|
90132
|
-
_self.BindEvent();
|
|
90133
|
-
}
|
|
90134
|
-
|
|
90135
|
-
this.childrenList = function(list) {
|
|
90136
|
-
var result = [];
|
|
90137
|
-
|
|
90138
|
-
for (var i = 0; i < list.length; i++) {
|
|
90139
|
-
var isBorder = typeof list[i].isBorder != "undefined" && list[i].isBorder;
|
|
90140
|
-
|
|
90141
|
-
var $tr = $("<tr />");
|
|
90142
|
-
$tr.addClass("font_Arial context-menu");
|
|
90143
|
-
if (isBorder)
|
|
90144
|
-
$tr.addClass("border");
|
|
90145
|
-
|
|
90146
|
-
var $td1 = $("<td />");
|
|
90147
|
-
if(list[i].selected){
|
|
90148
|
-
$td1.addClass("spacer context-menu").html("√");
|
|
90149
|
-
}else{
|
|
90150
|
-
$td1.addClass("spacer context-menu");
|
|
90151
|
-
}
|
|
90152
|
-
|
|
90153
|
-
var $td2 = $("<td />");
|
|
90154
|
-
$td2.addClass("text").html(list[i].text);
|
|
90155
|
-
|
|
90156
|
-
var $td3 = $("<td />");
|
|
90157
|
-
$td3.addClass("right shortcut");
|
|
90158
|
-
|
|
90159
|
-
var $td4 = $("<td />");
|
|
90160
|
-
$td4.addClass(typeof list[i].children != "undefined" ? "submenu-arrow" : "context-menu spacer");
|
|
90161
|
-
|
|
90162
|
-
$tr.append($td1).append($td2).append($td3).append($td4);
|
|
90163
|
-
|
|
90164
|
-
result.push($tr);
|
|
90165
|
-
}
|
|
90166
|
-
return result;
|
|
90167
|
-
}
|
|
90168
|
-
|
|
90169
|
-
this.Show=function (obj) {
|
|
90170
|
-
var _self = this;
|
|
90171
|
-
$.extend(_self.option, obj);
|
|
90172
|
-
|
|
90173
|
-
if (!_self.ID) _self.Create(); //判断是否重复创建
|
|
90174
|
-
else _self.Update(); //更新菜单状态
|
|
90175
|
-
|
|
90176
|
-
var $topMenu = $("#topMenu_"+_self.ID),
|
|
90177
|
-
topWidth = $topMenu.outerWidth(),
|
|
90178
|
-
topHeight = $topMenu.outerHeight();
|
|
90179
|
-
|
|
90180
|
-
var x = _self.option.x,
|
|
90181
|
-
y = _self.option.y;
|
|
90182
|
-
|
|
90183
|
-
if (topWidth > _self.option.position.X + _self.option.position.W- x) //超过了右边距
|
|
90184
|
-
x = x - topWidth;
|
|
90185
|
-
|
|
90186
|
-
if (topHeight > _self.option.position.Y +_self.option.position.H - y)//超过了下边距
|
|
90187
|
-
y = y - topHeight;
|
|
90188
|
-
|
|
90189
|
-
$topMenu.hide();
|
|
90190
|
-
$topMenu.css({ position:"absolute",left: x + "px", top: y + "px" }).show();
|
|
90191
|
-
|
|
90192
|
-
this.isInit = true;
|
|
90193
|
-
}
|
|
90194
|
-
|
|
90195
|
-
this.Hide=function () {
|
|
90196
|
-
var _self = this;
|
|
90197
|
-
if (typeof($)=="undefined") return;
|
|
90198
|
-
$("#topMenu_" + _self.ID).hide();
|
|
90199
|
-
$("[id^='childMenu_" + _self.ID + "']").hide();
|
|
90200
|
-
}
|
|
90201
|
-
|
|
90202
|
-
this.BindEvent=function () {
|
|
90203
|
-
var _self = this;
|
|
90204
|
-
var $childMenu = $("[id^='childMenu_" + _self.ID + "']");
|
|
90205
|
-
|
|
90206
|
-
$("#topTable_" + _self.ID).find("tr").mouseenter(function () {
|
|
90207
|
-
var $this = $(this),
|
|
90208
|
-
index = $this.index(),
|
|
90209
|
-
$topMenu = $("#topMenu_" + _self.ID),
|
|
90210
|
-
$child = $("#childMenu_" + _self.ID + index),
|
|
90211
|
-
trWidth = $this.outerWidth(),
|
|
90212
|
-
trHeight = $this.outerHeight();
|
|
90213
|
-
|
|
90214
|
-
var left = $topMenu.position().left + trWidth + 1;
|
|
90215
|
-
var top = $topMenu.position().top + (trHeight * index);
|
|
90216
|
-
|
|
90217
|
-
if (trWidth > _self.option.position.X + _self.option.position.W - left) //超过了右边距
|
|
90218
|
-
left = left - trWidth - $topMenu.outerWidth() - 2;
|
|
90219
|
-
|
|
90220
|
-
if ($child.outerHeight() > _self.option.position.Y +_self.option.position.H - top)//超过了下边距
|
|
90221
|
-
top = $topMenu.position().top + $topMenu.outerHeight() - $child.outerHeight();
|
|
90222
|
-
|
|
90223
|
-
$childMenu.hide();
|
|
90224
|
-
$child.css({ left: left + "px", top: top + "px" }).show();
|
|
90225
|
-
}).mouseleave(function () {
|
|
90226
|
-
var index = $(this).index();
|
|
90227
|
-
setTimeout(function () {
|
|
90228
|
-
if ($("#childMenu_" + _self.ID + index).attr("data-isShow") != 1) {
|
|
90229
|
-
$("#childMenu_" + _self.ID + index).hide();
|
|
90230
|
-
}
|
|
90231
|
-
}, 10)
|
|
90232
|
-
|
|
90233
|
-
}).click(function () {
|
|
90234
|
-
var $this = $(this);
|
|
90235
|
-
var index = $this.index();
|
|
90236
|
-
|
|
90237
|
-
if ($.type(_self.option.data[index].click) == "function") {
|
|
90238
|
-
_self.option.data[index].click(_self.option.returnData);
|
|
90239
|
-
$this.hide();
|
|
90240
|
-
}
|
|
90241
|
-
}).contextmenu(function()
|
|
90242
|
-
{
|
|
90243
|
-
return false; //屏蔽系统右键菜单
|
|
90244
|
-
});
|
|
90245
|
-
|
|
90246
|
-
|
|
90247
|
-
$childMenu.mouseenter(function () {
|
|
90248
|
-
$(this).attr("data-isShow", "1");
|
|
90249
|
-
}).mouseleave(function () {
|
|
90250
|
-
$(this).attr("data-isShow", "0");
|
|
90251
|
-
}).contextmenu(function()
|
|
90252
|
-
{
|
|
90253
|
-
return false; //屏蔽系统右键菜单
|
|
90254
|
-
});
|
|
90255
|
-
|
|
90256
|
-
$childMenu.find("tr").click(function () {
|
|
90257
|
-
var $this = $(this);
|
|
90258
|
-
var divIndex = parseInt($this.closest("div").attr("data-index"));
|
|
90259
|
-
var trIndex = $this.index();
|
|
90260
|
-
|
|
90261
|
-
if ($.type(_self.option.data[divIndex].children[trIndex].click) == "function") {
|
|
90262
|
-
_self.option.data[divIndex].children[trIndex].click(_self.option.windowIndex || 1);
|
|
90263
|
-
$childMenu.hide();
|
|
90264
|
-
}
|
|
90265
|
-
});
|
|
90266
|
-
}
|
|
90267
|
-
|
|
90268
|
-
this.GetPeriod=function (chart)
|
|
90269
|
-
{
|
|
90270
|
-
var data=
|
|
90271
|
-
[
|
|
90272
|
-
{
|
|
90273
|
-
text: "日线", Value:0,
|
|
90274
|
-
click: function () { chart.ChangePeriod(0); }
|
|
90275
|
-
},
|
|
90276
|
-
{
|
|
90277
|
-
text: "周线",Value:1,
|
|
90278
|
-
click: function () { chart.ChangePeriod(1); }
|
|
90279
|
-
},
|
|
90280
|
-
{
|
|
90281
|
-
text: "双周线",Value:21,
|
|
90282
|
-
click: function () { chart.ChangePeriod(21); }
|
|
90283
|
-
},
|
|
90284
|
-
{
|
|
90285
|
-
text: "月线",Value:2,
|
|
90286
|
-
click: function () { chart.ChangePeriod(2); }
|
|
90287
|
-
},
|
|
90288
|
-
{
|
|
90289
|
-
text: "季线",Value:9,
|
|
90290
|
-
click: function () { chart.ChangePeriod(9); }
|
|
90291
|
-
},
|
|
90292
|
-
{
|
|
90293
|
-
text: "半年",Value:22,
|
|
90294
|
-
click: function () { chart.ChangePeriod(22); }
|
|
90295
|
-
},
|
|
90296
|
-
{
|
|
90297
|
-
text: "年线",Value:3,
|
|
90298
|
-
click: function () { chart.ChangePeriod(3); }
|
|
90299
|
-
},
|
|
90300
|
-
{
|
|
90301
|
-
text: "1分",Value:4,
|
|
90302
|
-
click: function () { chart.ChangePeriod(4); }
|
|
90303
|
-
},
|
|
90304
|
-
{
|
|
90305
|
-
text: "5分",Value:5,
|
|
90306
|
-
click: function () { chart.ChangePeriod(5); }
|
|
90307
|
-
},
|
|
90308
|
-
{
|
|
90309
|
-
text: "15分",Value:6,
|
|
90310
|
-
click: function () { chart.ChangePeriod(6); }
|
|
90311
|
-
},
|
|
90312
|
-
{
|
|
90313
|
-
text: "30分",Value:7,
|
|
90314
|
-
click: function () { chart.ChangePeriod(7); }
|
|
90315
|
-
},
|
|
90316
|
-
{
|
|
90317
|
-
text: "60分",Value:8,
|
|
90318
|
-
click: function () { chart.ChangePeriod(8); }
|
|
90319
|
-
},
|
|
90320
|
-
{
|
|
90321
|
-
text: "2小时",Value:11,
|
|
90322
|
-
click: function () { chart.ChangePeriod(11); }
|
|
90323
|
-
},
|
|
90324
|
-
{
|
|
90325
|
-
text: "4小时",Value:12,
|
|
90326
|
-
click: function () { chart.ChangePeriod(12); }
|
|
90327
|
-
},
|
|
90328
|
-
{
|
|
90329
|
-
text: "分笔",Value:10,
|
|
90330
|
-
click: function () { chart.ChangePeriod(10); }
|
|
90331
|
-
},
|
|
90332
|
-
{
|
|
90333
|
-
text: "自定义周期:3分钟",Value:20003,
|
|
90334
|
-
click: function () { chart.ChangePeriod(20003); }
|
|
90335
|
-
},
|
|
90336
|
-
{
|
|
90337
|
-
text: "自定义周期:35分钟",Value:20035,
|
|
90338
|
-
click: function () { chart.ChangePeriod(20035); }
|
|
90339
|
-
},
|
|
90340
|
-
{
|
|
90341
|
-
text: "自定义周期:8日",Value:40008,
|
|
90342
|
-
click: function () { chart.ChangePeriod(40008); }
|
|
90343
|
-
}
|
|
90344
|
-
];
|
|
90345
|
-
|
|
90346
|
-
for(var i in data)
|
|
90347
|
-
{
|
|
90348
|
-
var item=data[i];
|
|
90349
|
-
if (item.Value==chart.Period)
|
|
90350
|
-
{
|
|
90351
|
-
item.selected=true;
|
|
90352
|
-
break;
|
|
90353
|
-
}
|
|
90354
|
-
}
|
|
90355
|
-
|
|
90356
|
-
return data;
|
|
90357
|
-
}
|
|
90358
|
-
|
|
90359
|
-
this.GetRight=function(chart)
|
|
90360
|
-
{
|
|
90361
|
-
var data=
|
|
90362
|
-
[
|
|
90363
|
-
{
|
|
90364
|
-
text: "不复权",
|
|
90365
|
-
click: function () { chart.ChangeRight(0); }
|
|
90366
|
-
},
|
|
90367
|
-
{
|
|
90368
|
-
text: "前复权",
|
|
90369
|
-
click: function () { chart.ChangeRight(1); }
|
|
90370
|
-
},
|
|
90371
|
-
{
|
|
90372
|
-
text: "后复权",
|
|
90373
|
-
click: function () { chart.ChangeRight(2); }
|
|
90374
|
-
}
|
|
90375
|
-
];
|
|
90376
|
-
|
|
90377
|
-
if (chart.Right>=0 && chart.Right<data.length) data[chart.Right].selected=true;
|
|
90378
|
-
|
|
90379
|
-
return data;
|
|
90380
|
-
}
|
|
90381
|
-
|
|
90382
|
-
//指标
|
|
90383
|
-
this.GetIndex=function (chart)
|
|
90384
|
-
{
|
|
90385
|
-
return [{
|
|
90386
|
-
text: "均线",
|
|
90387
|
-
click: function (windowIndex) {
|
|
90388
|
-
chart.ChangeIndex(windowIndex, '均线')
|
|
90389
|
-
}
|
|
90390
|
-
}, {
|
|
90391
|
-
text: "BOLL",
|
|
90392
|
-
click: function (windowIndex) {
|
|
90393
|
-
chart.ChangeIndex(windowIndex, 'BOLL')
|
|
90394
|
-
},
|
|
90395
|
-
isBorder:true
|
|
90396
|
-
}, {
|
|
90397
|
-
text: "MACD",
|
|
90398
|
-
click: function (windowIndex) {
|
|
90399
|
-
chart.ChangeIndex(windowIndex, 'MACD')
|
|
90400
|
-
}
|
|
90401
|
-
}, {
|
|
90402
|
-
text: "KDJ",
|
|
90403
|
-
click: function (windowIndex) {
|
|
90404
|
-
chart.ChangeIndex(windowIndex, 'KDJ')
|
|
90405
|
-
}
|
|
90406
|
-
}, {
|
|
90407
|
-
text: "VOL",
|
|
90408
|
-
click: function (windowIndex) {
|
|
90409
|
-
chart.ChangeIndex(windowIndex, 'VOL')
|
|
90410
|
-
}
|
|
90411
|
-
}, {
|
|
90412
|
-
text: "RSI",
|
|
90413
|
-
click: function (windowIndex) {
|
|
90414
|
-
chart.ChangeIndex(windowIndex, 'RSI')
|
|
90415
|
-
}
|
|
90416
|
-
}, {
|
|
90417
|
-
text: "BRAR",
|
|
90418
|
-
click: function (windowIndex) {
|
|
90419
|
-
chart.ChangeIndex(windowIndex, 'BRAR')
|
|
90420
|
-
}
|
|
90421
|
-
}, {
|
|
90422
|
-
text: "WR",
|
|
90423
|
-
click: function (windowIndex) {
|
|
90424
|
-
chart.ChangeIndex(windowIndex, 'WR')
|
|
90425
|
-
}
|
|
90426
|
-
}, {
|
|
90427
|
-
text: "BIAS",
|
|
90428
|
-
click: function (windowIndex) {
|
|
90429
|
-
chart.ChangeIndex(windowIndex, 'BIAS')
|
|
90430
|
-
}
|
|
90431
|
-
}, {
|
|
90432
|
-
text: "OBV",
|
|
90433
|
-
click: function (windowIndex) {
|
|
90434
|
-
chart.ChangeIndex(windowIndex, 'OBV')
|
|
90435
|
-
}
|
|
90436
|
-
}, {
|
|
90437
|
-
text: "DMI",
|
|
90438
|
-
click: function (windowIndex) {
|
|
90439
|
-
chart.ChangeIndex(windowIndex, 'DMI')
|
|
90440
|
-
}
|
|
90441
|
-
}, {
|
|
90442
|
-
text: "CR",
|
|
90443
|
-
click: function (windowIndex) {
|
|
90444
|
-
chart.ChangeIndex(windowIndex, 'CR')
|
|
90445
|
-
}
|
|
90446
|
-
}, {
|
|
90447
|
-
text: "PSY",
|
|
90448
|
-
click: function (windowIndex) {
|
|
90449
|
-
chart.ChangeIndex(windowIndex, 'PSY')
|
|
90450
|
-
}
|
|
90451
|
-
}, {
|
|
90452
|
-
text: "CCI",
|
|
90453
|
-
click: function (windowIndex) {
|
|
90454
|
-
chart.ChangeIndex(windowIndex, 'CCI')
|
|
90455
|
-
}
|
|
90456
|
-
}, {
|
|
90457
|
-
text: "DMA",
|
|
90458
|
-
click: function (windowIndex) {
|
|
90459
|
-
chart.ChangeIndex(windowIndex, 'DMA')
|
|
90460
|
-
}
|
|
90461
|
-
}, {
|
|
90462
|
-
text: "TRIX",
|
|
90463
|
-
click: function (windowIndex) {
|
|
90464
|
-
chart.ChangeIndex(windowIndex, 'TRIX')
|
|
90465
|
-
}
|
|
90466
|
-
}, {
|
|
90467
|
-
text: "VR",
|
|
90468
|
-
click: function (windowIndex) {
|
|
90469
|
-
chart.ChangeIndex(windowIndex, 'VR')
|
|
90470
|
-
}
|
|
90471
|
-
}, {
|
|
90472
|
-
text: "EMV",
|
|
90473
|
-
click: function (windowIndex) {
|
|
90474
|
-
chart.ChangeIndex(windowIndex, 'EMV')
|
|
90475
|
-
}
|
|
90476
|
-
}, {
|
|
90477
|
-
text: "ROC",
|
|
90478
|
-
click: function (windowIndex) {
|
|
90479
|
-
chart.ChangeIndex(windowIndex, 'ROC')
|
|
90480
|
-
}
|
|
90481
|
-
}, {
|
|
90482
|
-
text: "MIM",
|
|
90483
|
-
click: function (windowIndex) {
|
|
90484
|
-
chart.ChangeIndex(windowIndex, 'MIM')
|
|
90485
|
-
}
|
|
90486
|
-
}, {
|
|
90487
|
-
text: "FSL",
|
|
90488
|
-
click: function (windowIndex) {
|
|
90489
|
-
chart.ChangeIndex(windowIndex, 'FSL')
|
|
90490
|
-
}
|
|
90491
|
-
} ]
|
|
90492
|
-
}
|
|
90493
|
-
|
|
90494
|
-
//五彩K线
|
|
90495
|
-
this.GetColorIndex=function (chart)
|
|
90496
|
-
{
|
|
90497
|
-
var data=
|
|
90498
|
-
[
|
|
90499
|
-
{
|
|
90500
|
-
text: "十字星",
|
|
90501
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-十字星') }
|
|
90502
|
-
},
|
|
90503
|
-
{
|
|
90504
|
-
text: "早晨之星",
|
|
90505
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-早晨之星') },
|
|
90506
|
-
},
|
|
90507
|
-
{
|
|
90508
|
-
text: "垂死十字",
|
|
90509
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-垂死十字') },
|
|
90510
|
-
},
|
|
90511
|
-
{
|
|
90512
|
-
text: "三只乌鸦",
|
|
90513
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-三只乌鸦') }
|
|
90514
|
-
},
|
|
90515
|
-
{
|
|
90516
|
-
text: "光脚阴线",
|
|
90517
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-光脚阴线') }
|
|
90518
|
-
},
|
|
90519
|
-
{
|
|
90520
|
-
text: "黄昏之星",
|
|
90521
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('五彩K线-黄昏之星') }
|
|
90522
|
-
}
|
|
90523
|
-
];
|
|
90524
|
-
|
|
90525
|
-
if (chart.ColorIndex)
|
|
90526
|
-
{
|
|
90527
|
-
data[data.length-1].isBorder=true;
|
|
90528
|
-
data.push(
|
|
90529
|
-
{
|
|
90530
|
-
text: "删除五彩K线",
|
|
90531
|
-
click: function (windowIndex) { chart.CancelInstructionIndex() }
|
|
90532
|
-
});
|
|
90533
|
-
}
|
|
90534
|
-
|
|
90535
|
-
return data;
|
|
90536
|
-
}
|
|
90537
|
-
|
|
90538
|
-
//专家系统
|
|
90539
|
-
this.GetTradeIndex=function(chart)
|
|
90540
|
-
{
|
|
90541
|
-
var data=
|
|
90542
|
-
[
|
|
90543
|
-
{
|
|
90544
|
-
text: "BIAS",
|
|
90545
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-BIAS') }
|
|
90546
|
-
},
|
|
90547
|
-
{
|
|
90548
|
-
text: "CCI",
|
|
90549
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-CCI') }
|
|
90550
|
-
},
|
|
90551
|
-
{
|
|
90552
|
-
text: "DMI",
|
|
90553
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-DMI') }
|
|
90554
|
-
},
|
|
90555
|
-
{
|
|
90556
|
-
text: "KD",
|
|
90557
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-KD') }
|
|
90558
|
-
},
|
|
90559
|
-
{
|
|
90560
|
-
text: "BOLL",
|
|
90561
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-BOLL') }
|
|
90562
|
-
},
|
|
90563
|
-
{
|
|
90564
|
-
text: "KDJ",
|
|
90565
|
-
click: function (windowIndex) { chart.ChangeInstructionIndex('交易系统-KDJ') }
|
|
90566
|
-
}
|
|
90567
|
-
];
|
|
90568
|
-
|
|
90569
|
-
if (chart.TradeIndex)
|
|
90570
|
-
{
|
|
90571
|
-
data[data.length-1].isBorder=true;
|
|
90572
|
-
data.push(
|
|
90573
|
-
{
|
|
90574
|
-
text: "删除专家系统",
|
|
90575
|
-
click: function (windowIndex) { chart.CancelInstructionIndex()}
|
|
90576
|
-
});
|
|
90577
|
-
}
|
|
90578
|
-
return data;
|
|
90579
|
-
}
|
|
90580
|
-
|
|
90581
|
-
//叠加
|
|
90582
|
-
this.GetOverlay=function (chart)
|
|
90583
|
-
{
|
|
90584
|
-
var data=
|
|
90585
|
-
[
|
|
90586
|
-
{
|
|
90587
|
-
text: "上证指数",
|
|
90588
|
-
click: function () { chart.OverlaySymbol('000001.sh'); }
|
|
90589
|
-
},
|
|
90590
|
-
{
|
|
90591
|
-
text: "深证成指",
|
|
90592
|
-
click: function () { chart.OverlaySymbol('399001.sz'); }
|
|
90593
|
-
},
|
|
90594
|
-
{
|
|
90595
|
-
text: "中小板指",
|
|
90596
|
-
click: function () { chart.OverlaySymbol('399005.sz'); }
|
|
90597
|
-
},
|
|
90598
|
-
{
|
|
90599
|
-
text: "创业板指",
|
|
90600
|
-
click: function () { chart.OverlaySymbol('399006.sz'); }
|
|
90601
|
-
},
|
|
90602
|
-
{
|
|
90603
|
-
text: "沪深300",
|
|
90604
|
-
click: function () { chart.OverlaySymbol('000300.sh'); },
|
|
90605
|
-
}
|
|
90606
|
-
];
|
|
90607
|
-
|
|
90608
|
-
for(var i in chart.OverlayChartPaint)
|
|
90609
|
-
{
|
|
90610
|
-
var item=chart.OverlayChartPaint[i];
|
|
90611
|
-
var symbol=item.Symbol;
|
|
90612
|
-
const mapSymbol=new Map([['000001.sh',0],['399001.sz',1],['399005.sz',2],['399006.sz',3],['000300.sh',4]]);
|
|
90613
|
-
if (mapSymbol.has(symbol))
|
|
90614
|
-
{
|
|
90615
|
-
var menuItem=data[mapSymbol.get(symbol)];
|
|
90616
|
-
let delSymbol=symbol;
|
|
90617
|
-
menuItem.selected=true;
|
|
90618
|
-
menuItem.click=function () { chart.DeleteOverlaySymbol(delSymbol); };
|
|
90619
|
-
}
|
|
90620
|
-
}
|
|
90621
|
-
|
|
90622
|
-
if (chart.OverlayChartPaint && chart.OverlayChartPaint.length>0)
|
|
90623
|
-
{
|
|
90624
|
-
data[data.length-1].isBorder=true;
|
|
90625
|
-
data.push(
|
|
90626
|
-
{
|
|
90627
|
-
text: "取消叠加",
|
|
90628
|
-
click: function () { chart.ClearOverlaySymbol();}
|
|
90629
|
-
}
|
|
90630
|
-
);
|
|
90631
|
-
}
|
|
90632
|
-
|
|
90633
|
-
return data;
|
|
90634
|
-
}
|
|
90635
|
-
|
|
90636
|
-
//K线类型设置
|
|
90637
|
-
this.GetKLineType=function(chart)
|
|
90638
|
-
{
|
|
90639
|
-
var data=
|
|
90640
|
-
[
|
|
90641
|
-
{
|
|
90642
|
-
text: "K线(空心阳线)",
|
|
90643
|
-
click: function () { chart.ChangeKLineDrawType(3);}
|
|
90644
|
-
},
|
|
90645
|
-
{
|
|
90646
|
-
text: "K线(实心阳线)",
|
|
90647
|
-
click: function () { chart.ChangeKLineDrawType(0); }
|
|
90648
|
-
},
|
|
90649
|
-
{
|
|
90650
|
-
text: "美国线",
|
|
90651
|
-
click: function () { chart.ChangeKLineDrawType(2, true ,{ IsThinAKBar:false }); }
|
|
90652
|
-
},
|
|
90653
|
-
{
|
|
90654
|
-
text: "收盘线",
|
|
90655
|
-
click: function () { chart.ChangeKLineDrawType(1); }
|
|
90656
|
-
},
|
|
90657
|
-
{
|
|
90658
|
-
text: "收盘面积",
|
|
90659
|
-
click: function () { chart.ChangeKLineDrawType(4); }
|
|
90660
|
-
},
|
|
90661
|
-
{
|
|
90662
|
-
text: "K线(空心阳线阴线)",
|
|
90663
|
-
click: function () { chart.ChangeKLineDrawType(6);}
|
|
90664
|
-
},
|
|
90665
|
-
{
|
|
90666
|
-
text: "Heikin Ashi",
|
|
90667
|
-
click: function () { chart.ChangeKLineDrawType(11);}
|
|
90668
|
-
},
|
|
90669
|
-
{
|
|
90670
|
-
text: "Line Break",
|
|
90671
|
-
click: function () { chart.ChangeKLineDrawType(12);}
|
|
90672
|
-
},
|
|
90673
|
-
{
|
|
90674
|
-
text: "High-low",
|
|
90675
|
-
click: function () { chart.ChangeKLineDrawType(13);}
|
|
90676
|
-
},
|
|
90677
|
-
{
|
|
90678
|
-
text: "HLC Area",
|
|
90679
|
-
click: function () { chart.ChangeKLineDrawType(15);}
|
|
90680
|
-
}
|
|
90681
|
-
];
|
|
90682
|
-
|
|
90683
|
-
switch(chart.KLineDrawType)
|
|
90684
|
-
{
|
|
90685
|
-
case 0:
|
|
90686
|
-
data[1].selected=true;
|
|
90687
|
-
break;
|
|
90688
|
-
case 1:
|
|
90689
|
-
data[3].selected=true;
|
|
90690
|
-
break;
|
|
90691
|
-
case 2:
|
|
90692
|
-
data[2].selected=true;
|
|
90693
|
-
break;
|
|
90694
|
-
case 3:
|
|
90695
|
-
data[0].selected=true;
|
|
90696
|
-
break;
|
|
90697
|
-
case 4:
|
|
90698
|
-
data[4].selected=true;
|
|
90699
|
-
break;
|
|
90700
|
-
case 6:
|
|
90701
|
-
data[5].selected=true;
|
|
90702
|
-
break;
|
|
90703
|
-
case 11:
|
|
90704
|
-
data[6].selected=true;
|
|
90705
|
-
break;
|
|
90706
|
-
case 12:
|
|
90707
|
-
data[7].selected=true;
|
|
90708
|
-
break;
|
|
90709
|
-
case 13:
|
|
90710
|
-
data[8].selected=true;
|
|
90711
|
-
break;
|
|
90712
|
-
case 15:
|
|
90713
|
-
data[9].selected=true;
|
|
90714
|
-
break;
|
|
90715
|
-
}
|
|
90716
|
-
return data;
|
|
90717
|
-
}
|
|
90718
|
-
|
|
90719
|
-
//指标窗口个数
|
|
90720
|
-
this.GetIndexWindowCount=function(chart)
|
|
90721
|
-
{
|
|
90722
|
-
var data=
|
|
90723
|
-
[
|
|
90724
|
-
{
|
|
90725
|
-
text: "1个窗口",
|
|
90726
|
-
click: function () { chart.ChangeIndexWindowCount(1); }
|
|
90727
|
-
},
|
|
90728
|
-
{
|
|
90729
|
-
text: "2个窗口",
|
|
90730
|
-
click: function () { chart.ChangeIndexWindowCount(2); }
|
|
90731
|
-
},
|
|
90732
|
-
{
|
|
90733
|
-
text: "3个窗口",
|
|
90734
|
-
click: function () { chart.ChangeIndexWindowCount(3); }
|
|
90735
|
-
},
|
|
90736
|
-
{
|
|
90737
|
-
text: "4个窗口",
|
|
90738
|
-
click: function () { chart.ChangeIndexWindowCount(4); }
|
|
90739
|
-
},
|
|
90740
|
-
{
|
|
90741
|
-
text: "5个窗口",
|
|
90742
|
-
click: function () { chart.ChangeIndexWindowCount(5); }
|
|
90743
|
-
}
|
|
90744
|
-
];
|
|
90745
|
-
|
|
90746
|
-
var count=chart.Frame.SubFrame.length;
|
|
90747
|
-
if ((count-1)>=0 && (count-1)<data.length) data[count-1].selected=true; //选中
|
|
90748
|
-
|
|
90749
|
-
return data;
|
|
90750
|
-
}
|
|
90751
|
-
|
|
90752
|
-
//坐标类型
|
|
90753
|
-
this.GetCoordinateType=function(chart)
|
|
90754
|
-
{
|
|
90755
|
-
var data=
|
|
90756
|
-
[
|
|
90757
|
-
{
|
|
90758
|
-
text: "普通坐标",
|
|
90759
|
-
click: function () { chart.ChangeCoordinateType( {Type:0} ); }
|
|
90760
|
-
},
|
|
90761
|
-
{
|
|
90762
|
-
text: "百分比坐标",
|
|
90763
|
-
click: function () { chart.ChangeCoordinateType( {Type:1} ); }
|
|
90764
|
-
},
|
|
90765
|
-
{
|
|
90766
|
-
text: "反转坐标",
|
|
90767
|
-
click: function () { chart.ChangeCoordinateType( { IsReverse:true } ); }
|
|
90768
|
-
},
|
|
90769
|
-
{
|
|
90770
|
-
text: "对数坐标",
|
|
90771
|
-
click: function () { chart.ChangeCoordinateType( {Type:2} ); }
|
|
90772
|
-
},
|
|
90773
|
-
{
|
|
90774
|
-
text: "等比坐标",
|
|
90775
|
-
click: function () { chart.ChangeCoordinateType( {Type:3} ); }
|
|
90776
|
-
},
|
|
90777
|
-
{
|
|
90778
|
-
text: "等分坐标",
|
|
90779
|
-
click: function () { chart.ChangeCoordinateType( {Type:4} ); }
|
|
90780
|
-
},
|
|
90781
|
-
{
|
|
90782
|
-
text: "黄金分割",
|
|
90783
|
-
click: function () { chart.ChangeCoordinateType( {Type:5} ); }
|
|
90784
|
-
}
|
|
90785
|
-
];
|
|
90786
|
-
|
|
90787
|
-
if (chart.Frame && chart.Frame.SubFrame && chart.Frame.SubFrame.length>0)
|
|
90788
|
-
{
|
|
90789
|
-
if (chart.Frame.SubFrame[0].Frame.CoordinateType==1)
|
|
90790
|
-
{
|
|
90791
|
-
data[2].selected=true;
|
|
90792
|
-
data[2].click=function() { chart.ChangeCoordinateType( { IsReverse:false } ); } //取消反转
|
|
90793
|
-
}
|
|
90794
|
-
|
|
90795
|
-
if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==1) data[1].selected=true; //百分比
|
|
90796
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==0) data[0].selected=true; //普通坐标
|
|
90797
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==2) data[3].selected=true; //对数
|
|
90798
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==3) data[4].selected=true; //等比坐标
|
|
90799
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==4) data[5].selected=true; //等分坐标
|
|
90800
|
-
else if (chart.Frame.SubFrame[0].Frame.YSplitOperator.CoordinateType==5) data[6].selected=true; //黄金分割
|
|
90801
|
-
}
|
|
90802
|
-
|
|
90803
|
-
return data;
|
|
90804
|
-
}
|
|
90805
|
-
|
|
90806
|
-
//拖拽模式
|
|
90807
|
-
this.GetDragModeType=function(chart)
|
|
90808
|
-
{
|
|
90809
|
-
var data=
|
|
90810
|
-
[
|
|
90811
|
-
{
|
|
90812
|
-
text: "禁止拖拽",
|
|
90813
|
-
click: function () { chart.DragMode=0; }
|
|
90814
|
-
},
|
|
90815
|
-
{
|
|
90816
|
-
text: "启动拖拽",
|
|
90817
|
-
click: function () { chart.DragMode=1; }
|
|
90818
|
-
},
|
|
90819
|
-
{
|
|
90820
|
-
text: "区间选择",
|
|
90821
|
-
click: function () { chart.DragMode=2; }
|
|
90822
|
-
}
|
|
90823
|
-
];
|
|
90824
|
-
|
|
90825
|
-
if (chart.DragMode>=0 && chart.DragMode<data.length) data[chart.DragMode].selected=true; //选中
|
|
90826
|
-
|
|
90827
|
-
return data;
|
|
90828
|
-
}
|
|
90829
|
-
|
|
90830
|
-
//工具
|
|
90831
|
-
this.GetTools=function(chart)
|
|
90832
|
-
{
|
|
90833
|
-
var data=[];
|
|
90834
|
-
var drawTools=chart.GetExtendChartByClassName('DrawToolsButton');
|
|
90835
|
-
if (drawTools)
|
|
90836
|
-
{
|
|
90837
|
-
data.push(
|
|
90838
|
-
{
|
|
90839
|
-
text: "关闭画图工具",
|
|
90840
|
-
click: function ()
|
|
90841
|
-
{
|
|
90842
|
-
var toolsWidth=drawTools.Chart.Width;
|
|
90843
|
-
var toolsIndex=parseInt(drawTools.Index);
|
|
90844
|
-
for(var i=toolsIndex+1; i<chart.ExtendChartPaint.length; ++i) //在画图工具后面创建的需要减去工具的宽度
|
|
90845
|
-
{
|
|
90846
|
-
var item=chart.ExtendChartPaint[i];
|
|
90847
|
-
if (item.ClassName=='StockChip')
|
|
90848
|
-
{
|
|
90849
|
-
item.Left-=toolsWidth;
|
|
90850
|
-
}
|
|
90851
|
-
}
|
|
90852
|
-
chart.DeleteExtendChart(drawTools);
|
|
90853
|
-
chart.Frame.ChartBorder.Right-=toolsWidth;
|
|
90854
|
-
chart.SetSizeChange(true);
|
|
90855
|
-
chart.Draw();
|
|
90856
|
-
}
|
|
90857
|
-
}
|
|
90858
|
-
);
|
|
90859
|
-
}
|
|
90860
|
-
else
|
|
90861
|
-
{
|
|
90862
|
-
data.push(
|
|
90863
|
-
{
|
|
90864
|
-
text: "画图工具",
|
|
90865
|
-
click: function () {
|
|
90866
|
-
var option={Name:'画图工具', Top:chart.Frame.ChartBorder.Top };
|
|
90867
|
-
var extendChart=chart.CreateExtendChart(option.Name, option); //创建扩展图形
|
|
90868
|
-
chart.SetSizeChange(true);
|
|
90869
|
-
chart.Draw();
|
|
90870
|
-
}
|
|
90871
|
-
}
|
|
90872
|
-
);
|
|
90873
|
-
}
|
|
90874
|
-
|
|
90875
|
-
var StockChip=chart.GetExtendChartByClassName('StockChip');
|
|
90876
|
-
if (StockChip)
|
|
90877
|
-
{
|
|
90878
|
-
data.push(
|
|
90879
|
-
{
|
|
90880
|
-
text: "关闭移动筹码",
|
|
90881
|
-
click: function ()
|
|
90882
|
-
{
|
|
90883
|
-
var chipWidth=StockChip.Chart.Width;
|
|
90884
|
-
var chipIndex=parseInt(StockChip.Index);
|
|
90885
|
-
for(var i=chipIndex+1; i<chart.ExtendChartPaint.length; ++i) //在筹码后面创建的需要筹码的宽度
|
|
90886
|
-
{
|
|
90887
|
-
var item=chart.ExtendChartPaint[i];
|
|
90888
|
-
if (item.ClassName=='DrawToolsButton')
|
|
90889
|
-
{
|
|
90890
|
-
item.Left-=chipWidth;
|
|
90891
|
-
}
|
|
90892
|
-
}
|
|
90893
|
-
chart.DeleteExtendChart(StockChip);
|
|
90894
|
-
chart.Frame.ChartBorder.Right-=chipWidth;
|
|
90895
|
-
chart.SetSizeChange(true);
|
|
90896
|
-
chart.Draw();
|
|
90897
|
-
}
|
|
90898
|
-
|
|
90899
|
-
}
|
|
90900
|
-
);
|
|
90901
|
-
}
|
|
90902
|
-
else
|
|
90903
|
-
{
|
|
90904
|
-
data.push(
|
|
90905
|
-
{
|
|
90906
|
-
text: "移动筹码",
|
|
90907
|
-
click: function () {
|
|
90908
|
-
var option={Name:'筹码分布', ShowType:1, Width:230 };
|
|
90909
|
-
var extendChart=chart.CreateExtendChart(option.Name, option); //创建扩展图形
|
|
90910
|
-
chart.SetSizeChange(true);
|
|
90911
|
-
chart.Draw();
|
|
90912
|
-
}
|
|
90913
|
-
}
|
|
90914
|
-
);
|
|
90915
|
-
}
|
|
90916
|
-
|
|
90917
|
-
return data;
|
|
90918
|
-
}
|
|
90919
|
-
|
|
90920
|
-
//缺口提示
|
|
90921
|
-
this.GetPriceGap=function(chart)
|
|
90922
|
-
{
|
|
90923
|
-
var klineChart=chart.ChartPaint[0];
|
|
90924
|
-
var priceGap=klineChart.PriceGap;
|
|
90925
|
-
var data=
|
|
90926
|
-
[
|
|
90927
|
-
{
|
|
90928
|
-
text: "显示1个缺口",
|
|
90929
|
-
click: function () { chart.ChangePriceGap({ Enable:true, Count:1 }); }
|
|
90930
|
-
},
|
|
90931
|
-
{
|
|
90932
|
-
text: "显示2个缺口",
|
|
90933
|
-
click: function () { chart.ChangePriceGap({ Enable:true, Count:2 }); }
|
|
90934
|
-
},
|
|
90935
|
-
{
|
|
90936
|
-
text: "显示3个缺口",
|
|
90937
|
-
click: function () { chart.ChangePriceGap({ Enable:true, Count:3 }); }
|
|
90938
|
-
},
|
|
90939
|
-
{
|
|
90940
|
-
text: "隐藏缺口",
|
|
90941
|
-
click: function () { chart.ChangePriceGap({ Enable:false }); }
|
|
90942
|
-
}
|
|
90943
|
-
];
|
|
90944
|
-
|
|
90945
|
-
if (!priceGap.Enable || priceGap.Count<=0)
|
|
90946
|
-
{
|
|
90947
|
-
data[data.length-1].selected=true; //选中
|
|
90948
|
-
}
|
|
90949
|
-
else if (priceGap.Enable && priceGap.Count>0)
|
|
90950
|
-
{
|
|
90951
|
-
var index=priceGap.Count-1;
|
|
90952
|
-
if (index>data.length-2) index=data.length-2;
|
|
90953
|
-
data[index].selected=true; //选中
|
|
90954
|
-
}
|
|
90955
|
-
|
|
90956
|
-
return data;
|
|
90957
|
-
}
|
|
90958
|
-
|
|
90959
|
-
this.GetBGSplit=function(chart)
|
|
90960
|
-
{
|
|
90961
|
-
var data=
|
|
90962
|
-
[
|
|
90963
|
-
{
|
|
90964
|
-
text: "启用",
|
|
90965
|
-
click: function ()
|
|
90966
|
-
{
|
|
90967
|
-
chart.CreateExtendChart("SessionBreaksPaint", { });
|
|
90968
|
-
chart.Draw();
|
|
90969
|
-
}
|
|
90970
|
-
},
|
|
90971
|
-
{
|
|
90972
|
-
text: "关闭",
|
|
90973
|
-
click: function ()
|
|
90974
|
-
{
|
|
90975
|
-
var finder=chart.GetExtendChartByClassName("SessionBreaksPaint");
|
|
90976
|
-
if (finder)
|
|
90977
|
-
{
|
|
90978
|
-
chart.DeleteExtendChartByID(finder.Chart.ID);
|
|
90979
|
-
chart.Draw();
|
|
90980
|
-
}
|
|
90981
|
-
}
|
|
90982
|
-
},
|
|
90983
|
-
];
|
|
90984
|
-
|
|
90985
|
-
var finder=chart.GetExtendChartByClassName("SessionBreaksPaint");
|
|
90986
|
-
if (finder) data[0].selected=true;
|
|
90987
|
-
else data[1].selected=true;
|
|
90988
|
-
|
|
90989
|
-
return data;
|
|
90990
|
-
}
|
|
90991
|
-
|
|
90992
|
-
|
|
90993
|
-
this.GetKLineInfo=function(chart)
|
|
90994
|
-
{
|
|
90995
|
-
var setInfo=new Set();
|
|
90996
|
-
for(var i in chart.ChartInfo)
|
|
90997
|
-
{
|
|
90998
|
-
var item=chart.ChartInfo[i];
|
|
90999
|
-
setInfo.add(item.ClassName);
|
|
91000
|
-
}
|
|
91001
|
-
|
|
91002
|
-
var aryKLineInfo=["公告","业绩预告","调研","大宗交易","龙虎榜","互动易"]
|
|
91003
|
-
|
|
91004
|
-
var data=[];
|
|
91005
|
-
for(var i in aryKLineInfo)
|
|
91006
|
-
{
|
|
91007
|
-
var infoName=aryKLineInfo[i];
|
|
91008
|
-
var classInfo=JSKLineInfoMap.GetClassInfo(infoName);
|
|
91009
|
-
if (!classInfo) continue;
|
|
91010
|
-
|
|
91011
|
-
var item=this.CreateKlineInfoItem(infoName, setInfo.has(classInfo.ClassName), chart);
|
|
91012
|
-
data.push(item);
|
|
91013
|
-
}
|
|
91014
|
-
|
|
91015
|
-
if (chart.ChartInfo.length>0)
|
|
91016
|
-
{
|
|
91017
|
-
data[data.length-1].isBorder=true;
|
|
91018
|
-
var item={ text:'删除所有', click:function() { chart.ClearKLineInfo()} };
|
|
91019
|
-
data.push(item);
|
|
91020
|
-
|
|
91021
|
-
}
|
|
91022
|
-
|
|
91023
|
-
return data;
|
|
91024
|
-
}
|
|
91025
|
-
|
|
91026
|
-
this.CreateKlineInfoItem=function(infoName,bExist,chart)
|
|
91027
|
-
{
|
|
91028
|
-
var item=
|
|
91029
|
-
{
|
|
91030
|
-
text:infoName,
|
|
91031
|
-
selected:bExist
|
|
91032
|
-
}
|
|
91033
|
-
|
|
91034
|
-
if (bExist) item.click=function() { chart.DeleteKLineInfo(infoName) };
|
|
91035
|
-
else item.click=function() { chart.AddKLineInfo(infoName,true) }
|
|
91036
|
-
|
|
91037
|
-
return item;
|
|
91038
|
-
}
|
|
91039
|
-
|
|
91040
|
-
this.DoModal=function(event)
|
|
91041
|
-
{
|
|
91042
|
-
var chart=event.data.Chart;
|
|
91043
|
-
var rightMenu=chart.RightMenu;
|
|
91044
|
-
var x = event.offsetX;
|
|
91045
|
-
var y = event.offsetY;
|
|
91046
|
-
|
|
91047
|
-
var dataList=[{
|
|
91048
|
-
text: "分析周期",
|
|
91049
|
-
children: this.GetPeriod(chart)
|
|
91050
|
-
},
|
|
91051
|
-
{
|
|
91052
|
-
text: "复权处理",
|
|
91053
|
-
children: this.GetRight(chart)
|
|
91054
|
-
},
|
|
91055
|
-
{
|
|
91056
|
-
text: "指标切换",
|
|
91057
|
-
children: this.GetIndex(chart)
|
|
91058
|
-
},
|
|
91059
|
-
{
|
|
91060
|
-
text:"五彩K线",
|
|
91061
|
-
children: this.GetColorIndex(chart)
|
|
91062
|
-
},
|
|
91063
|
-
{
|
|
91064
|
-
text:'专家系统',
|
|
91065
|
-
children: this.GetTradeIndex(chart)
|
|
91066
|
-
},
|
|
91067
|
-
{
|
|
91068
|
-
text:'信息地雷',
|
|
91069
|
-
children: this.GetKLineInfo(chart)
|
|
91070
|
-
},
|
|
91071
|
-
{
|
|
91072
|
-
text:'缺口提示',
|
|
91073
|
-
children: this.GetPriceGap(chart)
|
|
91074
|
-
},
|
|
91075
|
-
{
|
|
91076
|
-
text: "叠加品种",
|
|
91077
|
-
children: this.GetOverlay(chart)
|
|
91078
|
-
},
|
|
91079
|
-
{
|
|
91080
|
-
text:'主图线型',
|
|
91081
|
-
children: this.GetKLineType(chart)
|
|
91082
|
-
},
|
|
91083
|
-
{
|
|
91084
|
-
text:"坐标类型",
|
|
91085
|
-
children:this.GetCoordinateType(chart)
|
|
91086
|
-
},
|
|
91087
|
-
{
|
|
91088
|
-
text:'指标窗口个数',
|
|
91089
|
-
children: this.GetIndexWindowCount(chart)
|
|
91090
|
-
},
|
|
91091
|
-
{
|
|
91092
|
-
text:'鼠标拖拽',
|
|
91093
|
-
children: this.GetDragModeType(chart)
|
|
91094
|
-
},
|
|
91095
|
-
{
|
|
91096
|
-
text:"工具",
|
|
91097
|
-
children:this.GetTools(chart)
|
|
91098
|
-
},
|
|
91099
|
-
{
|
|
91100
|
-
text:"背景分割",
|
|
91101
|
-
children:this.GetBGSplit(chart)
|
|
91102
|
-
}
|
|
91103
|
-
];
|
|
91104
|
-
|
|
91105
|
-
var upperSymbol=chart.Symbol.toUpperCase();
|
|
91106
|
-
if(MARKET_SUFFIX_NAME.IsSHSZIndex(chart.Symbol) || MARKET_SUFFIX_NAME.IsBIT(upperSymbol))
|
|
91107
|
-
{
|
|
91108
|
-
dataList.splice(1,1);
|
|
91109
|
-
}
|
|
91110
|
-
|
|
91111
|
-
var identify=event.data.FrameID;
|
|
91112
|
-
var overlayIndex=this.GetOverlayIndex(chart,identify);
|
|
91113
|
-
if (overlayIndex && overlayIndex.length>0)
|
|
91114
|
-
{
|
|
91115
|
-
var delOverlayIndexMenu={ text:'删除叠加指标', children:this.GetDeleteOverlayIndex(chart,overlayIndex) }
|
|
91116
|
-
dataList.splice(3,0,delOverlayIndexMenu);
|
|
91117
|
-
}
|
|
91118
|
-
|
|
91119
|
-
JSConsole.Chart.Log('[KLineRightMenu::DoModal]',identify);
|
|
91120
|
-
rightMenu.Show({
|
|
91121
|
-
windowIndex :identify,
|
|
91122
|
-
x:x+chart.UIElement.offsetLeft,
|
|
91123
|
-
y:y+chart.UIElement.offsetTop,
|
|
91124
|
-
position:chart.Frame.Position,
|
|
91125
|
-
data:dataList
|
|
91126
|
-
})
|
|
91127
|
-
|
|
91128
|
-
$(document).click(function () {
|
|
91129
|
-
rightMenu.Hide();
|
|
91130
|
-
});
|
|
91131
|
-
}
|
|
91132
|
-
|
|
91133
|
-
this.GetOverlayIndex=function(chart, windowsIndex)
|
|
91134
|
-
{
|
|
91135
|
-
if (windowsIndex>=chart.Frame.SubFrame.length || windowsIndex<0) return [];
|
|
91136
|
-
|
|
91137
|
-
var result=[];
|
|
91138
|
-
var item=chart.Frame.SubFrame[windowsIndex];
|
|
91139
|
-
for(var i in item.OverlayIndex)
|
|
91140
|
-
{
|
|
91141
|
-
var overlayItem=item.OverlayIndex[i];
|
|
91142
|
-
result.push({Name:overlayItem.Script.Name, Identify:overlayItem.Identify});
|
|
91143
|
-
}
|
|
91144
|
-
|
|
91145
|
-
return result;
|
|
91146
|
-
}
|
|
91147
|
-
|
|
91148
|
-
this.GetDeleteOverlayIndex=function(chart,overlayIndex)
|
|
91149
|
-
{
|
|
91150
|
-
var data=[];
|
|
91151
|
-
for(var i in overlayIndex)
|
|
91152
|
-
{
|
|
91153
|
-
let identify=overlayIndex[i].Identify;
|
|
91154
|
-
data.push({text:overlayIndex[i].Name, click:function()
|
|
91155
|
-
{
|
|
91156
|
-
chart.DeleteOverlayWindowsIndex(identify)
|
|
91157
|
-
}});
|
|
91158
|
-
}
|
|
91159
|
-
|
|
91160
|
-
return data;
|
|
91161
|
-
}
|
|
91162
|
-
}
|
|
91163
|
-
|
|
91164
|
-
//K线区间选择右键菜单
|
|
91165
|
-
function KLineSelectRightMenu(divElement)
|
|
91166
|
-
{
|
|
91167
|
-
this.newMethod=KLineRightMenu; //派生
|
|
91168
|
-
this.newMethod(divElement);
|
|
91169
|
-
delete this.newMethod;
|
|
91170
|
-
|
|
91171
|
-
this.DoModal=function(event)
|
|
91172
|
-
{
|
|
91173
|
-
var chart=event.data.Chart;
|
|
91174
|
-
var rightMenu=this;
|
|
91175
|
-
var x = event.data.X;
|
|
91176
|
-
var y = event.data.Y;
|
|
91177
|
-
|
|
91178
|
-
var dataList=
|
|
91179
|
-
[
|
|
91180
|
-
{
|
|
91181
|
-
text: "区间统计",
|
|
91182
|
-
click: function ()
|
|
91183
|
-
{
|
|
91184
|
-
JSConsole.Chart.Log('[KLineSelectRightMenu::click] 区间统计');
|
|
91185
|
-
rightMenu.Hide();
|
|
91186
|
-
var dialog=new KLineSelectRectDialog(divElement);
|
|
91187
|
-
dialog.DoModal(event);
|
|
91188
|
-
}
|
|
91189
|
-
},
|
|
91190
|
-
{
|
|
91191
|
-
text:'区间放大',
|
|
91192
|
-
click:function()
|
|
91193
|
-
{
|
|
91194
|
-
JSConsole.Chart.Log('[KLineSelectRightMenu::click] 区间放大');
|
|
91195
|
-
var chart=event.data.Chart;
|
|
91196
|
-
chart.ShowSelectData(event.data.SelectData);
|
|
91197
|
-
}
|
|
91198
|
-
}
|
|
91199
|
-
];
|
|
91200
|
-
|
|
91201
|
-
rightMenu.Show({
|
|
91202
|
-
x:x,
|
|
91203
|
-
y:y,
|
|
91204
|
-
position:chart.Frame.Position,
|
|
91205
|
-
data:dataList
|
|
91206
|
-
});
|
|
91207
|
-
}
|
|
91208
|
-
|
|
91209
|
-
this.Show=function (obj)
|
|
91210
|
-
{
|
|
91211
|
-
var _self = this;
|
|
91212
|
-
$.extend(_self.option, obj);
|
|
91213
|
-
|
|
91214
|
-
//判断是否重复创建
|
|
91215
|
-
if (!_self.ID) _self.Create();
|
|
91216
|
-
//判断下如果DOM没了需要重新创建
|
|
91217
|
-
var divIdName='topMenu_'+_self.ID;
|
|
91218
|
-
var divDom=document.getElementById(divIdName);
|
|
91219
|
-
if (!divDom) _self.Create();
|
|
91220
|
-
|
|
91221
|
-
var $topMenu = $("#topMenu_"+_self.ID),
|
|
91222
|
-
topWidth = $topMenu.outerWidth(),
|
|
91223
|
-
topHeight = $topMenu.outerHeight();
|
|
91224
|
-
|
|
91225
|
-
$topMenu.contextmenu(function()
|
|
91226
|
-
{
|
|
91227
|
-
return false; //屏蔽系统右键菜单
|
|
91228
|
-
});
|
|
91229
|
-
|
|
91230
|
-
var x = _self.option.x,
|
|
91231
|
-
y = _self.option.y;
|
|
91232
|
-
|
|
91233
|
-
if (topWidth > _self.option.position.X + _self.option.position.W- x) //超过了右边距
|
|
91234
|
-
x = x - topWidth;
|
|
91235
|
-
|
|
91236
|
-
if (topHeight > _self.option.position.Y +_self.option.position.H - y)//超过了下边距
|
|
91237
|
-
y = y - topHeight;
|
|
91238
|
-
|
|
91239
|
-
$topMenu.hide();
|
|
91240
|
-
$topMenu.css({ position:"absolute",left: x + "px", top: y + "px" }).show();
|
|
91241
|
-
|
|
91242
|
-
$("#topMenu_" + _self.ID).find("tr").show(); //把菜单列表显示
|
|
91243
|
-
|
|
91244
|
-
this.isInit = true;
|
|
91245
|
-
}
|
|
91246
|
-
}
|
|
91247
|
-
|
|
91248
|
-
//分钟数据右键菜单
|
|
91249
|
-
function MinuteRightMenu(divElement)
|
|
91250
|
-
{
|
|
91251
|
-
this.newMethod=KLineRightMenu; //派生
|
|
91252
|
-
this.newMethod(divElement);
|
|
91253
|
-
delete this.newMethod;
|
|
91254
|
-
|
|
91255
|
-
this.DoModal=function(event)
|
|
91256
|
-
{
|
|
91257
|
-
var chart=event.data.Chart;
|
|
91258
|
-
var rightMenu=chart.RightMenu;
|
|
91259
|
-
var x = event.offsetX;
|
|
91260
|
-
var y = event.offsetY;
|
|
91261
|
-
|
|
91262
|
-
var dataList=
|
|
91263
|
-
[
|
|
91264
|
-
{
|
|
91265
|
-
text: "叠加品种",
|
|
91266
|
-
children: this.GetOverlay(chart)
|
|
91267
|
-
},
|
|
91268
|
-
{
|
|
91269
|
-
text: "多日分时图",
|
|
91270
|
-
children: this.GetDayCount(chart)
|
|
91271
|
-
},
|
|
91272
|
-
{
|
|
91273
|
-
text:'指标窗口个数',
|
|
91274
|
-
children: this.GetIndexWindowCount(chart)
|
|
91275
|
-
},
|
|
91276
|
-
{
|
|
91277
|
-
text: "副图指标切换",
|
|
91278
|
-
children: this.GetIndex(chart)
|
|
91279
|
-
},
|
|
91280
|
-
{
|
|
91281
|
-
text:"区间选择",
|
|
91282
|
-
children:this.GetSelectRect(chart)
|
|
91283
|
-
},
|
|
91284
|
-
|
|
91285
|
-
];
|
|
91286
|
-
|
|
91287
|
-
var symbol=chart.Symbol;
|
|
91288
|
-
if (MARKET_SUFFIX_NAME.IsSHSZStockA(symbol))
|
|
91289
|
-
{
|
|
91290
|
-
dataList.push({text:'集合竞价',children: this.GetShowBeforeData(chart)});
|
|
91291
|
-
}
|
|
91292
|
-
|
|
91293
|
-
dataList.push({text:"工具", children:this.GetTools(chart)});
|
|
91294
|
-
|
|
91295
|
-
var identify=event.data.FrameID;
|
|
91296
|
-
var overlayIndex=this.GetOverlayIndex(chart,identify);
|
|
91297
|
-
if (overlayIndex && overlayIndex.length>0)
|
|
91298
|
-
{
|
|
91299
|
-
var delOverlayIndexMenu={ text:'删除叠加指标', children:this.GetDeleteOverlayIndex(chart,overlayIndex) }
|
|
91300
|
-
dataList.splice(3,0,delOverlayIndexMenu);
|
|
91301
|
-
}
|
|
91302
|
-
|
|
91303
|
-
var identify=event.data.FrameID;
|
|
91304
|
-
JSConsole.Chart.Log('[MinuteRightMenu::DoModal]',identify);
|
|
91305
|
-
rightMenu.Show({
|
|
91306
|
-
windowIndex :identify,
|
|
91307
|
-
x:x+chart.UIElement.offsetLeft,
|
|
91308
|
-
y:y+chart.UIElement.offsetTop,
|
|
91309
|
-
position:chart.Frame.Position,
|
|
91310
|
-
data:dataList
|
|
91311
|
-
})
|
|
91312
|
-
|
|
91313
|
-
$(document).click(function () {
|
|
91314
|
-
rightMenu.Hide();
|
|
91315
|
-
});
|
|
91316
|
-
}
|
|
91317
|
-
|
|
91318
|
-
this.GetDayCount=function(chart)
|
|
91319
|
-
{
|
|
91320
|
-
var data=
|
|
91321
|
-
[
|
|
91322
|
-
{
|
|
91323
|
-
text: "当日分时图",
|
|
91324
|
-
click: function () { chart.ChangeDayCount(1); },
|
|
91325
|
-
isBorder:true
|
|
91326
|
-
},
|
|
91327
|
-
{
|
|
91328
|
-
text: "最近2日",
|
|
91329
|
-
click: function () { chart.ChangeDayCount(2); }
|
|
91330
|
-
},
|
|
91331
|
-
{
|
|
91332
|
-
text: "最近3日",
|
|
91333
|
-
click: function () { chart.ChangeDayCount(3); }
|
|
91334
|
-
},
|
|
91335
|
-
{
|
|
91336
|
-
text: "最近4日",
|
|
91337
|
-
click: function () { chart.ChangeDayCount(4); }
|
|
91338
|
-
},
|
|
91339
|
-
{
|
|
91340
|
-
text: "最近5日",
|
|
91341
|
-
click: function () { chart.ChangeDayCount(5); }
|
|
91342
|
-
},
|
|
91343
|
-
{
|
|
91344
|
-
text: "最近6日",
|
|
91345
|
-
click: function () { chart.ChangeDayCount(6); }
|
|
91346
|
-
}
|
|
91347
|
-
];
|
|
91348
|
-
|
|
91349
|
-
if ((chart.DayCount-1)>=0 && (chart.DayCount-1)<data.length) data[chart.DayCount-1].selected=true;
|
|
91350
|
-
|
|
91351
|
-
return data;
|
|
91352
|
-
}
|
|
91353
|
-
|
|
91354
|
-
this.GetIndex=function (chart)
|
|
91355
|
-
{
|
|
91356
|
-
var data=
|
|
91357
|
-
[
|
|
91358
|
-
{
|
|
91359
|
-
text: "MACD",
|
|
91360
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'MACD') }
|
|
91361
|
-
},
|
|
91362
|
-
{
|
|
91363
|
-
text: "DMI",
|
|
91364
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'DMI') }
|
|
91365
|
-
},
|
|
91366
|
-
{
|
|
91367
|
-
text: "DMA",
|
|
91368
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'DMA') }
|
|
91369
|
-
},
|
|
91370
|
-
{
|
|
91371
|
-
text: "BRAR",
|
|
91372
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'BRAR') }
|
|
91373
|
-
},
|
|
91374
|
-
{
|
|
91375
|
-
text: "KDJ",
|
|
91376
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'KDJ') }
|
|
91377
|
-
},
|
|
91378
|
-
{
|
|
91379
|
-
text: "RSI",
|
|
91380
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'RSI') }
|
|
91381
|
-
},
|
|
91382
|
-
{
|
|
91383
|
-
text: "WR",
|
|
91384
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'WR') }
|
|
91385
|
-
},
|
|
91386
|
-
{
|
|
91387
|
-
text: "CCI",
|
|
91388
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'CCI') }
|
|
91389
|
-
},
|
|
91390
|
-
{
|
|
91391
|
-
text: "TRIX",
|
|
91392
|
-
click: function (windowIndex) { chart.ChangeIndex(windowIndex, 'TRIX') }
|
|
91393
|
-
}
|
|
91394
|
-
];
|
|
91395
|
-
|
|
91396
|
-
return data;
|
|
91397
|
-
}
|
|
91398
|
-
|
|
91399
|
-
this.GetShowBeforeData=function(chart) //是否显示集合竞价
|
|
91400
|
-
{
|
|
91401
|
-
if (chart.IsShowBeforeData)
|
|
91402
|
-
{
|
|
91403
|
-
var data=
|
|
91404
|
-
[
|
|
91405
|
-
{
|
|
91406
|
-
text: "隐藏",
|
|
91407
|
-
click: function () { chart.ShowCallAuctionData( { Left:false, MultiDay:{ Left:false }} ); },
|
|
91408
|
-
}
|
|
91409
|
-
];
|
|
91410
|
-
|
|
91411
|
-
return data;
|
|
91412
|
-
}
|
|
91413
|
-
else
|
|
91414
|
-
{
|
|
91415
|
-
var data=
|
|
91416
|
-
[
|
|
91417
|
-
{
|
|
91418
|
-
text: "显示",
|
|
91419
|
-
click: function () { chart.ShowCallAuctionData({Left:true, MultiDay:{ Left:true }}); },
|
|
91420
|
-
}
|
|
91421
|
-
];
|
|
91422
|
-
|
|
91423
|
-
return data;
|
|
91424
|
-
}
|
|
91425
|
-
}
|
|
91426
|
-
|
|
91427
|
-
this.GetSelectRect=function(chart) //区间选择
|
|
91428
|
-
{
|
|
91429
|
-
if (chart.EnableSelectRect)
|
|
91430
|
-
{
|
|
91431
|
-
var data=
|
|
91432
|
-
[
|
|
91433
|
-
{
|
|
91434
|
-
text: "禁用区间选择",
|
|
91435
|
-
click: function () { chart.EnableSelectRect=false; },
|
|
91436
|
-
}
|
|
91437
|
-
];
|
|
91438
|
-
|
|
91439
|
-
return data;
|
|
91440
|
-
}
|
|
91441
|
-
else
|
|
91442
|
-
{
|
|
91443
|
-
var data=
|
|
91444
|
-
[
|
|
91445
|
-
{
|
|
91446
|
-
text: "启动区间选择",
|
|
91447
|
-
click: function () { chart.EnableSelectRect=true },
|
|
91448
|
-
}
|
|
91449
|
-
];
|
|
91450
|
-
|
|
91451
|
-
return data;
|
|
91452
|
-
}
|
|
91453
|
-
}
|
|
91454
|
-
|
|
91455
|
-
//指标窗口个数
|
|
91456
|
-
this.GetIndexWindowCount=function(chart)
|
|
91457
|
-
{
|
|
91458
|
-
var data=
|
|
91459
|
-
[
|
|
91460
|
-
{
|
|
91461
|
-
text: "1个窗口",
|
|
91462
|
-
click: function () { chart.ChangeIndexWindowCount(2); }
|
|
91463
|
-
},
|
|
91464
|
-
{
|
|
91465
|
-
text: "2个窗口",
|
|
91466
|
-
click: function () { chart.ChangeIndexWindowCount(3); }
|
|
91467
|
-
},
|
|
91468
|
-
{
|
|
91469
|
-
text: "3个窗口",
|
|
91470
|
-
click: function () { chart.ChangeIndexWindowCount(4); }
|
|
91471
|
-
},
|
|
91472
|
-
{
|
|
91473
|
-
text: "4个窗口",
|
|
91474
|
-
click: function () { chart.ChangeIndexWindowCount(5); }
|
|
91475
|
-
},
|
|
91476
|
-
{
|
|
91477
|
-
text: "5个窗口",
|
|
91478
|
-
click: function () { chart.ChangeIndexWindowCount(6); }
|
|
91479
|
-
}
|
|
91480
|
-
];
|
|
91481
|
-
|
|
91482
|
-
var count=chart.Frame.SubFrame.length-1;
|
|
91483
|
-
if ((count-1)>=0 && (count-1)<data.length) data[count-1].selected=true; //选中
|
|
91484
|
-
|
|
91485
|
-
return data;
|
|
91486
|
-
}
|
|
91487
|
-
|
|
91488
|
-
//工具
|
|
91489
|
-
this.GetTools=function(chart)
|
|
91490
|
-
{
|
|
91491
|
-
var data=[];
|
|
91492
|
-
var drawTools=chart.GetExtendChartByClassName('DrawToolsButton');
|
|
91493
|
-
if (drawTools)
|
|
91494
|
-
{
|
|
91495
|
-
data.push(
|
|
91496
|
-
{
|
|
91497
|
-
text: "关闭画图工具",
|
|
91498
|
-
click: function ()
|
|
91499
|
-
{
|
|
91500
|
-
var toolsWidth=drawTools.Chart.Width;
|
|
91501
|
-
var toolsIndex=parseInt(drawTools.Index);
|
|
91502
|
-
chart.DeleteExtendChart(drawTools);
|
|
91503
|
-
chart.Frame.ChartBorder.Right-=toolsWidth;
|
|
91504
|
-
chart.SetSizeChange(true);
|
|
91505
|
-
chart.Draw();
|
|
91506
|
-
}
|
|
91507
|
-
}
|
|
91508
|
-
);
|
|
91509
|
-
}
|
|
91510
|
-
else
|
|
91511
|
-
{
|
|
91512
|
-
data.push(
|
|
91513
|
-
{
|
|
91514
|
-
text: "画图工具",
|
|
91515
|
-
click: function () {
|
|
91516
|
-
var option={Name:'画图工具', Top:chart.Frame.ChartBorder.Top };
|
|
91517
|
-
var extendChart=chart.CreateExtendChart(option.Name, option); //创建扩展图形
|
|
91518
|
-
chart.SetSizeChange(true);
|
|
91519
|
-
chart.Draw();
|
|
91520
|
-
}
|
|
91521
|
-
}
|
|
91522
|
-
);
|
|
91523
|
-
}
|
|
91524
|
-
|
|
91525
|
-
return data;
|
|
91526
|
-
}
|
|
91527
|
-
}
|
|
91528
|
-
|
|
91529
90134
|
//画图工具 单个图形设置
|
|
91530
90135
|
function ChartPictureSettingMenu(divElement)
|
|
91531
90136
|
{
|
|
@@ -133184,7 +131789,7 @@ function ScrollBarBGChart()
|
|
|
133184
131789
|
|
|
133185
131790
|
|
|
133186
131791
|
|
|
133187
|
-
var HQCHART_VERSION="1.1.
|
|
131792
|
+
var HQCHART_VERSION="1.1.13190";
|
|
133188
131793
|
|
|
133189
131794
|
function PrintHQChartVersion()
|
|
133190
131795
|
{
|