hqchart 1.1.14564 → 1.1.14576
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 +61 -28
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogSearchIndex.js +84 -2
- package/src/jscommon/umychart.PopMinuteChart.js +5 -2
- package/src/jscommon/umychart.complier.js +13 -0
- package/src/jscommon/umychart.js +291 -11
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +305 -12
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +394 -16
|
@@ -4258,6 +4258,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4258
4258
|
if (IFrameSplitOperator.IsBool(option.EnableZoomIndexWindow)) chart.EnableZoomIndexWindow=option.EnableZoomIndexWindow;
|
|
4259
4259
|
if (IFrameSplitOperator.IsBool(option.IsDrawPictureXY)) chart.IsDrawPictureXY=option.IsDrawPictureXY;
|
|
4260
4260
|
if (IFrameSplitOperator.IsNumber(option.CtrlMoveStep)) chart.CtrlMoveStep=option.CtrlMoveStep;
|
|
4261
|
+
if (IFrameSplitOperator.IsNumber(option.ShiftMoveStep)) chart.ShiftMoveStep=option.ShiftMoveStep;
|
|
4261
4262
|
if (IFrameSplitOperator.IsBool(option.EnableIndexChartDrag)) chart.EnableIndexChartDrag=option.EnableIndexChartDrag;
|
|
4262
4263
|
if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
|
|
4263
4264
|
|
|
@@ -6468,9 +6469,6 @@ JSChart.GetfloatPrecision=function(symbol)
|
|
|
6468
6469
|
return GetfloatPrecision(symbol);
|
|
6469
6470
|
}
|
|
6470
6471
|
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
6472
|
var JSCHART_EVENT_ID=
|
|
6475
6473
|
{
|
|
6476
6474
|
//RECV_KLINE_MATCH:1, //接收到形态匹配
|
|
@@ -6869,7 +6867,9 @@ var JSCHART_MENU_ID=
|
|
|
6869
6867
|
|
|
6870
6868
|
CMD_RBUTTON_SELECT_RECT_ID:53, //右键区间选择
|
|
6871
6869
|
CMD_LBUTTON_SELECT_RECT_ID:54, //左键区间选择
|
|
6872
|
-
CMD_ENABLE_XDRAG_BOTTOM_ID:55,
|
|
6870
|
+
CMD_ENABLE_XDRAG_BOTTOM_ID:55, //X轴拖动缩放
|
|
6871
|
+
|
|
6872
|
+
CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
|
|
6873
6873
|
|
|
6874
6874
|
|
|
6875
6875
|
|
|
@@ -7024,6 +7024,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7024
7024
|
this.ZoomStepPixel=5; //放大缩小手势需要的最小像素
|
|
7025
7025
|
this.TouchMoveMinAngle=70; //左右移动最小角度
|
|
7026
7026
|
this.EnableAnimation=false; //是否开启动画
|
|
7027
|
+
this.ShiftUpDownStepPixel=1*GetDevicePixelRatio(); //Shift+(up/down) 移动十字光标
|
|
7027
7028
|
|
|
7028
7029
|
//tooltip提示信息
|
|
7029
7030
|
this.Tooltip=document.createElement("div");
|
|
@@ -7124,7 +7125,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7124
7125
|
|
|
7125
7126
|
this.RestoreFocusTimer=null; //恢复焦点定时器
|
|
7126
7127
|
this.PreventRightMenu={ Timer:null, Enable:false, Delay:2000 }; //阻止右键菜单
|
|
7127
|
-
|
|
7128
|
+
|
|
7129
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
7130
|
+
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
7131
|
+
|
|
7128
7132
|
this.RestoreFocus=function(delay)
|
|
7129
7133
|
{
|
|
7130
7134
|
var value=1000;
|
|
@@ -10951,6 +10955,40 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10951
10955
|
this.UIElement.style.cursor=obj.Cursor;
|
|
10952
10956
|
}
|
|
10953
10957
|
|
|
10958
|
+
this.OnHotKeyDown=function(keyID, e) //热键触发
|
|
10959
|
+
{
|
|
10960
|
+
var item=this.FindHotKey(keyID,e);
|
|
10961
|
+
if (!item) return false;
|
|
10962
|
+
|
|
10963
|
+
this.ExecuteMenuCommand(item.CMD, item.Args);
|
|
10964
|
+
return true;
|
|
10965
|
+
}
|
|
10966
|
+
|
|
10967
|
+
this.FindHotKey=function(keyID, e)
|
|
10968
|
+
{
|
|
10969
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryHotKey)) return null;
|
|
10970
|
+
|
|
10971
|
+
for(var i=0;i<this.AryHotKey.length;++i)
|
|
10972
|
+
{
|
|
10973
|
+
var item=this.AryHotKey[i];
|
|
10974
|
+
if (keyID==item.KeyID)
|
|
10975
|
+
{
|
|
10976
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
10977
|
+
if ((item.SecondKeyID==1 && e.shiftKey) || (item.SecondKeyID==2 && e.ctrlKey) || (item.SecondKeyID==3 && e.altKey))
|
|
10978
|
+
return item;
|
|
10979
|
+
}
|
|
10980
|
+
}
|
|
10981
|
+
|
|
10982
|
+
return null;
|
|
10983
|
+
}
|
|
10984
|
+
|
|
10985
|
+
this.IsHotKey=function(keyID, e)
|
|
10986
|
+
{
|
|
10987
|
+
var item=this.FindHotKey(keyID,e);
|
|
10988
|
+
if (!item) return false;
|
|
10989
|
+
return true;
|
|
10990
|
+
}
|
|
10991
|
+
|
|
10954
10992
|
this.OnKeyDown=function(e)
|
|
10955
10993
|
{
|
|
10956
10994
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
@@ -10974,15 +11012,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10974
11012
|
draw=sendData.Draw;
|
|
10975
11013
|
}
|
|
10976
11014
|
|
|
11015
|
+
if (this.OnHotKeyDown(keyID, e))
|
|
11016
|
+
{
|
|
11017
|
+
//不让滚动条滚动
|
|
11018
|
+
if(e.preventDefault) e.preventDefault();
|
|
11019
|
+
else e.returnValue = false;
|
|
11020
|
+
return;
|
|
11021
|
+
}
|
|
11022
|
+
|
|
10977
11023
|
switch(keyID)
|
|
10978
11024
|
{
|
|
10979
11025
|
case 37: //left
|
|
10980
|
-
if (e.ctrlKey && this.OnCustomKeyDown)
|
|
11026
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
10981
11027
|
{
|
|
10982
11028
|
if (this.OnCustomKeyDown(keyID, e))
|
|
10983
11029
|
break;
|
|
10984
11030
|
}
|
|
10985
|
-
|
|
11031
|
+
|
|
10986
11032
|
if (this.CursorIndex<=0.99999)
|
|
10987
11033
|
{
|
|
10988
11034
|
if (!this.DataMoveLeft())
|
|
@@ -11007,7 +11053,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11007
11053
|
}
|
|
11008
11054
|
break;
|
|
11009
11055
|
case 39: //right
|
|
11010
|
-
if (e.ctrlKey && this.OnCustomKeyDown)
|
|
11056
|
+
if ((e.ctrlKey|| e.shiftKey) && this.OnCustomKeyDown)
|
|
11011
11057
|
{
|
|
11012
11058
|
if (this.OnCustomKeyDown(keyID, e))
|
|
11013
11059
|
break;
|
|
@@ -11043,8 +11089,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11043
11089
|
}
|
|
11044
11090
|
break;
|
|
11045
11091
|
case 38: //up
|
|
11092
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
11093
|
+
{
|
|
11094
|
+
if (this.OnCustomKeyDown(keyID, e))
|
|
11095
|
+
break;
|
|
11096
|
+
}
|
|
11046
11097
|
if (this.EnableZoomUpDown && this.EnableZoomUpDown.Keyboard===false) break;
|
|
11047
11098
|
var cursorIndex={ ZoomType:this.ZoomType, IsLockRight:this.IsZoomLockRight };
|
|
11099
|
+
if (e.ctrlKey) cursorIndex.ZoomType=1; //ctrl 十字中心缩放
|
|
11048
11100
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
11049
11101
|
if (!this.Frame.ZoomUp(cursorIndex)) break;
|
|
11050
11102
|
this.CursorIndex=cursorIndex.Index;
|
|
@@ -11057,8 +11109,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11057
11109
|
this.OnKLinePageChange("keydown");
|
|
11058
11110
|
break;
|
|
11059
11111
|
case 40: //down
|
|
11112
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
11113
|
+
{
|
|
11114
|
+
if (this.OnCustomKeyDown(keyID, e))
|
|
11115
|
+
break;
|
|
11116
|
+
}
|
|
11060
11117
|
if (this.EnableZoomUpDown && this.EnableZoomUpDown.Keyboard===false) break;
|
|
11061
11118
|
var cursorIndex={ ZoomType:this.ZoomType ,IsLockRight:this.IsZoomLockRight };
|
|
11119
|
+
if (e.ctrlKey) cursorIndex.ZoomType=1; //ctrl 十字中心缩放
|
|
11062
11120
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
11063
11121
|
if (!this.Frame.ZoomDown(cursorIndex, { ZoomDownloadDataCallback:(requestData)=>{ this.ZoomDownloadData(requestData) } })) break;
|
|
11064
11122
|
|
|
@@ -13069,6 +13127,43 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13069
13127
|
return width;
|
|
13070
13128
|
}
|
|
13071
13129
|
|
|
13130
|
+
this.GetChartPaintByClassName=function(name)
|
|
13131
|
+
{
|
|
13132
|
+
var aryData=[];
|
|
13133
|
+
for(var i=0;i<this.ChartPaint.length;++i)
|
|
13134
|
+
{
|
|
13135
|
+
var item=this.ChartPaint[i];
|
|
13136
|
+
if (item.ClassName==name)
|
|
13137
|
+
{
|
|
13138
|
+
var frameID=null;
|
|
13139
|
+
if (item.ChartFrame) frameID=item.ChartFrame.Identify;
|
|
13140
|
+
aryData.push({ IsOverlay:false, Chart:item, FrameID:frameID });
|
|
13141
|
+
}
|
|
13142
|
+
}
|
|
13143
|
+
|
|
13144
|
+
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
13145
|
+
{
|
|
13146
|
+
var subItem=this.Frame.SubFrame[i];
|
|
13147
|
+
if (!subItem) continue;
|
|
13148
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(subItem.OverlayIndex)) continue;
|
|
13149
|
+
|
|
13150
|
+
for(var j=0;j<subItem.OverlayIndex.length;++j)
|
|
13151
|
+
{
|
|
13152
|
+
var item=subItem.OverlayIndex[j];
|
|
13153
|
+
for(var k=0;k<item.ChartPaint.length;++k)
|
|
13154
|
+
{
|
|
13155
|
+
var chartItem=item.ChartPaint[k];
|
|
13156
|
+
if (chartItem.ClassName==name)
|
|
13157
|
+
{
|
|
13158
|
+
aryData.push({ IsOverlay:true, Chart:chartItem, FrameID:subItem.Frame.Identify, SubFrameID:j });
|
|
13159
|
+
}
|
|
13160
|
+
}
|
|
13161
|
+
}
|
|
13162
|
+
}
|
|
13163
|
+
|
|
13164
|
+
return aryData;
|
|
13165
|
+
}
|
|
13166
|
+
|
|
13072
13167
|
//删除扩展画法
|
|
13073
13168
|
this.DeleteExtendChart=function(data)
|
|
13074
13169
|
{
|
|
@@ -14452,6 +14547,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14452
14547
|
case JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID:
|
|
14453
14548
|
if (IFrameSplitOperator.IsBool(srcParam)) this.EnableXDrag.Bottom=srcParam;
|
|
14454
14549
|
break;
|
|
14550
|
+
case JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID:
|
|
14551
|
+
this.FullScreenSummary();
|
|
14552
|
+
break;
|
|
14455
14553
|
}
|
|
14456
14554
|
}
|
|
14457
14555
|
|
|
@@ -15008,6 +15106,63 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
15008
15106
|
this.Draw();
|
|
15009
15107
|
}
|
|
15010
15108
|
}
|
|
15109
|
+
|
|
15110
|
+
this.MoveCorssCursorUp=function(step)
|
|
15111
|
+
{
|
|
15112
|
+
if (!IFrameSplitOperator.IsNumber(this.LastPoint.Y)) return;
|
|
15113
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
15114
|
+
var top=border.TopEx;
|
|
15115
|
+
if (this.LastPoint.Y-step<=top) return;
|
|
15116
|
+
|
|
15117
|
+
this.LastPoint.Y-=step;
|
|
15118
|
+
this.DrawDynamicInfo();
|
|
15119
|
+
}
|
|
15120
|
+
|
|
15121
|
+
this.MoveCorssCursorDown=function(step)
|
|
15122
|
+
{
|
|
15123
|
+
if (!IFrameSplitOperator.IsNumber(this.LastPoint.Y)) return;
|
|
15124
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
15125
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
15126
|
+
var bottom=border.BottomEx;
|
|
15127
|
+
if (this.LastPoint.Y+step>=bottom) return;
|
|
15128
|
+
|
|
15129
|
+
this.LastPoint.Y+=step;
|
|
15130
|
+
this.DrawDynamicInfo();
|
|
15131
|
+
}
|
|
15132
|
+
|
|
15133
|
+
//整屏区间统计
|
|
15134
|
+
this.FullScreenSummary=function()
|
|
15135
|
+
{
|
|
15136
|
+
var kData=this.GetKData();
|
|
15137
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return false;
|
|
15138
|
+
|
|
15139
|
+
var paint=this.GetRectSelectPaint();
|
|
15140
|
+
if (!paint) return false;
|
|
15141
|
+
|
|
15142
|
+
var xPointcount=0;
|
|
15143
|
+
if (this.Frame.XPointCount) xPointcount=this.Frame.XPointCount;
|
|
15144
|
+
else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;
|
|
15145
|
+
if (!IFrameSplitOperator.IsPlusNumber(xPointcount)) return false;
|
|
15146
|
+
|
|
15147
|
+
var startIndex=kData.DataOffset;
|
|
15148
|
+
var endIndex=startIndex+xPointcount;
|
|
15149
|
+
this.UpdateSelectRect(startIndex, endIndex);
|
|
15150
|
+
|
|
15151
|
+
var selectData=paint.GetSelectRectData();
|
|
15152
|
+
var border=this.Frame.SubFrame[0].Frame.GetBorder();
|
|
15153
|
+
|
|
15154
|
+
var data=
|
|
15155
|
+
{
|
|
15156
|
+
X:border.ChartWidth/2, Y:border.ChartHeight/2,
|
|
15157
|
+
SelectData:selectData, //区间选择的数据
|
|
15158
|
+
RectSelectPaint:paint //区间选择背景
|
|
15159
|
+
}
|
|
15160
|
+
|
|
15161
|
+
var e={ data:data };
|
|
15162
|
+
if (this.DialogSelectRect) this.DrawSelectRectDialog(e);
|
|
15163
|
+
|
|
15164
|
+
return true;
|
|
15165
|
+
}
|
|
15011
15166
|
}
|
|
15012
15167
|
|
|
15013
15168
|
function GetDevicePixelRatio()
|
|
@@ -46655,7 +46810,7 @@ function ChartMultiSVGIconV2()
|
|
|
46655
46810
|
if (IFrameSplitOperator.IsString(item.Value)) value=this.GetKValue(kItem,item.Value);
|
|
46656
46811
|
if (!IFrameSplitOperator.IsNumber(value)) continue;
|
|
46657
46812
|
|
|
46658
|
-
var y=this.ChartFrame.GetYFromData(
|
|
46813
|
+
var y=this.ChartFrame.GetYFromData(value,false);
|
|
46659
46814
|
|
|
46660
46815
|
if (item.Image)
|
|
46661
46816
|
{
|
|
@@ -80090,7 +80245,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80090
80245
|
this.ChartDrawStorageCache=null; //首次需要创建的画图工具数据
|
|
80091
80246
|
this.RightSpaceCount=0; //右侧空白个数
|
|
80092
80247
|
this.SourceDataLimit=new Map(); //每个周期缓存数据最大个数 key=周期 value=最大个数
|
|
80093
|
-
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
80248
|
+
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
80249
|
+
this.ShiftMoveStep=1; //Shift+(Left/Right) 移动K线
|
|
80094
80250
|
|
|
80095
80251
|
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:, Position:0=left 1=center }
|
|
80096
80252
|
this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
|
|
@@ -80144,6 +80300,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80144
80300
|
this.ScrollBar=null; //横向滚动条
|
|
80145
80301
|
this.IsAutoSyncDataOffset=true; //增量更新时,是否移动当前屏数据
|
|
80146
80302
|
|
|
80303
|
+
//热键
|
|
80304
|
+
this.AryHotKey=
|
|
80305
|
+
[
|
|
80306
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
80307
|
+
{ KeyID:87, SecondKeyID:3, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
80308
|
+
]
|
|
80309
|
+
|
|
80147
80310
|
this.GetKLineCalulate=function()
|
|
80148
80311
|
{
|
|
80149
80312
|
var kLineDrawType=this.GetKLineDrawType();
|
|
@@ -81181,7 +81344,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81181
81344
|
this.PopMinuteChart.Show({ Date:date, Symbol:symbol, Data:data.Tooltip.Data, Chart:data.Tooltip.ChartPaint }, x/pixelRatio,y/pixelRatio);
|
|
81182
81345
|
}
|
|
81183
81346
|
|
|
81184
|
-
|
|
81347
|
+
//Alt+W 区间统计
|
|
81348
|
+
//Alt+数字 切换多个窗口
|
|
81349
|
+
//Ctrl+I
|
|
81185
81350
|
this.OnCustomKeyDown=function(keyID, e) //自定义键盘事件
|
|
81186
81351
|
{
|
|
81187
81352
|
if (keyID==37 && e.ctrlKey) //Ctrl+Left
|
|
@@ -81194,12 +81359,89 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81194
81359
|
this.MoveCorssCursorRight(this.CtrlMoveStep);
|
|
81195
81360
|
return true;
|
|
81196
81361
|
}
|
|
81362
|
+
else if (keyID==37 && e.shiftKey) //shift+Left 移动K线
|
|
81363
|
+
{
|
|
81364
|
+
this.MoveKLineLeft(this.ShiftMoveStep);
|
|
81365
|
+
return true;
|
|
81366
|
+
}
|
|
81367
|
+
else if (keyID==39 && e.shiftKey) //shift+Right 移动K线
|
|
81368
|
+
{
|
|
81369
|
+
this.MoveKLineRight(this.ShiftMoveStep);
|
|
81370
|
+
return true;
|
|
81371
|
+
}
|
|
81372
|
+
else if (keyID==38 && e.shiftKey) //shift+up 上移十字光标
|
|
81373
|
+
{
|
|
81374
|
+
this.MoveCorssCursorUp(this.ShiftUpDownStepPixel);
|
|
81375
|
+
return true;
|
|
81376
|
+
}
|
|
81377
|
+
else if (keyID==40 && e.shiftKey) //shift+down 下移十字光标
|
|
81378
|
+
{
|
|
81379
|
+
this.MoveCorssCursorDown(this.ShiftUpDownStepPixel);
|
|
81380
|
+
return true;
|
|
81381
|
+
}
|
|
81197
81382
|
else
|
|
81198
81383
|
{
|
|
81199
81384
|
return false;
|
|
81200
81385
|
}
|
|
81201
81386
|
}
|
|
81202
81387
|
|
|
81388
|
+
this.MoveKLineLeft=function(value)
|
|
81389
|
+
{
|
|
81390
|
+
return this.MoveKLine(-value);
|
|
81391
|
+
}
|
|
81392
|
+
|
|
81393
|
+
this.MoveKLineRight=function(value)
|
|
81394
|
+
{
|
|
81395
|
+
return this.MoveKLine(value);
|
|
81396
|
+
}
|
|
81397
|
+
|
|
81398
|
+
this.MoveKLine=function(step)
|
|
81399
|
+
{
|
|
81400
|
+
if (step==0) return;
|
|
81401
|
+
|
|
81402
|
+
var oneStepWidth=this.GetMoveOneStepWidth();
|
|
81403
|
+
var moveSetp=step*oneStepWidth;
|
|
81404
|
+
var bLeft=true;
|
|
81405
|
+
if (step<0)
|
|
81406
|
+
{
|
|
81407
|
+
moveSetp=Math.abs(step)*oneStepWidth;
|
|
81408
|
+
bLeft=false;
|
|
81409
|
+
}
|
|
81410
|
+
|
|
81411
|
+
if(!this.DataMove(moveSetp,bLeft)) return;
|
|
81412
|
+
|
|
81413
|
+
this.UpdataDataoffset();
|
|
81414
|
+
this.RepairCursorIndex();
|
|
81415
|
+
this.UpdatePointByCursorIndex(); //推拽数据的时候不需要把鼠标位置更新到K线上
|
|
81416
|
+
this.UpdateFrameMaxMin();
|
|
81417
|
+
this.ResetFrameXYSplit();
|
|
81418
|
+
this.Draw();
|
|
81419
|
+
this.ShowTooltipByKeyDown();
|
|
81420
|
+
this.OnKLinePageChange("datamove");
|
|
81421
|
+
}
|
|
81422
|
+
|
|
81423
|
+
//修复 当前数据索引大于数据个数的请求
|
|
81424
|
+
this.RepairCursorIndex=function()
|
|
81425
|
+
{
|
|
81426
|
+
var kData=this.GetKData();
|
|
81427
|
+
if (!kData) return;
|
|
81428
|
+
|
|
81429
|
+
var xPointcount=0;
|
|
81430
|
+
if (this.Frame.XPointCount) xPointcount=this.Frame.XPointCount;
|
|
81431
|
+
else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;
|
|
81432
|
+
if (!IFrameSplitOperator.IsPlusNumber(xPointcount)) return;
|
|
81433
|
+
|
|
81434
|
+
if (this.CursorIndex<0) this.CursorIndex=0;
|
|
81435
|
+
|
|
81436
|
+
var index=this.CursorIndex;
|
|
81437
|
+
index=parseInt(index.toFixed(0));
|
|
81438
|
+
|
|
81439
|
+
if (index+kData.DataOffset>=kData.Data.length)
|
|
81440
|
+
{
|
|
81441
|
+
this.CursorIndex=kData.Data.length-1-kData.DataOffset;
|
|
81442
|
+
}
|
|
81443
|
+
}
|
|
81444
|
+
|
|
81203
81445
|
this.MoveCorssCursorLeft=function(step)
|
|
81204
81446
|
{
|
|
81205
81447
|
var data=null;
|
|
@@ -88519,6 +88761,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
88519
88761
|
this.BaselineType=0; //基准线类型 0=最新昨收盘 1=多日前昨收盘
|
|
88520
88762
|
this.EnableNightDayBG=false; //是否启动夜盘背景色
|
|
88521
88763
|
|
|
88764
|
+
//热键
|
|
88765
|
+
this.AryHotKey=
|
|
88766
|
+
[
|
|
88767
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
88768
|
+
{ KeyID:87, SecondKeyID:3, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
88769
|
+
]
|
|
88770
|
+
|
|
88522
88771
|
//集合竞价设置 obj={ Left:true/false, Right:true/false, MultiDay:{Left:, Right:} }
|
|
88523
88772
|
this.SetCallCationDataBorder=function(obj)
|
|
88524
88773
|
{
|
|
@@ -90023,6 +90272,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90023
90272
|
draw=sendData.Draw;
|
|
90024
90273
|
}
|
|
90025
90274
|
|
|
90275
|
+
if (this.OnHotKeyDown(keyID, e))
|
|
90276
|
+
{
|
|
90277
|
+
//不让滚动条滚动
|
|
90278
|
+
if(e.preventDefault) e.preventDefault();
|
|
90279
|
+
else e.returnValue = false;
|
|
90280
|
+
return;
|
|
90281
|
+
}
|
|
90282
|
+
|
|
90026
90283
|
switch(keyID)
|
|
90027
90284
|
{
|
|
90028
90285
|
case 37: //left
|
|
@@ -90136,6 +90393,11 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90136
90393
|
this.CurrentChartDrawPicture=null;
|
|
90137
90394
|
}
|
|
90138
90395
|
break;
|
|
90396
|
+
case 38:
|
|
90397
|
+
case 40:
|
|
90398
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
90399
|
+
this.OnCustomKeyDown(keyID, e)
|
|
90400
|
+
break;
|
|
90139
90401
|
default:
|
|
90140
90402
|
return;
|
|
90141
90403
|
}
|
|
@@ -90147,6 +90409,24 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90147
90409
|
else e.returnValue = false;
|
|
90148
90410
|
}
|
|
90149
90411
|
|
|
90412
|
+
this.OnCustomKeyDown=function(keyID, e) //自定义键盘事件
|
|
90413
|
+
{
|
|
90414
|
+
if (keyID==38 && e.shiftKey) //shift+up 上移十字光标
|
|
90415
|
+
{
|
|
90416
|
+
this.MoveCorssCursorUp(this.ShiftUpDownStepPixel);
|
|
90417
|
+
return true;
|
|
90418
|
+
}
|
|
90419
|
+
else if (keyID==40 && e.shiftKey) //shift+down 下移十字光标
|
|
90420
|
+
{
|
|
90421
|
+
this.MoveCorssCursorDown(this.ShiftUpDownStepPixel);
|
|
90422
|
+
return true;
|
|
90423
|
+
}
|
|
90424
|
+
else
|
|
90425
|
+
{
|
|
90426
|
+
return false;
|
|
90427
|
+
}
|
|
90428
|
+
}
|
|
90429
|
+
|
|
90150
90430
|
/*
|
|
90151
90431
|
this.OnMarkRectSelect=function(e)
|
|
90152
90432
|
{
|
|
@@ -128857,6 +129137,19 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
128857
129137
|
|
|
128858
129138
|
result.push(outVarItem);
|
|
128859
129139
|
}
|
|
129140
|
+
else if (draw.DrawType=="DRAWTEXT_LINE")
|
|
129141
|
+
{
|
|
129142
|
+
drawItem.Name=draw.Name;
|
|
129143
|
+
drawItem.Type=draw.Type;
|
|
129144
|
+
|
|
129145
|
+
drawItem.DrawType=draw.DrawType;
|
|
129146
|
+
drawItem.DrawData=draw.DrawData; //{ Price:, Text:{ Title:text, Color:textcolor }, Line:{ Type:linetype, Color:linecolor } };
|
|
129147
|
+
|
|
129148
|
+
outVarItem.Draw=drawItem;
|
|
129149
|
+
if (draw.Font) outVarItem.Font=draw.Font;
|
|
129150
|
+
|
|
129151
|
+
result.push(outVarItem);
|
|
129152
|
+
}
|
|
128860
129153
|
else
|
|
128861
129154
|
{
|
|
128862
129155
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -150495,6 +150788,7 @@ function MarkPopMinutePaint()
|
|
|
150495
150788
|
this.LineColor=g_JSChartResource.PopMinuteChart.Mark.LineColor;
|
|
150496
150789
|
this.SubFrame;
|
|
150497
150790
|
this.IsDynamic=true;
|
|
150791
|
+
this.IsShow=true;
|
|
150498
150792
|
|
|
150499
150793
|
|
|
150500
150794
|
this.ReloadResource=function(resource)
|
|
@@ -150524,6 +150818,7 @@ function MarkPopMinutePaint()
|
|
|
150524
150818
|
this.Draw=function()
|
|
150525
150819
|
{
|
|
150526
150820
|
this.SubFrame=null;
|
|
150821
|
+
if (!this.IsShow) return;
|
|
150527
150822
|
if (!this.HQChart) return;
|
|
150528
150823
|
if (!this.ChartFrame || !IFrameSplitOperator.IsNonEmptyArray(this.ChartFrame.SubFrame)) return;
|
|
150529
150824
|
if (!this.MapDate || this.MapDate.size<=0) return;
|
|
@@ -150578,9 +150873,10 @@ function MarkPopMinutePaint()
|
|
|
150578
150873
|
|
|
150579
150874
|
this.Canvas.lineWidth=lineWidth;
|
|
150580
150875
|
this.Canvas.strokeStyle=this.LineColor;
|
|
150876
|
+
var x=ToFixedPoint2(lineWidth,item.XCenter);
|
|
150581
150877
|
this.Canvas.beginPath();
|
|
150582
|
-
this.Canvas.moveTo(
|
|
150583
|
-
this.Canvas.lineTo(
|
|
150878
|
+
this.Canvas.moveTo(x,border.TopEx);
|
|
150879
|
+
this.Canvas.lineTo(x,border.BottomEx);
|
|
150584
150880
|
this.Canvas.stroke();
|
|
150585
150881
|
}
|
|
150586
150882
|
}
|
|
@@ -154554,10 +154850,14 @@ function JSDialogSearchIndex()
|
|
|
154554
154850
|
{
|
|
154555
154851
|
if (!IFrameSplitOperator.IsNumber(this.OpData.WindowIndex)) return;
|
|
154556
154852
|
var indexItem=cellItem.IndexItem;
|
|
154557
|
-
if (indexItem.Type==0) //系统指标
|
|
154853
|
+
if (indexItem.Type==0 ) //系统指标
|
|
154558
154854
|
{
|
|
154559
154855
|
this.HQChart.ChangeIndex(this.OpData.WindowIndex, indexItem.ID );
|
|
154560
154856
|
}
|
|
154857
|
+
else if(indexItem.Type==4 || indexItem.Type==5) //五彩K线
|
|
154858
|
+
{
|
|
154859
|
+
this.HQChart.ChangeInstructionIndex(indexItem.ID);
|
|
154860
|
+
}
|
|
154561
154861
|
else if (indexItem.Type==1) //自定义脚本指标
|
|
154562
154862
|
{
|
|
154563
154863
|
var indexData={ ID:indexItem.ID, Name:indexItem.Name, Script:indexItem.Script, Args:indexItem.Args };
|
|
@@ -154597,6 +154897,10 @@ function JSDialogSearchIndex()
|
|
|
154597
154897
|
{
|
|
154598
154898
|
this.HQChart.ChangeIndexTemplate(indexItem.TemplateData)
|
|
154599
154899
|
}
|
|
154900
|
+
else if(indexItem.Type==4 || indexItem.Type==5) //五彩K线
|
|
154901
|
+
{
|
|
154902
|
+
this.HQChart.ChangeInstructionIndex(indexItem.ID);
|
|
154903
|
+
}
|
|
154600
154904
|
}
|
|
154601
154905
|
else if (this.OpData.OpType==3) //新增加指标窗口
|
|
154602
154906
|
{
|
|
@@ -154819,7 +155123,7 @@ JSDialogSearchIndex.GetDefaultIndexData=function()
|
|
|
154819
155123
|
Group:{ ID:"超买超卖型", Name:"超买超卖型"} ,
|
|
154820
155124
|
AryIndex:
|
|
154821
155125
|
[
|
|
154822
|
-
{Name:"ADTM 动态买卖气指标", ID:"ADTM", Type:0 }, //Type:0=系统指标 1=自定义通达信脚本 2=api指标
|
|
155126
|
+
{Name:"ADTM 动态买卖气指标", ID:"ADTM", Type:0 }, //Type:0=系统指标 1=自定义通达信脚本 2=api指标 3=指标模板 4=交易系统 5=五彩K线
|
|
154823
155127
|
{Name:"BIAS 乖离率", ID:"BIAS", Type:0},
|
|
154824
155128
|
{Name:"BIAS36 三六乖离", ID:"BIAS36", Type:0 },
|
|
154825
155129
|
{Name:"BIAS_QL 乖离率-传统版", ID:"BIAS_QL", Type:0 },
|
|
@@ -154891,6 +155195,80 @@ JSDialogSearchIndex.GetDefaultIndexData=function()
|
|
|
154891
155195
|
{Name:"WAD 威廉多空力度线", ID:"WAD", Type:0}
|
|
154892
155196
|
]
|
|
154893
155197
|
},
|
|
155198
|
+
{
|
|
155199
|
+
Group:{ ID:"五彩K线", Name:"五彩K线"} ,
|
|
155200
|
+
AryIndex:
|
|
155201
|
+
[
|
|
155202
|
+
{Name:"五彩K线-十字星", ID:"五彩K线-十字星", Type:5},
|
|
155203
|
+
{Name:"五彩K线-早晨之星", ID:"五彩K线-早晨之星", Type:5},
|
|
155204
|
+
{Name:"五彩K线-黄昏之星", ID:"五彩K线-黄昏之星", Type:5},
|
|
155205
|
+
{Name:"五彩K线-长十字", ID:"五彩K线-长十字", Type:5},
|
|
155206
|
+
|
|
155207
|
+
{Name:"五彩K线-身怀六甲", ID:"五彩K线-身怀六甲", Type:5},
|
|
155208
|
+
{Name:"五彩K线-三个白武士", ID:"五彩K线-三个白武士", Type:5},
|
|
155209
|
+
{Name:"五彩K线-三只乌鸦", ID:"五彩K线-三只乌鸦", Type:5},
|
|
155210
|
+
{Name:"五彩K线-光头阳线", ID:"五彩K线-光头阳线", Type:5},
|
|
155211
|
+
|
|
155212
|
+
{Name:"五彩K线-光脚阴线", ID:"五彩K线-光脚阴线线", Type:5},
|
|
155213
|
+
{Name:"五彩K线-垂死十字", ID:"五彩K线-垂死十字", Type:5},
|
|
155214
|
+
{Name:"五彩K线-早晨十字星", ID:"五彩K线-早晨十字星", Type:5},
|
|
155215
|
+
{Name:"五彩K线-黄昏十字星", ID:"五彩K线-黄昏十字星", Type:5},
|
|
155216
|
+
|
|
155217
|
+
{Name:"五彩K线-射击之星", ID:"五彩K线-射击之星", Type:5},
|
|
155218
|
+
{Name:"五彩K线-倒转锤头", ID:"五彩K线-倒转锤头", Type:5},
|
|
155219
|
+
{Name:"五彩K线-锤头", ID:"五彩K线-锤头", Type:5},
|
|
155220
|
+
{Name:"五彩K线-吊颈", ID:"五彩K线-吊颈星", Type:5},
|
|
155221
|
+
|
|
155222
|
+
{Name:"五彩K线-穿头破脚", ID:"五彩K线-穿头破脚", Type:5},
|
|
155223
|
+
{Name:"五彩K线-出水芙蓉", ID:"五彩K线-出水芙蓉", Type:5},
|
|
155224
|
+
{Name:"五彩K线-乌云盖顶", ID:"五彩K线-乌云盖顶", Type:5},
|
|
155225
|
+
{Name:"五彩K线-曙光初现", ID:"五彩K线-曙光初现", Type:5},
|
|
155226
|
+
|
|
155227
|
+
{Name:"五彩K线-十字胎", ID:"五彩K线-十字胎", Type:5},
|
|
155228
|
+
{Name:"五彩K线-剑", ID:"五彩K线-剑", Type:5},
|
|
155229
|
+
{Name:"五彩K线-平顶", ID:"五彩K线-平顶", Type:5},
|
|
155230
|
+
{Name:"五彩K线-平底", ID:"五彩K线-平底", Type:5},
|
|
155231
|
+
|
|
155232
|
+
{Name:"五彩K线-大阳烛", ID:"五彩K线-大阳烛", Type:5},
|
|
155233
|
+
{Name:"五彩K线-大阴烛", ID:"五彩K线-大阴烛", Type:5},
|
|
155234
|
+
|
|
155235
|
+
{Name:"五彩K线-好友反攻", ID:"五彩K线-好友反攻", Type:5},
|
|
155236
|
+
{Name:"五彩K线-跳空缺口", ID:"五彩K线-跳空缺口", Type:5},
|
|
155237
|
+
|
|
155238
|
+
{Name:"五彩K线-双飞乌鸦", ID:"五彩K线-双飞乌鸦", Type:5},
|
|
155239
|
+
{Name:"五彩K线-上升三部曲", ID:"五彩K线-上升三部曲", Type:5},
|
|
155240
|
+
{Name:"五彩K线-下跌三部曲", ID:"五彩K线-下跌三部曲", Type:5},
|
|
155241
|
+
{Name:"五彩K线-长下影", ID:"五彩K线-长下影", Type:5},
|
|
155242
|
+
|
|
155243
|
+
{Name:"五彩K线-长上影", ID:"五彩K线-长上影", Type:5},
|
|
155244
|
+
{Name:"五彩K线-分离", ID:"五彩K线-分离", Type:5},
|
|
155245
|
+
|
|
155246
|
+
]
|
|
155247
|
+
},
|
|
155248
|
+
{
|
|
155249
|
+
Group:{ ID:"交易系统", Name:"交易系统"} ,
|
|
155250
|
+
AryIndex:
|
|
155251
|
+
[
|
|
155252
|
+
{Name:"交易系统-BIAS", ID:"交易系统-BIAS", Type:4},
|
|
155253
|
+
{Name:"交易系统-CCI", ID:"交易系统-CCI", Type:4},
|
|
155254
|
+
{Name:"交易系统-DMI", ID:"交易系统-DMI", Type:4},
|
|
155255
|
+
{Name:"交易系统-KD", ID:"交易系统-KD", Type:4},
|
|
155256
|
+
|
|
155257
|
+
{Name:"交易系统-BOLL", ID:"交易系统-BOLL", Type:4},
|
|
155258
|
+
{Name:"交易系统-KDJ", ID:"交易系统-KDJ", Type:4},
|
|
155259
|
+
{Name:"交易系统-MACD", ID:"交易系统-MACD", Type:4},
|
|
155260
|
+
{Name:"交易系统-KD", ID:"交易系统-KD", Type:4},
|
|
155261
|
+
|
|
155262
|
+
{Name:"交易系统-MTM", ID:"交易系统-MTM", Type:4},
|
|
155263
|
+
{Name:"交易系统-PSY", ID:"交易系统-PSY", Type:4},
|
|
155264
|
+
{Name:"交易系统-ROC", ID:"交易系统-ROC", Type:4},
|
|
155265
|
+
{Name:"交易系统-RSI", ID:"交易系统-RSI", Type:4},
|
|
155266
|
+
|
|
155267
|
+
{Name:"交易系统-VR", ID:"交易系统-VR", Type:4},
|
|
155268
|
+
{Name:"交易系统-DPSJ", ID:"交易系统-DPSJ", Type:4},
|
|
155269
|
+
|
|
155270
|
+
]
|
|
155271
|
+
},
|
|
154894
155272
|
|
|
154895
155273
|
|
|
154896
155274
|
{
|
|
@@ -155496,7 +155874,7 @@ function HQChartScriptWorker()
|
|
|
155496
155874
|
|
|
155497
155875
|
|
|
155498
155876
|
|
|
155499
|
-
var HQCHART_VERSION="1.1.
|
|
155877
|
+
var HQCHART_VERSION="1.1.14575";
|
|
155500
155878
|
|
|
155501
155879
|
function PrintHQChartVersion()
|
|
155502
155880
|
{
|