hqchart 1.1.14598 → 1.1.14604
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 +26 -22
- package/package.json +1 -1
- package/src/jscommon/umychart.PopKeyboard.js +9 -0
- package/src/jscommon/umychart.js +82 -11
- package/src/jscommon/umychart.report.js +53 -12
- package/src/jscommon/umychart.style.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +137 -25
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +146 -25
package/src/jscommon/umychart.js
CHANGED
|
@@ -317,6 +317,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
317
317
|
{
|
|
318
318
|
var item=option.EnableXDrag;
|
|
319
319
|
if (IFrameSplitOperator.IsBool(item.Bottom)) chart.EnableXDrag.Bottom=item.Bottom;
|
|
320
|
+
if (item.LButton && IFrameSplitOperator.IsNumber(item.LButton.Type)) chart.EnableXDrag.LButton.Type=item.LButton.Type;
|
|
321
|
+
if (item.RButton && IFrameSplitOperator.IsNumber(item.RButton.Type)) chart.EnableXDrag.RButton.Type=item.RButton.Type;
|
|
320
322
|
}
|
|
321
323
|
|
|
322
324
|
if (option.KLineTooltip)
|
|
@@ -875,6 +877,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
875
877
|
if (IFrameSplitOperator.IsBool(option.EnableIndexChartDrag)) chart.EnableIndexChartDrag=option.EnableIndexChartDrag;
|
|
876
878
|
if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
|
|
877
879
|
if (IFrameSplitOperator.IsBool(option.EnableNightDayBG)) chart.EnableNightDayBG=option.EnableNightDayBG;
|
|
880
|
+
if (IFrameSplitOperator.IsNumber(option.MaxDayCount)) chart.MaxDayCount=option.MaxDayCount;
|
|
878
881
|
|
|
879
882
|
//老版本开启左键区间选择
|
|
880
883
|
if (IFrameSplitOperator.IsBool(option.EnableSelectRect))
|
|
@@ -2508,6 +2511,17 @@ JSChart.GetfloatPrecision=function(symbol)
|
|
|
2508
2511
|
return GetfloatPrecision(symbol);
|
|
2509
2512
|
}
|
|
2510
2513
|
|
|
2514
|
+
//获取不带后缀的代码
|
|
2515
|
+
JSChart.GetShortSymbol=function(symbol)
|
|
2516
|
+
{
|
|
2517
|
+
if (IFrameSplitOperator.IsString(symbol)) return null;
|
|
2518
|
+
var pos=symbol.lastIndexOf(".");
|
|
2519
|
+
if (pos<=0) return symbol;
|
|
2520
|
+
|
|
2521
|
+
return symbol.slice(0,pos);
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
|
|
2511
2525
|
var JSCHART_EVENT_ID=
|
|
2512
2526
|
{
|
|
2513
2527
|
//RECV_KLINE_MATCH:1, //接收到形态匹配
|
|
@@ -3673,7 +3687,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3673
3687
|
|
|
3674
3688
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
3675
3689
|
if (!this.IsShowRightMenu) return;
|
|
3676
|
-
if (this.PreventRightMenu.Enable)
|
|
3690
|
+
if (this.PreventRightMenu.Enable)
|
|
3691
|
+
{
|
|
3692
|
+
this.PreventRightMenu.Enable=false; //生效一次就可以
|
|
3693
|
+
return;
|
|
3694
|
+
}
|
|
3677
3695
|
|
|
3678
3696
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
3679
3697
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
@@ -4652,7 +4670,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
4652
4670
|
}
|
|
4653
4671
|
else if (this.MouseDrag && this.MouseDrag.Click && this.MouseDrag.Click.IsInFrameBottom)
|
|
4654
4672
|
{
|
|
4655
|
-
|
|
4673
|
+
if (e && e.button===2 && this.EnableXDrag.RButton.Type>=1) this.PreventRightMenu.Enable=true;
|
|
4656
4674
|
}
|
|
4657
4675
|
else if ((bLButtonSelectRect || bRButtonSelectRect) && !bShfitDragKLine) //K线图区间选择
|
|
4658
4676
|
{
|
|
@@ -10790,6 +10808,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10790
10808
|
break;
|
|
10791
10809
|
case JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID:
|
|
10792
10810
|
if (IFrameSplitOperator.IsBool(srcParam)) this.EnableXDrag.Bottom=srcParam;
|
|
10811
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryArgs) && IFrameSplitOperator.IsNumber(aryArgs[1])) this.EnableXDrag.LButton.Type=aryArgs[1];
|
|
10812
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryArgs) && IFrameSplitOperator.IsNumber(aryArgs[2])) this.EnableXDrag.RButton.Type=aryArgs[2];
|
|
10793
10813
|
break;
|
|
10794
10814
|
case JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID:
|
|
10795
10815
|
this.FullScreenSummary();
|
|
@@ -82825,11 +82845,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82825
82845
|
Name:"其他设置",
|
|
82826
82846
|
SubMenu:
|
|
82827
82847
|
[
|
|
82828
|
-
|
|
82829
|
-
{ Name:"禁止拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
82830
|
-
{ Name:"启动右键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, false]}, Checked:1==(this.DragMode && !this.KLineDragConfig.EnableShfit) },
|
|
82831
|
-
{ Name:"启动Shift+右键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, true]}, Checked:1==(this.DragMode && this.KLineDragConfig.EnableShfit) },
|
|
82832
|
-
{ Name:"X轴拖动缩放", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
|
|
82833
82848
|
{ Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID, Args:[!bLButtonSelectRect]}, Checked:bLButtonSelectRect },
|
|
82834
82849
|
{ Name:"右键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID, Args:[!bRButtonSelectRect]}, Checked:bRButtonSelectRect },
|
|
82835
82850
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
@@ -82886,6 +82901,27 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
82886
82901
|
{ Name:"启用", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{Enable:!this.KLineTooltipConfig.Enable}]}, Checked:this.KLineTooltipConfig.Enable },
|
|
82887
82902
|
{ Name:"键盘左右显示", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{EnableKeyDown:!this.KLineTooltipConfig.EnableKeyDown}]}, Checked:this.KLineTooltipConfig.EnableKeyDown },
|
|
82888
82903
|
]
|
|
82904
|
+
},
|
|
82905
|
+
{
|
|
82906
|
+
Name:"X轴拖动",
|
|
82907
|
+
SubMenu:
|
|
82908
|
+
[
|
|
82909
|
+
{ Name:"启动", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
|
|
82910
|
+
{ Name:"左键拖动K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, this.EnableXDrag.LButton.Type===1?0:1]}, Checked:this.EnableXDrag.LButton.Type===1 && this.EnableXDrag.Bottom },
|
|
82911
|
+
{ Name:"左键缩放K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, this.EnableXDrag.LButton.Type===2?0:2]}, Checked:this.EnableXDrag.LButton.Type===2 && this.EnableXDrag.Bottom },
|
|
82912
|
+
|
|
82913
|
+
{ Name:"右键拖动K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, null, this.EnableXDrag.RButton.Type===1?0:1]}, Checked:this.EnableXDrag.RButton.Type===1 && this.EnableXDrag.Bottom },
|
|
82914
|
+
{ Name:"右键缩放K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, null, this.EnableXDrag.RButton.Type===2?0:2]}, Checked:this.EnableXDrag.RButton.Type===2 && this.EnableXDrag.Bottom },
|
|
82915
|
+
]
|
|
82916
|
+
},
|
|
82917
|
+
{
|
|
82918
|
+
Name:"K线拖动",
|
|
82919
|
+
SubMenu:
|
|
82920
|
+
[
|
|
82921
|
+
{ Name:"禁用", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
82922
|
+
{ Name:"左键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, false]}, Checked:1==(this.DragMode && !this.KLineDragConfig.EnableShfit) },
|
|
82923
|
+
{ Name:"Shift+左键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, true]}, Checked:1==(this.DragMode && this.KLineDragConfig.EnableShfit) },
|
|
82924
|
+
]
|
|
82889
82925
|
}
|
|
82890
82926
|
]
|
|
82891
82927
|
}
|
|
@@ -85100,6 +85136,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85100
85136
|
this.AutoUpdateTimer; //自动更新定时器
|
|
85101
85137
|
this.TradeDate=0; //行情交易日期
|
|
85102
85138
|
this.DayCount=1; //显示几天的数据
|
|
85139
|
+
this.MaxDayCount=-1; //最大显示天数 -1 无限制
|
|
85103
85140
|
this.DayData; //多日分钟数据
|
|
85104
85141
|
this.LimitPrice; //涨停价格 { Max:null, Min:null };
|
|
85105
85142
|
|
|
@@ -87124,10 +87161,22 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87124
87161
|
|
|
87125
87162
|
if (x>=rtClient.Left && x<=rtClient.Right && y>=rtClient.Top && y<=rtClient.Bottom ) isInClient=true;
|
|
87126
87163
|
|
|
87127
|
-
|
|
87164
|
+
var bPreventDefault=false;
|
|
87165
|
+
if (this.OnWheel_ChangeDayCount(e,x,y)) //ctrl+上下滚轴
|
|
87166
|
+
{
|
|
87167
|
+
bPreventDefault=true;
|
|
87168
|
+
}
|
|
87169
|
+
else
|
|
87170
|
+
{
|
|
87171
|
+
if (this.OnWheel_ZoomUpDownFrameY(e,x,y))
|
|
87172
|
+
bPreventDefault=true;
|
|
87173
|
+
}
|
|
87128
87174
|
|
|
87129
|
-
if
|
|
87130
|
-
|
|
87175
|
+
if (bPreventDefault)
|
|
87176
|
+
{
|
|
87177
|
+
if(e.preventDefault) e.preventDefault();
|
|
87178
|
+
else e.returnValue = false;
|
|
87179
|
+
}
|
|
87131
87180
|
}
|
|
87132
87181
|
|
|
87133
87182
|
//通过滚轴缩放Y轴
|
|
@@ -87157,6 +87206,28 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87157
87206
|
return true;
|
|
87158
87207
|
}
|
|
87159
87208
|
|
|
87209
|
+
this.OnWheel_ChangeDayCount=function(e, x, y)
|
|
87210
|
+
{
|
|
87211
|
+
if (!e.ctrlKey) return false;
|
|
87212
|
+
|
|
87213
|
+
var wheelValue=e.wheelDelta;
|
|
87214
|
+
if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
|
|
87215
|
+
wheelValue=e.deltaY* -0.01;
|
|
87216
|
+
|
|
87217
|
+
var value=wheelValue>=0?-1:1;
|
|
87218
|
+
var dayCount=this.DayCount;
|
|
87219
|
+
|
|
87220
|
+
dayCount+=value;
|
|
87221
|
+
if (IFrameSplitOperator.IsPlusNumber(dayCount))
|
|
87222
|
+
{
|
|
87223
|
+
if (IFrameSplitOperator.IsPlusNumber(this.MaxDayCount) && dayCount>this.MaxDayCount) return true;
|
|
87224
|
+
|
|
87225
|
+
this.ChangeDayCount(dayCount);
|
|
87226
|
+
}
|
|
87227
|
+
|
|
87228
|
+
return true;
|
|
87229
|
+
}
|
|
87230
|
+
|
|
87160
87231
|
this.OnDoubleClick=function(x,y,e)
|
|
87161
87232
|
{
|
|
87162
87233
|
JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]", e);
|
|
@@ -87306,7 +87377,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
87306
87377
|
this.ChartCorssCursor.StringFormatY.ShareAfterVol=this.ShareAfterVol;
|
|
87307
87378
|
this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
|
|
87308
87379
|
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
87309
|
-
|
|
87380
|
+
this.ChartCorssCursor.OnChangeStatusCallback=(data, obj)=>{ this.OnChangeCorssCursorStatus(data,obj); }
|
|
87310
87381
|
|
|
87311
87382
|
//创建等待提示
|
|
87312
87383
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -289,6 +289,11 @@ function JSReportChart(divElement)
|
|
|
289
289
|
if (this.JSChartContainer) this.JSChartContainer.DeleteSymbol(arySymbol, option);
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
+
this.AddSymbol=function(arySymbol, option)
|
|
293
|
+
{
|
|
294
|
+
if (this.JSChartContainer) this.JSChartContainer.AddSymbol(arySymbol, option);
|
|
295
|
+
}
|
|
296
|
+
|
|
292
297
|
this.EnableFilter=function(bEnable, option) //启动|关闭筛选
|
|
293
298
|
{
|
|
294
299
|
if (this.JSChartContainer) this.JSChartContainer.EnableFilter(bEnable, option);
|
|
@@ -1242,22 +1247,59 @@ function JSReportChartContainer(uielement)
|
|
|
1242
1247
|
return true;
|
|
1243
1248
|
}
|
|
1244
1249
|
|
|
1245
|
-
|
|
1250
|
+
//添加股票
|
|
1251
|
+
this.AddSymbol=function(arySymbol, option)
|
|
1246
1252
|
{
|
|
1247
|
-
|
|
1248
|
-
if (!this.mapEvent.has(eventID)) return;
|
|
1253
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return false;
|
|
1249
1254
|
|
|
1250
|
-
var
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1255
|
+
var bDuplicate=true;
|
|
1256
|
+
if (option && IFrameSplitOperator.IsBool(option.Duplicate)) bDuplicate=option.Duplicate; //是否去重
|
|
1257
|
+
|
|
1258
|
+
var mapSymbol=new Map();
|
|
1259
|
+
for(var i=0;i<arySymbol.length;++i)
|
|
1254
1260
|
{
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1261
|
+
var item={ Symbol:arySymbol[i], IsExist:false, IsExist2:false };
|
|
1262
|
+
mapSymbol.set(item.Symbol, item);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
if (bDuplicate)
|
|
1266
|
+
{
|
|
1267
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
1268
|
+
{
|
|
1269
|
+
for(var i=0;i<this.SourceData.Data.length;++i)
|
|
1270
|
+
{
|
|
1271
|
+
var item=this.Data.Data[i];
|
|
1272
|
+
if (mapSymbol.has(item))
|
|
1273
|
+
{
|
|
1274
|
+
mapSymbol.get(item).IsExist=true;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1258
1277
|
}
|
|
1278
|
+
|
|
1279
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
|
|
1280
|
+
{
|
|
1281
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
1282
|
+
{
|
|
1283
|
+
var item=this.Data.Data[i];
|
|
1284
|
+
if (mapSymbol.has(item))
|
|
1285
|
+
{
|
|
1286
|
+
mapSymbol.get(item).IsExist2=true;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
for(var mapItem of mapSymbol)
|
|
1293
|
+
{
|
|
1294
|
+
var item=mapItem[1];
|
|
1295
|
+
if (!item.IsExist) this.SourceData.Data.push(item.Symbol);
|
|
1296
|
+
if (!item.IsExist2) this.Data.Data.push(item.Symbol);
|
|
1259
1297
|
}
|
|
1260
|
-
|
|
1298
|
+
|
|
1299
|
+
this.Draw();
|
|
1300
|
+
this.UpdateStockData();
|
|
1301
|
+
|
|
1302
|
+
return true;
|
|
1261
1303
|
}
|
|
1262
1304
|
|
|
1263
1305
|
//下载码表
|
|
@@ -1792,7 +1834,6 @@ function JSReportChartContainer(uielement)
|
|
|
1792
1834
|
this.StopAutoUpdate=function()
|
|
1793
1835
|
{
|
|
1794
1836
|
this.CancelAutoUpdate();
|
|
1795
|
-
this.AutoUpdateEvent(false,'JSDealChartContainer::StopAutoUpdate');
|
|
1796
1837
|
if (!this.IsAutoUpdate) return;
|
|
1797
1838
|
this.IsAutoUpdate=false;
|
|
1798
1839
|
}
|
|
@@ -4413,6 +4413,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4413
4413
|
{
|
|
4414
4414
|
var item=option.EnableXDrag;
|
|
4415
4415
|
if (IFrameSplitOperator.IsBool(item.Bottom)) chart.EnableXDrag.Bottom=item.Bottom;
|
|
4416
|
+
if (item.LButton && IFrameSplitOperator.IsNumber(item.LButton.Type)) chart.EnableXDrag.LButton.Type=item.LButton.Type;
|
|
4417
|
+
if (item.RButton && IFrameSplitOperator.IsNumber(item.RButton.Type)) chart.EnableXDrag.RButton.Type=item.RButton.Type;
|
|
4416
4418
|
}
|
|
4417
4419
|
|
|
4418
4420
|
if (option.KLineTooltip)
|
|
@@ -4971,6 +4973,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4971
4973
|
if (IFrameSplitOperator.IsBool(option.EnableIndexChartDrag)) chart.EnableIndexChartDrag=option.EnableIndexChartDrag;
|
|
4972
4974
|
if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
|
|
4973
4975
|
if (IFrameSplitOperator.IsBool(option.EnableNightDayBG)) chart.EnableNightDayBG=option.EnableNightDayBG;
|
|
4976
|
+
if (IFrameSplitOperator.IsNumber(option.MaxDayCount)) chart.MaxDayCount=option.MaxDayCount;
|
|
4974
4977
|
|
|
4975
4978
|
//老版本开启左键区间选择
|
|
4976
4979
|
if (IFrameSplitOperator.IsBool(option.EnableSelectRect))
|
|
@@ -6604,6 +6607,17 @@ JSChart.GetfloatPrecision=function(symbol)
|
|
|
6604
6607
|
return GetfloatPrecision(symbol);
|
|
6605
6608
|
}
|
|
6606
6609
|
|
|
6610
|
+
//获取不带后缀的代码
|
|
6611
|
+
JSChart.GetShortSymbol=function(symbol)
|
|
6612
|
+
{
|
|
6613
|
+
if (IFrameSplitOperator.IsString(symbol)) return null;
|
|
6614
|
+
var pos=symbol.lastIndexOf(".");
|
|
6615
|
+
if (pos<=0) return symbol;
|
|
6616
|
+
|
|
6617
|
+
return symbol.slice(0,pos);
|
|
6618
|
+
}
|
|
6619
|
+
|
|
6620
|
+
|
|
6607
6621
|
var JSCHART_EVENT_ID=
|
|
6608
6622
|
{
|
|
6609
6623
|
//RECV_KLINE_MATCH:1, //接收到形态匹配
|
|
@@ -7769,7 +7783,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7769
7783
|
|
|
7770
7784
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
7771
7785
|
if (!this.IsShowRightMenu) return;
|
|
7772
|
-
if (this.PreventRightMenu.Enable)
|
|
7786
|
+
if (this.PreventRightMenu.Enable)
|
|
7787
|
+
{
|
|
7788
|
+
this.PreventRightMenu.Enable=false; //生效一次就可以
|
|
7789
|
+
return;
|
|
7790
|
+
}
|
|
7773
7791
|
|
|
7774
7792
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
7775
7793
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
@@ -8748,7 +8766,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8748
8766
|
}
|
|
8749
8767
|
else if (this.MouseDrag && this.MouseDrag.Click && this.MouseDrag.Click.IsInFrameBottom)
|
|
8750
8768
|
{
|
|
8751
|
-
|
|
8769
|
+
if (e && e.button===2 && this.EnableXDrag.RButton.Type>=1) this.PreventRightMenu.Enable=true;
|
|
8752
8770
|
}
|
|
8753
8771
|
else if ((bLButtonSelectRect || bRButtonSelectRect) && !bShfitDragKLine) //K线图区间选择
|
|
8754
8772
|
{
|
|
@@ -14886,6 +14904,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14886
14904
|
break;
|
|
14887
14905
|
case JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID:
|
|
14888
14906
|
if (IFrameSplitOperator.IsBool(srcParam)) this.EnableXDrag.Bottom=srcParam;
|
|
14907
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryArgs) && IFrameSplitOperator.IsNumber(aryArgs[1])) this.EnableXDrag.LButton.Type=aryArgs[1];
|
|
14908
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryArgs) && IFrameSplitOperator.IsNumber(aryArgs[2])) this.EnableXDrag.RButton.Type=aryArgs[2];
|
|
14889
14909
|
break;
|
|
14890
14910
|
case JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID:
|
|
14891
14911
|
this.FullScreenSummary();
|
|
@@ -86921,11 +86941,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86921
86941
|
Name:"其他设置",
|
|
86922
86942
|
SubMenu:
|
|
86923
86943
|
[
|
|
86924
|
-
|
|
86925
|
-
{ Name:"禁止拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
86926
|
-
{ Name:"启动右键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, false]}, Checked:1==(this.DragMode && !this.KLineDragConfig.EnableShfit) },
|
|
86927
|
-
{ Name:"启动Shift+右键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, true]}, Checked:1==(this.DragMode && this.KLineDragConfig.EnableShfit) },
|
|
86928
|
-
{ Name:"X轴拖动缩放", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
|
|
86929
86944
|
{ Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID, Args:[!bLButtonSelectRect]}, Checked:bLButtonSelectRect },
|
|
86930
86945
|
{ Name:"右键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID, Args:[!bRButtonSelectRect]}, Checked:bRButtonSelectRect },
|
|
86931
86946
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
@@ -86982,6 +86997,27 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86982
86997
|
{ Name:"启用", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{Enable:!this.KLineTooltipConfig.Enable}]}, Checked:this.KLineTooltipConfig.Enable },
|
|
86983
86998
|
{ Name:"键盘左右显示", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{EnableKeyDown:!this.KLineTooltipConfig.EnableKeyDown}]}, Checked:this.KLineTooltipConfig.EnableKeyDown },
|
|
86984
86999
|
]
|
|
87000
|
+
},
|
|
87001
|
+
{
|
|
87002
|
+
Name:"X轴拖动",
|
|
87003
|
+
SubMenu:
|
|
87004
|
+
[
|
|
87005
|
+
{ Name:"启动", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
|
|
87006
|
+
{ Name:"左键拖动K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, this.EnableXDrag.LButton.Type===1?0:1]}, Checked:this.EnableXDrag.LButton.Type===1 && this.EnableXDrag.Bottom },
|
|
87007
|
+
{ Name:"左键缩放K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, this.EnableXDrag.LButton.Type===2?0:2]}, Checked:this.EnableXDrag.LButton.Type===2 && this.EnableXDrag.Bottom },
|
|
87008
|
+
|
|
87009
|
+
{ Name:"右键拖动K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, null, this.EnableXDrag.RButton.Type===1?0:1]}, Checked:this.EnableXDrag.RButton.Type===1 && this.EnableXDrag.Bottom },
|
|
87010
|
+
{ Name:"右键缩放K线", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[null, null, this.EnableXDrag.RButton.Type===2?0:2]}, Checked:this.EnableXDrag.RButton.Type===2 && this.EnableXDrag.Bottom },
|
|
87011
|
+
]
|
|
87012
|
+
},
|
|
87013
|
+
{
|
|
87014
|
+
Name:"K线拖动",
|
|
87015
|
+
SubMenu:
|
|
87016
|
+
[
|
|
87017
|
+
{ Name:"禁用", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
87018
|
+
{ Name:"左键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, false]}, Checked:1==(this.DragMode && !this.KLineDragConfig.EnableShfit) },
|
|
87019
|
+
{ Name:"Shift+左键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, true]}, Checked:1==(this.DragMode && this.KLineDragConfig.EnableShfit) },
|
|
87020
|
+
]
|
|
86985
87021
|
}
|
|
86986
87022
|
]
|
|
86987
87023
|
}
|
|
@@ -89196,6 +89232,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89196
89232
|
this.AutoUpdateTimer; //自动更新定时器
|
|
89197
89233
|
this.TradeDate=0; //行情交易日期
|
|
89198
89234
|
this.DayCount=1; //显示几天的数据
|
|
89235
|
+
this.MaxDayCount=-1; //最大显示天数 -1 无限制
|
|
89199
89236
|
this.DayData; //多日分钟数据
|
|
89200
89237
|
this.LimitPrice; //涨停价格 { Max:null, Min:null };
|
|
89201
89238
|
|
|
@@ -91220,10 +91257,22 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91220
91257
|
|
|
91221
91258
|
if (x>=rtClient.Left && x<=rtClient.Right && y>=rtClient.Top && y<=rtClient.Bottom ) isInClient=true;
|
|
91222
91259
|
|
|
91223
|
-
|
|
91260
|
+
var bPreventDefault=false;
|
|
91261
|
+
if (this.OnWheel_ChangeDayCount(e,x,y)) //ctrl+上下滚轴
|
|
91262
|
+
{
|
|
91263
|
+
bPreventDefault=true;
|
|
91264
|
+
}
|
|
91265
|
+
else
|
|
91266
|
+
{
|
|
91267
|
+
if (this.OnWheel_ZoomUpDownFrameY(e,x,y))
|
|
91268
|
+
bPreventDefault=true;
|
|
91269
|
+
}
|
|
91224
91270
|
|
|
91225
|
-
if
|
|
91226
|
-
|
|
91271
|
+
if (bPreventDefault)
|
|
91272
|
+
{
|
|
91273
|
+
if(e.preventDefault) e.preventDefault();
|
|
91274
|
+
else e.returnValue = false;
|
|
91275
|
+
}
|
|
91227
91276
|
}
|
|
91228
91277
|
|
|
91229
91278
|
//通过滚轴缩放Y轴
|
|
@@ -91253,6 +91302,28 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91253
91302
|
return true;
|
|
91254
91303
|
}
|
|
91255
91304
|
|
|
91305
|
+
this.OnWheel_ChangeDayCount=function(e, x, y)
|
|
91306
|
+
{
|
|
91307
|
+
if (!e.ctrlKey) return false;
|
|
91308
|
+
|
|
91309
|
+
var wheelValue=e.wheelDelta;
|
|
91310
|
+
if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
|
|
91311
|
+
wheelValue=e.deltaY* -0.01;
|
|
91312
|
+
|
|
91313
|
+
var value=wheelValue>=0?-1:1;
|
|
91314
|
+
var dayCount=this.DayCount;
|
|
91315
|
+
|
|
91316
|
+
dayCount+=value;
|
|
91317
|
+
if (IFrameSplitOperator.IsPlusNumber(dayCount))
|
|
91318
|
+
{
|
|
91319
|
+
if (IFrameSplitOperator.IsPlusNumber(this.MaxDayCount) && dayCount>this.MaxDayCount) return true;
|
|
91320
|
+
|
|
91321
|
+
this.ChangeDayCount(dayCount);
|
|
91322
|
+
}
|
|
91323
|
+
|
|
91324
|
+
return true;
|
|
91325
|
+
}
|
|
91326
|
+
|
|
91256
91327
|
this.OnDoubleClick=function(x,y,e)
|
|
91257
91328
|
{
|
|
91258
91329
|
JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]", e);
|
|
@@ -91402,7 +91473,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91402
91473
|
this.ChartCorssCursor.StringFormatY.ShareAfterVol=this.ShareAfterVol;
|
|
91403
91474
|
this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
|
|
91404
91475
|
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
91405
|
-
|
|
91476
|
+
this.ChartCorssCursor.OnChangeStatusCallback=(data, obj)=>{ this.OnChangeCorssCursorStatus(data,obj); }
|
|
91406
91477
|
|
|
91407
91478
|
//创建等待提示
|
|
91408
91479
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -131138,7 +131209,7 @@ function GetBlackStyle()
|
|
|
131138
131209
|
Color:"rgba(255,250, 250,0.8)",
|
|
131139
131210
|
TextColor:'rgba(0,0, 0, 0.8)',
|
|
131140
131211
|
|
|
131141
|
-
MoveRowColor:'rgb(
|
|
131212
|
+
MoveRowColor:'rgb(37,47,69)',
|
|
131142
131213
|
SrcRowColor:'rgb(49,48,56)',
|
|
131143
131214
|
},
|
|
131144
131215
|
|
|
@@ -133232,6 +133303,11 @@ function JSReportChart(divElement)
|
|
|
133232
133303
|
if (this.JSChartContainer) this.JSChartContainer.DeleteSymbol(arySymbol, option);
|
|
133233
133304
|
}
|
|
133234
133305
|
|
|
133306
|
+
this.AddSymbol=function(arySymbol, option)
|
|
133307
|
+
{
|
|
133308
|
+
if (this.JSChartContainer) this.JSChartContainer.AddSymbol(arySymbol, option);
|
|
133309
|
+
}
|
|
133310
|
+
|
|
133235
133311
|
this.EnableFilter=function(bEnable, option) //启动|关闭筛选
|
|
133236
133312
|
{
|
|
133237
133313
|
if (this.JSChartContainer) this.JSChartContainer.EnableFilter(bEnable, option);
|
|
@@ -134185,22 +134261,59 @@ function JSReportChartContainer(uielement)
|
|
|
134185
134261
|
return true;
|
|
134186
134262
|
}
|
|
134187
134263
|
|
|
134188
|
-
|
|
134264
|
+
//添加股票
|
|
134265
|
+
this.AddSymbol=function(arySymbol, option)
|
|
134189
134266
|
{
|
|
134190
|
-
|
|
134191
|
-
if (!this.mapEvent.has(eventID)) return;
|
|
134267
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return false;
|
|
134192
134268
|
|
|
134193
|
-
var
|
|
134194
|
-
|
|
134195
|
-
|
|
134196
|
-
|
|
134269
|
+
var bDuplicate=true;
|
|
134270
|
+
if (option && IFrameSplitOperator.IsBool(option.Duplicate)) bDuplicate=option.Duplicate; //是否去重
|
|
134271
|
+
|
|
134272
|
+
var mapSymbol=new Map();
|
|
134273
|
+
for(var i=0;i<arySymbol.length;++i)
|
|
134197
134274
|
{
|
|
134198
|
-
|
|
134199
|
-
|
|
134200
|
-
|
|
134275
|
+
var item={ Symbol:arySymbol[i], IsExist:false, IsExist2:false };
|
|
134276
|
+
mapSymbol.set(item.Symbol, item);
|
|
134277
|
+
}
|
|
134278
|
+
|
|
134279
|
+
if (bDuplicate)
|
|
134280
|
+
{
|
|
134281
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
134282
|
+
{
|
|
134283
|
+
for(var i=0;i<this.SourceData.Data.length;++i)
|
|
134284
|
+
{
|
|
134285
|
+
var item=this.Data.Data[i];
|
|
134286
|
+
if (mapSymbol.has(item))
|
|
134287
|
+
{
|
|
134288
|
+
mapSymbol.get(item).IsExist=true;
|
|
134289
|
+
}
|
|
134290
|
+
}
|
|
134291
|
+
}
|
|
134292
|
+
|
|
134293
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
|
|
134294
|
+
{
|
|
134295
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
134296
|
+
{
|
|
134297
|
+
var item=this.Data.Data[i];
|
|
134298
|
+
if (mapSymbol.has(item))
|
|
134299
|
+
{
|
|
134300
|
+
mapSymbol.get(item).IsExist2=true;
|
|
134301
|
+
}
|
|
134302
|
+
}
|
|
134201
134303
|
}
|
|
134202
134304
|
}
|
|
134203
|
-
|
|
134305
|
+
|
|
134306
|
+
for(var mapItem of mapSymbol)
|
|
134307
|
+
{
|
|
134308
|
+
var item=mapItem[1];
|
|
134309
|
+
if (!item.IsExist) this.SourceData.Data.push(item.Symbol);
|
|
134310
|
+
if (!item.IsExist2) this.Data.Data.push(item.Symbol);
|
|
134311
|
+
}
|
|
134312
|
+
|
|
134313
|
+
this.Draw();
|
|
134314
|
+
this.UpdateStockData();
|
|
134315
|
+
|
|
134316
|
+
return true;
|
|
134204
134317
|
}
|
|
134205
134318
|
|
|
134206
134319
|
//下载码表
|
|
@@ -134735,7 +134848,6 @@ function JSReportChartContainer(uielement)
|
|
|
134735
134848
|
this.StopAutoUpdate=function()
|
|
134736
134849
|
{
|
|
134737
134850
|
this.CancelAutoUpdate();
|
|
134738
|
-
this.AutoUpdateEvent(false,'JSDealChartContainer::StopAutoUpdate');
|
|
134739
134851
|
if (!this.IsAutoUpdate) return;
|
|
134740
134852
|
this.IsAutoUpdate=false;
|
|
134741
134853
|
}
|
|
@@ -145831,7 +145943,7 @@ function ScrollBarBGChart()
|
|
|
145831
145943
|
|
|
145832
145944
|
|
|
145833
145945
|
|
|
145834
|
-
var HQCHART_VERSION="1.1.
|
|
145946
|
+
var HQCHART_VERSION="1.1.14603";
|
|
145835
145947
|
|
|
145836
145948
|
function PrintHQChartVersion()
|
|
145837
145949
|
{
|