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
|
@@ -4214,6 +4214,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4214
4214
|
if (IFrameSplitOperator.IsBool(option.EnableZoomIndexWindow)) chart.EnableZoomIndexWindow=option.EnableZoomIndexWindow;
|
|
4215
4215
|
if (IFrameSplitOperator.IsBool(option.IsDrawPictureXY)) chart.IsDrawPictureXY=option.IsDrawPictureXY;
|
|
4216
4216
|
if (IFrameSplitOperator.IsNumber(option.CtrlMoveStep)) chart.CtrlMoveStep=option.CtrlMoveStep;
|
|
4217
|
+
if (IFrameSplitOperator.IsNumber(option.ShiftMoveStep)) chart.ShiftMoveStep=option.ShiftMoveStep;
|
|
4217
4218
|
if (IFrameSplitOperator.IsBool(option.EnableIndexChartDrag)) chart.EnableIndexChartDrag=option.EnableIndexChartDrag;
|
|
4218
4219
|
if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
|
|
4219
4220
|
|
|
@@ -6424,9 +6425,6 @@ JSChart.GetfloatPrecision=function(symbol)
|
|
|
6424
6425
|
return GetfloatPrecision(symbol);
|
|
6425
6426
|
}
|
|
6426
6427
|
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
6428
|
var JSCHART_EVENT_ID=
|
|
6431
6429
|
{
|
|
6432
6430
|
//RECV_KLINE_MATCH:1, //接收到形态匹配
|
|
@@ -6825,7 +6823,9 @@ var JSCHART_MENU_ID=
|
|
|
6825
6823
|
|
|
6826
6824
|
CMD_RBUTTON_SELECT_RECT_ID:53, //右键区间选择
|
|
6827
6825
|
CMD_LBUTTON_SELECT_RECT_ID:54, //左键区间选择
|
|
6828
|
-
CMD_ENABLE_XDRAG_BOTTOM_ID:55,
|
|
6826
|
+
CMD_ENABLE_XDRAG_BOTTOM_ID:55, //X轴拖动缩放
|
|
6827
|
+
|
|
6828
|
+
CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
|
|
6829
6829
|
|
|
6830
6830
|
|
|
6831
6831
|
|
|
@@ -6980,6 +6980,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6980
6980
|
this.ZoomStepPixel=5; //放大缩小手势需要的最小像素
|
|
6981
6981
|
this.TouchMoveMinAngle=70; //左右移动最小角度
|
|
6982
6982
|
this.EnableAnimation=false; //是否开启动画
|
|
6983
|
+
this.ShiftUpDownStepPixel=1*GetDevicePixelRatio(); //Shift+(up/down) 移动十字光标
|
|
6983
6984
|
|
|
6984
6985
|
//tooltip提示信息
|
|
6985
6986
|
this.Tooltip=document.createElement("div");
|
|
@@ -7080,7 +7081,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7080
7081
|
|
|
7081
7082
|
this.RestoreFocusTimer=null; //恢复焦点定时器
|
|
7082
7083
|
this.PreventRightMenu={ Timer:null, Enable:false, Delay:2000 }; //阻止右键菜单
|
|
7083
|
-
|
|
7084
|
+
|
|
7085
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
7086
|
+
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
7087
|
+
|
|
7084
7088
|
this.RestoreFocus=function(delay)
|
|
7085
7089
|
{
|
|
7086
7090
|
var value=1000;
|
|
@@ -10907,6 +10911,40 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10907
10911
|
this.UIElement.style.cursor=obj.Cursor;
|
|
10908
10912
|
}
|
|
10909
10913
|
|
|
10914
|
+
this.OnHotKeyDown=function(keyID, e) //热键触发
|
|
10915
|
+
{
|
|
10916
|
+
var item=this.FindHotKey(keyID,e);
|
|
10917
|
+
if (!item) return false;
|
|
10918
|
+
|
|
10919
|
+
this.ExecuteMenuCommand(item.CMD, item.Args);
|
|
10920
|
+
return true;
|
|
10921
|
+
}
|
|
10922
|
+
|
|
10923
|
+
this.FindHotKey=function(keyID, e)
|
|
10924
|
+
{
|
|
10925
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryHotKey)) return null;
|
|
10926
|
+
|
|
10927
|
+
for(var i=0;i<this.AryHotKey.length;++i)
|
|
10928
|
+
{
|
|
10929
|
+
var item=this.AryHotKey[i];
|
|
10930
|
+
if (keyID==item.KeyID)
|
|
10931
|
+
{
|
|
10932
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
10933
|
+
if ((item.SecondKeyID==1 && e.shiftKey) || (item.SecondKeyID==2 && e.ctrlKey) || (item.SecondKeyID==3 && e.altKey))
|
|
10934
|
+
return item;
|
|
10935
|
+
}
|
|
10936
|
+
}
|
|
10937
|
+
|
|
10938
|
+
return null;
|
|
10939
|
+
}
|
|
10940
|
+
|
|
10941
|
+
this.IsHotKey=function(keyID, e)
|
|
10942
|
+
{
|
|
10943
|
+
var item=this.FindHotKey(keyID,e);
|
|
10944
|
+
if (!item) return false;
|
|
10945
|
+
return true;
|
|
10946
|
+
}
|
|
10947
|
+
|
|
10910
10948
|
this.OnKeyDown=function(e)
|
|
10911
10949
|
{
|
|
10912
10950
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
@@ -10930,15 +10968,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10930
10968
|
draw=sendData.Draw;
|
|
10931
10969
|
}
|
|
10932
10970
|
|
|
10971
|
+
if (this.OnHotKeyDown(keyID, e))
|
|
10972
|
+
{
|
|
10973
|
+
//不让滚动条滚动
|
|
10974
|
+
if(e.preventDefault) e.preventDefault();
|
|
10975
|
+
else e.returnValue = false;
|
|
10976
|
+
return;
|
|
10977
|
+
}
|
|
10978
|
+
|
|
10933
10979
|
switch(keyID)
|
|
10934
10980
|
{
|
|
10935
10981
|
case 37: //left
|
|
10936
|
-
if (e.ctrlKey && this.OnCustomKeyDown)
|
|
10982
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
10937
10983
|
{
|
|
10938
10984
|
if (this.OnCustomKeyDown(keyID, e))
|
|
10939
10985
|
break;
|
|
10940
10986
|
}
|
|
10941
|
-
|
|
10987
|
+
|
|
10942
10988
|
if (this.CursorIndex<=0.99999)
|
|
10943
10989
|
{
|
|
10944
10990
|
if (!this.DataMoveLeft())
|
|
@@ -10963,7 +11009,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10963
11009
|
}
|
|
10964
11010
|
break;
|
|
10965
11011
|
case 39: //right
|
|
10966
|
-
if (e.ctrlKey && this.OnCustomKeyDown)
|
|
11012
|
+
if ((e.ctrlKey|| e.shiftKey) && this.OnCustomKeyDown)
|
|
10967
11013
|
{
|
|
10968
11014
|
if (this.OnCustomKeyDown(keyID, e))
|
|
10969
11015
|
break;
|
|
@@ -10999,8 +11045,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10999
11045
|
}
|
|
11000
11046
|
break;
|
|
11001
11047
|
case 38: //up
|
|
11048
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
11049
|
+
{
|
|
11050
|
+
if (this.OnCustomKeyDown(keyID, e))
|
|
11051
|
+
break;
|
|
11052
|
+
}
|
|
11002
11053
|
if (this.EnableZoomUpDown && this.EnableZoomUpDown.Keyboard===false) break;
|
|
11003
11054
|
var cursorIndex={ ZoomType:this.ZoomType, IsLockRight:this.IsZoomLockRight };
|
|
11055
|
+
if (e.ctrlKey) cursorIndex.ZoomType=1; //ctrl 十字中心缩放
|
|
11004
11056
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
11005
11057
|
if (!this.Frame.ZoomUp(cursorIndex)) break;
|
|
11006
11058
|
this.CursorIndex=cursorIndex.Index;
|
|
@@ -11013,8 +11065,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11013
11065
|
this.OnKLinePageChange("keydown");
|
|
11014
11066
|
break;
|
|
11015
11067
|
case 40: //down
|
|
11068
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
11069
|
+
{
|
|
11070
|
+
if (this.OnCustomKeyDown(keyID, e))
|
|
11071
|
+
break;
|
|
11072
|
+
}
|
|
11016
11073
|
if (this.EnableZoomUpDown && this.EnableZoomUpDown.Keyboard===false) break;
|
|
11017
11074
|
var cursorIndex={ ZoomType:this.ZoomType ,IsLockRight:this.IsZoomLockRight };
|
|
11075
|
+
if (e.ctrlKey) cursorIndex.ZoomType=1; //ctrl 十字中心缩放
|
|
11018
11076
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
11019
11077
|
if (!this.Frame.ZoomDown(cursorIndex, { ZoomDownloadDataCallback:(requestData)=>{ this.ZoomDownloadData(requestData) } })) break;
|
|
11020
11078
|
|
|
@@ -13025,6 +13083,43 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
13025
13083
|
return width;
|
|
13026
13084
|
}
|
|
13027
13085
|
|
|
13086
|
+
this.GetChartPaintByClassName=function(name)
|
|
13087
|
+
{
|
|
13088
|
+
var aryData=[];
|
|
13089
|
+
for(var i=0;i<this.ChartPaint.length;++i)
|
|
13090
|
+
{
|
|
13091
|
+
var item=this.ChartPaint[i];
|
|
13092
|
+
if (item.ClassName==name)
|
|
13093
|
+
{
|
|
13094
|
+
var frameID=null;
|
|
13095
|
+
if (item.ChartFrame) frameID=item.ChartFrame.Identify;
|
|
13096
|
+
aryData.push({ IsOverlay:false, Chart:item, FrameID:frameID });
|
|
13097
|
+
}
|
|
13098
|
+
}
|
|
13099
|
+
|
|
13100
|
+
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
13101
|
+
{
|
|
13102
|
+
var subItem=this.Frame.SubFrame[i];
|
|
13103
|
+
if (!subItem) continue;
|
|
13104
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(subItem.OverlayIndex)) continue;
|
|
13105
|
+
|
|
13106
|
+
for(var j=0;j<subItem.OverlayIndex.length;++j)
|
|
13107
|
+
{
|
|
13108
|
+
var item=subItem.OverlayIndex[j];
|
|
13109
|
+
for(var k=0;k<item.ChartPaint.length;++k)
|
|
13110
|
+
{
|
|
13111
|
+
var chartItem=item.ChartPaint[k];
|
|
13112
|
+
if (chartItem.ClassName==name)
|
|
13113
|
+
{
|
|
13114
|
+
aryData.push({ IsOverlay:true, Chart:chartItem, FrameID:subItem.Frame.Identify, SubFrameID:j });
|
|
13115
|
+
}
|
|
13116
|
+
}
|
|
13117
|
+
}
|
|
13118
|
+
}
|
|
13119
|
+
|
|
13120
|
+
return aryData;
|
|
13121
|
+
}
|
|
13122
|
+
|
|
13028
13123
|
//删除扩展画法
|
|
13029
13124
|
this.DeleteExtendChart=function(data)
|
|
13030
13125
|
{
|
|
@@ -14408,6 +14503,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14408
14503
|
case JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID:
|
|
14409
14504
|
if (IFrameSplitOperator.IsBool(srcParam)) this.EnableXDrag.Bottom=srcParam;
|
|
14410
14505
|
break;
|
|
14506
|
+
case JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID:
|
|
14507
|
+
this.FullScreenSummary();
|
|
14508
|
+
break;
|
|
14411
14509
|
}
|
|
14412
14510
|
}
|
|
14413
14511
|
|
|
@@ -14964,6 +15062,63 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14964
15062
|
this.Draw();
|
|
14965
15063
|
}
|
|
14966
15064
|
}
|
|
15065
|
+
|
|
15066
|
+
this.MoveCorssCursorUp=function(step)
|
|
15067
|
+
{
|
|
15068
|
+
if (!IFrameSplitOperator.IsNumber(this.LastPoint.Y)) return;
|
|
15069
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
15070
|
+
var top=border.TopEx;
|
|
15071
|
+
if (this.LastPoint.Y-step<=top) return;
|
|
15072
|
+
|
|
15073
|
+
this.LastPoint.Y-=step;
|
|
15074
|
+
this.DrawDynamicInfo();
|
|
15075
|
+
}
|
|
15076
|
+
|
|
15077
|
+
this.MoveCorssCursorDown=function(step)
|
|
15078
|
+
{
|
|
15079
|
+
if (!IFrameSplitOperator.IsNumber(this.LastPoint.Y)) return;
|
|
15080
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
15081
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
15082
|
+
var bottom=border.BottomEx;
|
|
15083
|
+
if (this.LastPoint.Y+step>=bottom) return;
|
|
15084
|
+
|
|
15085
|
+
this.LastPoint.Y+=step;
|
|
15086
|
+
this.DrawDynamicInfo();
|
|
15087
|
+
}
|
|
15088
|
+
|
|
15089
|
+
//整屏区间统计
|
|
15090
|
+
this.FullScreenSummary=function()
|
|
15091
|
+
{
|
|
15092
|
+
var kData=this.GetKData();
|
|
15093
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return false;
|
|
15094
|
+
|
|
15095
|
+
var paint=this.GetRectSelectPaint();
|
|
15096
|
+
if (!paint) return false;
|
|
15097
|
+
|
|
15098
|
+
var xPointcount=0;
|
|
15099
|
+
if (this.Frame.XPointCount) xPointcount=this.Frame.XPointCount;
|
|
15100
|
+
else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;
|
|
15101
|
+
if (!IFrameSplitOperator.IsPlusNumber(xPointcount)) return false;
|
|
15102
|
+
|
|
15103
|
+
var startIndex=kData.DataOffset;
|
|
15104
|
+
var endIndex=startIndex+xPointcount;
|
|
15105
|
+
this.UpdateSelectRect(startIndex, endIndex);
|
|
15106
|
+
|
|
15107
|
+
var selectData=paint.GetSelectRectData();
|
|
15108
|
+
var border=this.Frame.SubFrame[0].Frame.GetBorder();
|
|
15109
|
+
|
|
15110
|
+
var data=
|
|
15111
|
+
{
|
|
15112
|
+
X:border.ChartWidth/2, Y:border.ChartHeight/2,
|
|
15113
|
+
SelectData:selectData, //区间选择的数据
|
|
15114
|
+
RectSelectPaint:paint //区间选择背景
|
|
15115
|
+
}
|
|
15116
|
+
|
|
15117
|
+
var e={ data:data };
|
|
15118
|
+
if (this.DialogSelectRect) this.DrawSelectRectDialog(e);
|
|
15119
|
+
|
|
15120
|
+
return true;
|
|
15121
|
+
}
|
|
14967
15122
|
}
|
|
14968
15123
|
|
|
14969
15124
|
function GetDevicePixelRatio()
|
|
@@ -46611,7 +46766,7 @@ function ChartMultiSVGIconV2()
|
|
|
46611
46766
|
if (IFrameSplitOperator.IsString(item.Value)) value=this.GetKValue(kItem,item.Value);
|
|
46612
46767
|
if (!IFrameSplitOperator.IsNumber(value)) continue;
|
|
46613
46768
|
|
|
46614
|
-
var y=this.ChartFrame.GetYFromData(
|
|
46769
|
+
var y=this.ChartFrame.GetYFromData(value,false);
|
|
46615
46770
|
|
|
46616
46771
|
if (item.Image)
|
|
46617
46772
|
{
|
|
@@ -80046,7 +80201,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80046
80201
|
this.ChartDrawStorageCache=null; //首次需要创建的画图工具数据
|
|
80047
80202
|
this.RightSpaceCount=0; //右侧空白个数
|
|
80048
80203
|
this.SourceDataLimit=new Map(); //每个周期缓存数据最大个数 key=周期 value=最大个数
|
|
80049
|
-
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
80204
|
+
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
80205
|
+
this.ShiftMoveStep=1; //Shift+(Left/Right) 移动K线
|
|
80050
80206
|
|
|
80051
80207
|
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:, Position:0=left 1=center }
|
|
80052
80208
|
this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
|
|
@@ -80100,6 +80256,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80100
80256
|
this.ScrollBar=null; //横向滚动条
|
|
80101
80257
|
this.IsAutoSyncDataOffset=true; //增量更新时,是否移动当前屏数据
|
|
80102
80258
|
|
|
80259
|
+
//热键
|
|
80260
|
+
this.AryHotKey=
|
|
80261
|
+
[
|
|
80262
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
80263
|
+
{ KeyID:87, SecondKeyID:3, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
80264
|
+
]
|
|
80265
|
+
|
|
80103
80266
|
this.GetKLineCalulate=function()
|
|
80104
80267
|
{
|
|
80105
80268
|
var kLineDrawType=this.GetKLineDrawType();
|
|
@@ -81137,7 +81300,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81137
81300
|
this.PopMinuteChart.Show({ Date:date, Symbol:symbol, Data:data.Tooltip.Data, Chart:data.Tooltip.ChartPaint }, x/pixelRatio,y/pixelRatio);
|
|
81138
81301
|
}
|
|
81139
81302
|
|
|
81140
|
-
|
|
81303
|
+
//Alt+W 区间统计
|
|
81304
|
+
//Alt+数字 切换多个窗口
|
|
81305
|
+
//Ctrl+I
|
|
81141
81306
|
this.OnCustomKeyDown=function(keyID, e) //自定义键盘事件
|
|
81142
81307
|
{
|
|
81143
81308
|
if (keyID==37 && e.ctrlKey) //Ctrl+Left
|
|
@@ -81150,12 +81315,89 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
81150
81315
|
this.MoveCorssCursorRight(this.CtrlMoveStep);
|
|
81151
81316
|
return true;
|
|
81152
81317
|
}
|
|
81318
|
+
else if (keyID==37 && e.shiftKey) //shift+Left 移动K线
|
|
81319
|
+
{
|
|
81320
|
+
this.MoveKLineLeft(this.ShiftMoveStep);
|
|
81321
|
+
return true;
|
|
81322
|
+
}
|
|
81323
|
+
else if (keyID==39 && e.shiftKey) //shift+Right 移动K线
|
|
81324
|
+
{
|
|
81325
|
+
this.MoveKLineRight(this.ShiftMoveStep);
|
|
81326
|
+
return true;
|
|
81327
|
+
}
|
|
81328
|
+
else if (keyID==38 && e.shiftKey) //shift+up 上移十字光标
|
|
81329
|
+
{
|
|
81330
|
+
this.MoveCorssCursorUp(this.ShiftUpDownStepPixel);
|
|
81331
|
+
return true;
|
|
81332
|
+
}
|
|
81333
|
+
else if (keyID==40 && e.shiftKey) //shift+down 下移十字光标
|
|
81334
|
+
{
|
|
81335
|
+
this.MoveCorssCursorDown(this.ShiftUpDownStepPixel);
|
|
81336
|
+
return true;
|
|
81337
|
+
}
|
|
81153
81338
|
else
|
|
81154
81339
|
{
|
|
81155
81340
|
return false;
|
|
81156
81341
|
}
|
|
81157
81342
|
}
|
|
81158
81343
|
|
|
81344
|
+
this.MoveKLineLeft=function(value)
|
|
81345
|
+
{
|
|
81346
|
+
return this.MoveKLine(-value);
|
|
81347
|
+
}
|
|
81348
|
+
|
|
81349
|
+
this.MoveKLineRight=function(value)
|
|
81350
|
+
{
|
|
81351
|
+
return this.MoveKLine(value);
|
|
81352
|
+
}
|
|
81353
|
+
|
|
81354
|
+
this.MoveKLine=function(step)
|
|
81355
|
+
{
|
|
81356
|
+
if (step==0) return;
|
|
81357
|
+
|
|
81358
|
+
var oneStepWidth=this.GetMoveOneStepWidth();
|
|
81359
|
+
var moveSetp=step*oneStepWidth;
|
|
81360
|
+
var bLeft=true;
|
|
81361
|
+
if (step<0)
|
|
81362
|
+
{
|
|
81363
|
+
moveSetp=Math.abs(step)*oneStepWidth;
|
|
81364
|
+
bLeft=false;
|
|
81365
|
+
}
|
|
81366
|
+
|
|
81367
|
+
if(!this.DataMove(moveSetp,bLeft)) return;
|
|
81368
|
+
|
|
81369
|
+
this.UpdataDataoffset();
|
|
81370
|
+
this.RepairCursorIndex();
|
|
81371
|
+
this.UpdatePointByCursorIndex(); //推拽数据的时候不需要把鼠标位置更新到K线上
|
|
81372
|
+
this.UpdateFrameMaxMin();
|
|
81373
|
+
this.ResetFrameXYSplit();
|
|
81374
|
+
this.Draw();
|
|
81375
|
+
this.ShowTooltipByKeyDown();
|
|
81376
|
+
this.OnKLinePageChange("datamove");
|
|
81377
|
+
}
|
|
81378
|
+
|
|
81379
|
+
//修复 当前数据索引大于数据个数的请求
|
|
81380
|
+
this.RepairCursorIndex=function()
|
|
81381
|
+
{
|
|
81382
|
+
var kData=this.GetKData();
|
|
81383
|
+
if (!kData) return;
|
|
81384
|
+
|
|
81385
|
+
var xPointcount=0;
|
|
81386
|
+
if (this.Frame.XPointCount) xPointcount=this.Frame.XPointCount;
|
|
81387
|
+
else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;
|
|
81388
|
+
if (!IFrameSplitOperator.IsPlusNumber(xPointcount)) return;
|
|
81389
|
+
|
|
81390
|
+
if (this.CursorIndex<0) this.CursorIndex=0;
|
|
81391
|
+
|
|
81392
|
+
var index=this.CursorIndex;
|
|
81393
|
+
index=parseInt(index.toFixed(0));
|
|
81394
|
+
|
|
81395
|
+
if (index+kData.DataOffset>=kData.Data.length)
|
|
81396
|
+
{
|
|
81397
|
+
this.CursorIndex=kData.Data.length-1-kData.DataOffset;
|
|
81398
|
+
}
|
|
81399
|
+
}
|
|
81400
|
+
|
|
81159
81401
|
this.MoveCorssCursorLeft=function(step)
|
|
81160
81402
|
{
|
|
81161
81403
|
var data=null;
|
|
@@ -88475,6 +88717,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
88475
88717
|
this.BaselineType=0; //基准线类型 0=最新昨收盘 1=多日前昨收盘
|
|
88476
88718
|
this.EnableNightDayBG=false; //是否启动夜盘背景色
|
|
88477
88719
|
|
|
88720
|
+
//热键
|
|
88721
|
+
this.AryHotKey=
|
|
88722
|
+
[
|
|
88723
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
88724
|
+
{ KeyID:87, SecondKeyID:3, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
88725
|
+
]
|
|
88726
|
+
|
|
88478
88727
|
//集合竞价设置 obj={ Left:true/false, Right:true/false, MultiDay:{Left:, Right:} }
|
|
88479
88728
|
this.SetCallCationDataBorder=function(obj)
|
|
88480
88729
|
{
|
|
@@ -89979,6 +90228,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89979
90228
|
draw=sendData.Draw;
|
|
89980
90229
|
}
|
|
89981
90230
|
|
|
90231
|
+
if (this.OnHotKeyDown(keyID, e))
|
|
90232
|
+
{
|
|
90233
|
+
//不让滚动条滚动
|
|
90234
|
+
if(e.preventDefault) e.preventDefault();
|
|
90235
|
+
else e.returnValue = false;
|
|
90236
|
+
return;
|
|
90237
|
+
}
|
|
90238
|
+
|
|
89982
90239
|
switch(keyID)
|
|
89983
90240
|
{
|
|
89984
90241
|
case 37: //left
|
|
@@ -90092,6 +90349,11 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90092
90349
|
this.CurrentChartDrawPicture=null;
|
|
90093
90350
|
}
|
|
90094
90351
|
break;
|
|
90352
|
+
case 38:
|
|
90353
|
+
case 40:
|
|
90354
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
90355
|
+
this.OnCustomKeyDown(keyID, e)
|
|
90356
|
+
break;
|
|
90095
90357
|
default:
|
|
90096
90358
|
return;
|
|
90097
90359
|
}
|
|
@@ -90103,6 +90365,24 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
90103
90365
|
else e.returnValue = false;
|
|
90104
90366
|
}
|
|
90105
90367
|
|
|
90368
|
+
this.OnCustomKeyDown=function(keyID, e) //自定义键盘事件
|
|
90369
|
+
{
|
|
90370
|
+
if (keyID==38 && e.shiftKey) //shift+up 上移十字光标
|
|
90371
|
+
{
|
|
90372
|
+
this.MoveCorssCursorUp(this.ShiftUpDownStepPixel);
|
|
90373
|
+
return true;
|
|
90374
|
+
}
|
|
90375
|
+
else if (keyID==40 && e.shiftKey) //shift+down 下移十字光标
|
|
90376
|
+
{
|
|
90377
|
+
this.MoveCorssCursorDown(this.ShiftUpDownStepPixel);
|
|
90378
|
+
return true;
|
|
90379
|
+
}
|
|
90380
|
+
else
|
|
90381
|
+
{
|
|
90382
|
+
return false;
|
|
90383
|
+
}
|
|
90384
|
+
}
|
|
90385
|
+
|
|
90106
90386
|
/*
|
|
90107
90387
|
this.OnMarkRectSelect=function(e)
|
|
90108
90388
|
{
|
|
@@ -128813,6 +129093,19 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
128813
129093
|
|
|
128814
129094
|
result.push(outVarItem);
|
|
128815
129095
|
}
|
|
129096
|
+
else if (draw.DrawType=="DRAWTEXT_LINE")
|
|
129097
|
+
{
|
|
129098
|
+
drawItem.Name=draw.Name;
|
|
129099
|
+
drawItem.Type=draw.Type;
|
|
129100
|
+
|
|
129101
|
+
drawItem.DrawType=draw.DrawType;
|
|
129102
|
+
drawItem.DrawData=draw.DrawData; //{ Price:, Text:{ Title:text, Color:textcolor }, Line:{ Type:linetype, Color:linecolor } };
|
|
129103
|
+
|
|
129104
|
+
outVarItem.Draw=drawItem;
|
|
129105
|
+
if (draw.Font) outVarItem.Font=draw.Font;
|
|
129106
|
+
|
|
129107
|
+
result.push(outVarItem);
|
|
129108
|
+
}
|
|
128816
129109
|
else
|
|
128817
129110
|
{
|
|
128818
129111
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
|
@@ -144946,7 +145239,7 @@ function ScrollBarBGChart()
|
|
|
144946
145239
|
|
|
144947
145240
|
|
|
144948
145241
|
|
|
144949
|
-
var HQCHART_VERSION="1.1.
|
|
145242
|
+
var HQCHART_VERSION="1.1.14575";
|
|
144950
145243
|
|
|
144951
145244
|
function PrintHQChartVersion()
|
|
144952
145245
|
{
|