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
|
@@ -25772,6 +25772,19 @@ function APIScriptIndex(name,script,args,option, isOverlay)
|
|
|
25772
25772
|
|
|
25773
25773
|
result.push(outVarItem);
|
|
25774
25774
|
}
|
|
25775
|
+
else if (draw.DrawType=="DRAWTEXT_LINE")
|
|
25776
|
+
{
|
|
25777
|
+
drawItem.Name=draw.Name;
|
|
25778
|
+
drawItem.Type=draw.Type;
|
|
25779
|
+
|
|
25780
|
+
drawItem.DrawType=draw.DrawType;
|
|
25781
|
+
drawItem.DrawData=draw.DrawData; //{ Price:, Text:{ Title:text, Color:textcolor }, Line:{ Type:linetype, Color:linecolor } };
|
|
25782
|
+
|
|
25783
|
+
outVarItem.Draw=drawItem;
|
|
25784
|
+
if (draw.Font) outVarItem.Font=draw.Font;
|
|
25785
|
+
|
|
25786
|
+
result.push(outVarItem);
|
|
25787
|
+
}
|
|
25775
25788
|
else
|
|
25776
25789
|
{
|
|
25777
25790
|
var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
|
package/src/jscommon/umychart.js
CHANGED
|
@@ -289,6 +289,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
289
289
|
if (IFrameSplitOperator.IsBool(option.EnableZoomIndexWindow)) chart.EnableZoomIndexWindow=option.EnableZoomIndexWindow;
|
|
290
290
|
if (IFrameSplitOperator.IsBool(option.IsDrawPictureXY)) chart.IsDrawPictureXY=option.IsDrawPictureXY;
|
|
291
291
|
if (IFrameSplitOperator.IsNumber(option.CtrlMoveStep)) chart.CtrlMoveStep=option.CtrlMoveStep;
|
|
292
|
+
if (IFrameSplitOperator.IsNumber(option.ShiftMoveStep)) chart.ShiftMoveStep=option.ShiftMoveStep;
|
|
292
293
|
if (IFrameSplitOperator.IsBool(option.EnableIndexChartDrag)) chart.EnableIndexChartDrag=option.EnableIndexChartDrag;
|
|
293
294
|
if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
|
|
294
295
|
|
|
@@ -2499,9 +2500,6 @@ JSChart.GetfloatPrecision=function(symbol)
|
|
|
2499
2500
|
return GetfloatPrecision(symbol);
|
|
2500
2501
|
}
|
|
2501
2502
|
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
2503
|
var JSCHART_EVENT_ID=
|
|
2506
2504
|
{
|
|
2507
2505
|
//RECV_KLINE_MATCH:1, //接收到形态匹配
|
|
@@ -2900,7 +2898,9 @@ var JSCHART_MENU_ID=
|
|
|
2900
2898
|
|
|
2901
2899
|
CMD_RBUTTON_SELECT_RECT_ID:53, //右键区间选择
|
|
2902
2900
|
CMD_LBUTTON_SELECT_RECT_ID:54, //左键区间选择
|
|
2903
|
-
CMD_ENABLE_XDRAG_BOTTOM_ID:55,
|
|
2901
|
+
CMD_ENABLE_XDRAG_BOTTOM_ID:55, //X轴拖动缩放
|
|
2902
|
+
|
|
2903
|
+
CMD_FULLSCREEN_SUMMARY_ID:56, //当前屏区间统计
|
|
2904
2904
|
|
|
2905
2905
|
|
|
2906
2906
|
|
|
@@ -3055,6 +3055,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3055
3055
|
this.ZoomStepPixel=5; //放大缩小手势需要的最小像素
|
|
3056
3056
|
this.TouchMoveMinAngle=70; //左右移动最小角度
|
|
3057
3057
|
this.EnableAnimation=false; //是否开启动画
|
|
3058
|
+
this.ShiftUpDownStepPixel=1*GetDevicePixelRatio(); //Shift+(up/down) 移动十字光标
|
|
3058
3059
|
|
|
3059
3060
|
//tooltip提示信息
|
|
3060
3061
|
this.Tooltip=document.createElement("div");
|
|
@@ -3155,7 +3156,10 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3155
3156
|
|
|
3156
3157
|
this.RestoreFocusTimer=null; //恢复焦点定时器
|
|
3157
3158
|
this.PreventRightMenu={ Timer:null, Enable:false, Delay:2000 }; //阻止右键菜单
|
|
3158
|
-
|
|
3159
|
+
|
|
3160
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
3161
|
+
this.AryHotKey=[]; //热键 { KeyID:87, SecondKeyID:1, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
3162
|
+
|
|
3159
3163
|
this.RestoreFocus=function(delay)
|
|
3160
3164
|
{
|
|
3161
3165
|
var value=1000;
|
|
@@ -6982,6 +6986,40 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6982
6986
|
this.UIElement.style.cursor=obj.Cursor;
|
|
6983
6987
|
}
|
|
6984
6988
|
|
|
6989
|
+
this.OnHotKeyDown=function(keyID, e) //热键触发
|
|
6990
|
+
{
|
|
6991
|
+
var item=this.FindHotKey(keyID,e);
|
|
6992
|
+
if (!item) return false;
|
|
6993
|
+
|
|
6994
|
+
this.ExecuteMenuCommand(item.CMD, item.Args);
|
|
6995
|
+
return true;
|
|
6996
|
+
}
|
|
6997
|
+
|
|
6998
|
+
this.FindHotKey=function(keyID, e)
|
|
6999
|
+
{
|
|
7000
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.AryHotKey)) return null;
|
|
7001
|
+
|
|
7002
|
+
for(var i=0;i<this.AryHotKey.length;++i)
|
|
7003
|
+
{
|
|
7004
|
+
var item=this.AryHotKey[i];
|
|
7005
|
+
if (keyID==item.KeyID)
|
|
7006
|
+
{
|
|
7007
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
7008
|
+
if ((item.SecondKeyID==1 && e.shiftKey) || (item.SecondKeyID==2 && e.ctrlKey) || (item.SecondKeyID==3 && e.altKey))
|
|
7009
|
+
return item;
|
|
7010
|
+
}
|
|
7011
|
+
}
|
|
7012
|
+
|
|
7013
|
+
return null;
|
|
7014
|
+
}
|
|
7015
|
+
|
|
7016
|
+
this.IsHotKey=function(keyID, e)
|
|
7017
|
+
{
|
|
7018
|
+
var item=this.FindHotKey(keyID,e);
|
|
7019
|
+
if (!item) return false;
|
|
7020
|
+
return true;
|
|
7021
|
+
}
|
|
7022
|
+
|
|
6985
7023
|
this.OnKeyDown=function(e)
|
|
6986
7024
|
{
|
|
6987
7025
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
@@ -7005,15 +7043,23 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7005
7043
|
draw=sendData.Draw;
|
|
7006
7044
|
}
|
|
7007
7045
|
|
|
7046
|
+
if (this.OnHotKeyDown(keyID, e))
|
|
7047
|
+
{
|
|
7048
|
+
//不让滚动条滚动
|
|
7049
|
+
if(e.preventDefault) e.preventDefault();
|
|
7050
|
+
else e.returnValue = false;
|
|
7051
|
+
return;
|
|
7052
|
+
}
|
|
7053
|
+
|
|
7008
7054
|
switch(keyID)
|
|
7009
7055
|
{
|
|
7010
7056
|
case 37: //left
|
|
7011
|
-
if (e.ctrlKey && this.OnCustomKeyDown)
|
|
7057
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
7012
7058
|
{
|
|
7013
7059
|
if (this.OnCustomKeyDown(keyID, e))
|
|
7014
7060
|
break;
|
|
7015
7061
|
}
|
|
7016
|
-
|
|
7062
|
+
|
|
7017
7063
|
if (this.CursorIndex<=0.99999)
|
|
7018
7064
|
{
|
|
7019
7065
|
if (!this.DataMoveLeft())
|
|
@@ -7038,7 +7084,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7038
7084
|
}
|
|
7039
7085
|
break;
|
|
7040
7086
|
case 39: //right
|
|
7041
|
-
if (e.ctrlKey && this.OnCustomKeyDown)
|
|
7087
|
+
if ((e.ctrlKey|| e.shiftKey) && this.OnCustomKeyDown)
|
|
7042
7088
|
{
|
|
7043
7089
|
if (this.OnCustomKeyDown(keyID, e))
|
|
7044
7090
|
break;
|
|
@@ -7074,8 +7120,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7074
7120
|
}
|
|
7075
7121
|
break;
|
|
7076
7122
|
case 38: //up
|
|
7123
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
7124
|
+
{
|
|
7125
|
+
if (this.OnCustomKeyDown(keyID, e))
|
|
7126
|
+
break;
|
|
7127
|
+
}
|
|
7077
7128
|
if (this.EnableZoomUpDown && this.EnableZoomUpDown.Keyboard===false) break;
|
|
7078
7129
|
var cursorIndex={ ZoomType:this.ZoomType, IsLockRight:this.IsZoomLockRight };
|
|
7130
|
+
if (e.ctrlKey) cursorIndex.ZoomType=1; //ctrl 十字中心缩放
|
|
7079
7131
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
7080
7132
|
if (!this.Frame.ZoomUp(cursorIndex)) break;
|
|
7081
7133
|
this.CursorIndex=cursorIndex.Index;
|
|
@@ -7088,8 +7140,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7088
7140
|
this.OnKLinePageChange("keydown");
|
|
7089
7141
|
break;
|
|
7090
7142
|
case 40: //down
|
|
7143
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
7144
|
+
{
|
|
7145
|
+
if (this.OnCustomKeyDown(keyID, e))
|
|
7146
|
+
break;
|
|
7147
|
+
}
|
|
7091
7148
|
if (this.EnableZoomUpDown && this.EnableZoomUpDown.Keyboard===false) break;
|
|
7092
7149
|
var cursorIndex={ ZoomType:this.ZoomType ,IsLockRight:this.IsZoomLockRight };
|
|
7150
|
+
if (e.ctrlKey) cursorIndex.ZoomType=1; //ctrl 十字中心缩放
|
|
7093
7151
|
cursorIndex.Index=parseInt(Math.abs(this.CursorIndex-0.5).toFixed(0));
|
|
7094
7152
|
if (!this.Frame.ZoomDown(cursorIndex, { ZoomDownloadDataCallback:(requestData)=>{ this.ZoomDownloadData(requestData) } })) break;
|
|
7095
7153
|
|
|
@@ -9100,6 +9158,43 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9100
9158
|
return width;
|
|
9101
9159
|
}
|
|
9102
9160
|
|
|
9161
|
+
this.GetChartPaintByClassName=function(name)
|
|
9162
|
+
{
|
|
9163
|
+
var aryData=[];
|
|
9164
|
+
for(var i=0;i<this.ChartPaint.length;++i)
|
|
9165
|
+
{
|
|
9166
|
+
var item=this.ChartPaint[i];
|
|
9167
|
+
if (item.ClassName==name)
|
|
9168
|
+
{
|
|
9169
|
+
var frameID=null;
|
|
9170
|
+
if (item.ChartFrame) frameID=item.ChartFrame.Identify;
|
|
9171
|
+
aryData.push({ IsOverlay:false, Chart:item, FrameID:frameID });
|
|
9172
|
+
}
|
|
9173
|
+
}
|
|
9174
|
+
|
|
9175
|
+
for(var i=0;i<this.Frame.SubFrame.length;++i)
|
|
9176
|
+
{
|
|
9177
|
+
var subItem=this.Frame.SubFrame[i];
|
|
9178
|
+
if (!subItem) continue;
|
|
9179
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(subItem.OverlayIndex)) continue;
|
|
9180
|
+
|
|
9181
|
+
for(var j=0;j<subItem.OverlayIndex.length;++j)
|
|
9182
|
+
{
|
|
9183
|
+
var item=subItem.OverlayIndex[j];
|
|
9184
|
+
for(var k=0;k<item.ChartPaint.length;++k)
|
|
9185
|
+
{
|
|
9186
|
+
var chartItem=item.ChartPaint[k];
|
|
9187
|
+
if (chartItem.ClassName==name)
|
|
9188
|
+
{
|
|
9189
|
+
aryData.push({ IsOverlay:true, Chart:chartItem, FrameID:subItem.Frame.Identify, SubFrameID:j });
|
|
9190
|
+
}
|
|
9191
|
+
}
|
|
9192
|
+
}
|
|
9193
|
+
}
|
|
9194
|
+
|
|
9195
|
+
return aryData;
|
|
9196
|
+
}
|
|
9197
|
+
|
|
9103
9198
|
//删除扩展画法
|
|
9104
9199
|
this.DeleteExtendChart=function(data)
|
|
9105
9200
|
{
|
|
@@ -10483,6 +10578,9 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10483
10578
|
case JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID:
|
|
10484
10579
|
if (IFrameSplitOperator.IsBool(srcParam)) this.EnableXDrag.Bottom=srcParam;
|
|
10485
10580
|
break;
|
|
10581
|
+
case JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID:
|
|
10582
|
+
this.FullScreenSummary();
|
|
10583
|
+
break;
|
|
10486
10584
|
}
|
|
10487
10585
|
}
|
|
10488
10586
|
|
|
@@ -11039,6 +11137,63 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11039
11137
|
this.Draw();
|
|
11040
11138
|
}
|
|
11041
11139
|
}
|
|
11140
|
+
|
|
11141
|
+
this.MoveCorssCursorUp=function(step)
|
|
11142
|
+
{
|
|
11143
|
+
if (!IFrameSplitOperator.IsNumber(this.LastPoint.Y)) return;
|
|
11144
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
11145
|
+
var top=border.TopEx;
|
|
11146
|
+
if (this.LastPoint.Y-step<=top) return;
|
|
11147
|
+
|
|
11148
|
+
this.LastPoint.Y-=step;
|
|
11149
|
+
this.DrawDynamicInfo();
|
|
11150
|
+
}
|
|
11151
|
+
|
|
11152
|
+
this.MoveCorssCursorDown=function(step)
|
|
11153
|
+
{
|
|
11154
|
+
if (!IFrameSplitOperator.IsNumber(this.LastPoint.Y)) return;
|
|
11155
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
11156
|
+
var border=this.Frame.ChartBorder.GetBorder();
|
|
11157
|
+
var bottom=border.BottomEx;
|
|
11158
|
+
if (this.LastPoint.Y+step>=bottom) return;
|
|
11159
|
+
|
|
11160
|
+
this.LastPoint.Y+=step;
|
|
11161
|
+
this.DrawDynamicInfo();
|
|
11162
|
+
}
|
|
11163
|
+
|
|
11164
|
+
//整屏区间统计
|
|
11165
|
+
this.FullScreenSummary=function()
|
|
11166
|
+
{
|
|
11167
|
+
var kData=this.GetKData();
|
|
11168
|
+
if (!kData || !IFrameSplitOperator.IsNonEmptyArray(kData.Data)) return false;
|
|
11169
|
+
|
|
11170
|
+
var paint=this.GetRectSelectPaint();
|
|
11171
|
+
if (!paint) return false;
|
|
11172
|
+
|
|
11173
|
+
var xPointcount=0;
|
|
11174
|
+
if (this.Frame.XPointCount) xPointcount=this.Frame.XPointCount;
|
|
11175
|
+
else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;
|
|
11176
|
+
if (!IFrameSplitOperator.IsPlusNumber(xPointcount)) return false;
|
|
11177
|
+
|
|
11178
|
+
var startIndex=kData.DataOffset;
|
|
11179
|
+
var endIndex=startIndex+xPointcount;
|
|
11180
|
+
this.UpdateSelectRect(startIndex, endIndex);
|
|
11181
|
+
|
|
11182
|
+
var selectData=paint.GetSelectRectData();
|
|
11183
|
+
var border=this.Frame.SubFrame[0].Frame.GetBorder();
|
|
11184
|
+
|
|
11185
|
+
var data=
|
|
11186
|
+
{
|
|
11187
|
+
X:border.ChartWidth/2, Y:border.ChartHeight/2,
|
|
11188
|
+
SelectData:selectData, //区间选择的数据
|
|
11189
|
+
RectSelectPaint:paint //区间选择背景
|
|
11190
|
+
}
|
|
11191
|
+
|
|
11192
|
+
var e={ data:data };
|
|
11193
|
+
if (this.DialogSelectRect) this.DrawSelectRectDialog(e);
|
|
11194
|
+
|
|
11195
|
+
return true;
|
|
11196
|
+
}
|
|
11042
11197
|
}
|
|
11043
11198
|
|
|
11044
11199
|
function GetDevicePixelRatio()
|
|
@@ -42686,7 +42841,7 @@ function ChartMultiSVGIconV2()
|
|
|
42686
42841
|
if (IFrameSplitOperator.IsString(item.Value)) value=this.GetKValue(kItem,item.Value);
|
|
42687
42842
|
if (!IFrameSplitOperator.IsNumber(value)) continue;
|
|
42688
42843
|
|
|
42689
|
-
var y=this.ChartFrame.GetYFromData(
|
|
42844
|
+
var y=this.ChartFrame.GetYFromData(value,false);
|
|
42690
42845
|
|
|
42691
42846
|
if (item.Image)
|
|
42692
42847
|
{
|
|
@@ -76121,7 +76276,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76121
76276
|
this.ChartDrawStorageCache=null; //首次需要创建的画图工具数据
|
|
76122
76277
|
this.RightSpaceCount=0; //右侧空白个数
|
|
76123
76278
|
this.SourceDataLimit=new Map(); //每个周期缓存数据最大个数 key=周期 value=最大个数
|
|
76124
|
-
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
76279
|
+
this.CtrlMoveStep=5; //Ctrl+(Left/Right) 移动数据个数
|
|
76280
|
+
this.ShiftMoveStep=1; //Shift+(Left/Right) 移动K线
|
|
76125
76281
|
|
|
76126
76282
|
this.CustomShow=null; //首先显示的K线的起始日期 { Date:日期, Time:时间, PageSize:, Callback:, Position:0=left 1=center }
|
|
76127
76283
|
this.ZoomType=0; //缩放模式 0=最右边固定缩放, 1=十字光标两边缩放
|
|
@@ -76175,6 +76331,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
76175
76331
|
this.ScrollBar=null; //横向滚动条
|
|
76176
76332
|
this.IsAutoSyncDataOffset=true; //增量更新时,是否移动当前屏数据
|
|
76177
76333
|
|
|
76334
|
+
//热键
|
|
76335
|
+
this.AryHotKey=
|
|
76336
|
+
[
|
|
76337
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
76338
|
+
{ KeyID:87, SecondKeyID:3, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
76339
|
+
]
|
|
76340
|
+
|
|
76178
76341
|
this.GetKLineCalulate=function()
|
|
76179
76342
|
{
|
|
76180
76343
|
var kLineDrawType=this.GetKLineDrawType();
|
|
@@ -77212,7 +77375,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77212
77375
|
this.PopMinuteChart.Show({ Date:date, Symbol:symbol, Data:data.Tooltip.Data, Chart:data.Tooltip.ChartPaint }, x/pixelRatio,y/pixelRatio);
|
|
77213
77376
|
}
|
|
77214
77377
|
|
|
77215
|
-
|
|
77378
|
+
//Alt+W 区间统计
|
|
77379
|
+
//Alt+数字 切换多个窗口
|
|
77380
|
+
//Ctrl+I
|
|
77216
77381
|
this.OnCustomKeyDown=function(keyID, e) //自定义键盘事件
|
|
77217
77382
|
{
|
|
77218
77383
|
if (keyID==37 && e.ctrlKey) //Ctrl+Left
|
|
@@ -77225,12 +77390,89 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77225
77390
|
this.MoveCorssCursorRight(this.CtrlMoveStep);
|
|
77226
77391
|
return true;
|
|
77227
77392
|
}
|
|
77393
|
+
else if (keyID==37 && e.shiftKey) //shift+Left 移动K线
|
|
77394
|
+
{
|
|
77395
|
+
this.MoveKLineLeft(this.ShiftMoveStep);
|
|
77396
|
+
return true;
|
|
77397
|
+
}
|
|
77398
|
+
else if (keyID==39 && e.shiftKey) //shift+Right 移动K线
|
|
77399
|
+
{
|
|
77400
|
+
this.MoveKLineRight(this.ShiftMoveStep);
|
|
77401
|
+
return true;
|
|
77402
|
+
}
|
|
77403
|
+
else if (keyID==38 && e.shiftKey) //shift+up 上移十字光标
|
|
77404
|
+
{
|
|
77405
|
+
this.MoveCorssCursorUp(this.ShiftUpDownStepPixel);
|
|
77406
|
+
return true;
|
|
77407
|
+
}
|
|
77408
|
+
else if (keyID==40 && e.shiftKey) //shift+down 下移十字光标
|
|
77409
|
+
{
|
|
77410
|
+
this.MoveCorssCursorDown(this.ShiftUpDownStepPixel);
|
|
77411
|
+
return true;
|
|
77412
|
+
}
|
|
77228
77413
|
else
|
|
77229
77414
|
{
|
|
77230
77415
|
return false;
|
|
77231
77416
|
}
|
|
77232
77417
|
}
|
|
77233
77418
|
|
|
77419
|
+
this.MoveKLineLeft=function(value)
|
|
77420
|
+
{
|
|
77421
|
+
return this.MoveKLine(-value);
|
|
77422
|
+
}
|
|
77423
|
+
|
|
77424
|
+
this.MoveKLineRight=function(value)
|
|
77425
|
+
{
|
|
77426
|
+
return this.MoveKLine(value);
|
|
77427
|
+
}
|
|
77428
|
+
|
|
77429
|
+
this.MoveKLine=function(step)
|
|
77430
|
+
{
|
|
77431
|
+
if (step==0) return;
|
|
77432
|
+
|
|
77433
|
+
var oneStepWidth=this.GetMoveOneStepWidth();
|
|
77434
|
+
var moveSetp=step*oneStepWidth;
|
|
77435
|
+
var bLeft=true;
|
|
77436
|
+
if (step<0)
|
|
77437
|
+
{
|
|
77438
|
+
moveSetp=Math.abs(step)*oneStepWidth;
|
|
77439
|
+
bLeft=false;
|
|
77440
|
+
}
|
|
77441
|
+
|
|
77442
|
+
if(!this.DataMove(moveSetp,bLeft)) return;
|
|
77443
|
+
|
|
77444
|
+
this.UpdataDataoffset();
|
|
77445
|
+
this.RepairCursorIndex();
|
|
77446
|
+
this.UpdatePointByCursorIndex(); //推拽数据的时候不需要把鼠标位置更新到K线上
|
|
77447
|
+
this.UpdateFrameMaxMin();
|
|
77448
|
+
this.ResetFrameXYSplit();
|
|
77449
|
+
this.Draw();
|
|
77450
|
+
this.ShowTooltipByKeyDown();
|
|
77451
|
+
this.OnKLinePageChange("datamove");
|
|
77452
|
+
}
|
|
77453
|
+
|
|
77454
|
+
//修复 当前数据索引大于数据个数的请求
|
|
77455
|
+
this.RepairCursorIndex=function()
|
|
77456
|
+
{
|
|
77457
|
+
var kData=this.GetKData();
|
|
77458
|
+
if (!kData) return;
|
|
77459
|
+
|
|
77460
|
+
var xPointcount=0;
|
|
77461
|
+
if (this.Frame.XPointCount) xPointcount=this.Frame.XPointCount;
|
|
77462
|
+
else xPointcount=this.Frame.SubFrame[0].Frame.XPointCount;
|
|
77463
|
+
if (!IFrameSplitOperator.IsPlusNumber(xPointcount)) return;
|
|
77464
|
+
|
|
77465
|
+
if (this.CursorIndex<0) this.CursorIndex=0;
|
|
77466
|
+
|
|
77467
|
+
var index=this.CursorIndex;
|
|
77468
|
+
index=parseInt(index.toFixed(0));
|
|
77469
|
+
|
|
77470
|
+
if (index+kData.DataOffset>=kData.Data.length)
|
|
77471
|
+
{
|
|
77472
|
+
this.CursorIndex=kData.Data.length-1-kData.DataOffset;
|
|
77473
|
+
}
|
|
77474
|
+
}
|
|
77475
|
+
|
|
77234
77476
|
this.MoveCorssCursorLeft=function(step)
|
|
77235
77477
|
{
|
|
77236
77478
|
var data=null;
|
|
@@ -84550,6 +84792,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84550
84792
|
this.BaselineType=0; //基准线类型 0=最新昨收盘 1=多日前昨收盘
|
|
84551
84793
|
this.EnableNightDayBG=false; //是否启动夜盘背景色
|
|
84552
84794
|
|
|
84795
|
+
//热键
|
|
84796
|
+
this.AryHotKey=
|
|
84797
|
+
[
|
|
84798
|
+
//SecondKeyID 1=shiftKey 2=ctrlKey 3=altKey
|
|
84799
|
+
{ KeyID:87, SecondKeyID:3, CMD:JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID, Args:null, Description:"Alt+W 全屏区间统计" },
|
|
84800
|
+
]
|
|
84801
|
+
|
|
84553
84802
|
//集合竞价设置 obj={ Left:true/false, Right:true/false, MultiDay:{Left:, Right:} }
|
|
84554
84803
|
this.SetCallCationDataBorder=function(obj)
|
|
84555
84804
|
{
|
|
@@ -86054,6 +86303,14 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86054
86303
|
draw=sendData.Draw;
|
|
86055
86304
|
}
|
|
86056
86305
|
|
|
86306
|
+
if (this.OnHotKeyDown(keyID, e))
|
|
86307
|
+
{
|
|
86308
|
+
//不让滚动条滚动
|
|
86309
|
+
if(e.preventDefault) e.preventDefault();
|
|
86310
|
+
else e.returnValue = false;
|
|
86311
|
+
return;
|
|
86312
|
+
}
|
|
86313
|
+
|
|
86057
86314
|
switch(keyID)
|
|
86058
86315
|
{
|
|
86059
86316
|
case 37: //left
|
|
@@ -86167,6 +86424,11 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86167
86424
|
this.CurrentChartDrawPicture=null;
|
|
86168
86425
|
}
|
|
86169
86426
|
break;
|
|
86427
|
+
case 38:
|
|
86428
|
+
case 40:
|
|
86429
|
+
if ((e.ctrlKey||e.shiftKey) && this.OnCustomKeyDown)
|
|
86430
|
+
this.OnCustomKeyDown(keyID, e)
|
|
86431
|
+
break;
|
|
86170
86432
|
default:
|
|
86171
86433
|
return;
|
|
86172
86434
|
}
|
|
@@ -86178,6 +86440,24 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86178
86440
|
else e.returnValue = false;
|
|
86179
86441
|
}
|
|
86180
86442
|
|
|
86443
|
+
this.OnCustomKeyDown=function(keyID, e) //自定义键盘事件
|
|
86444
|
+
{
|
|
86445
|
+
if (keyID==38 && e.shiftKey) //shift+up 上移十字光标
|
|
86446
|
+
{
|
|
86447
|
+
this.MoveCorssCursorUp(this.ShiftUpDownStepPixel);
|
|
86448
|
+
return true;
|
|
86449
|
+
}
|
|
86450
|
+
else if (keyID==40 && e.shiftKey) //shift+down 下移十字光标
|
|
86451
|
+
{
|
|
86452
|
+
this.MoveCorssCursorDown(this.ShiftUpDownStepPixel);
|
|
86453
|
+
return true;
|
|
86454
|
+
}
|
|
86455
|
+
else
|
|
86456
|
+
{
|
|
86457
|
+
return false;
|
|
86458
|
+
}
|
|
86459
|
+
}
|
|
86460
|
+
|
|
86181
86461
|
/*
|
|
86182
86462
|
this.OnMarkRectSelect=function(e)
|
|
86183
86463
|
{
|