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
|
@@ -4457,6 +4457,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4457
4457
|
{
|
|
4458
4458
|
var item=option.EnableXDrag;
|
|
4459
4459
|
if (IFrameSplitOperator.IsBool(item.Bottom)) chart.EnableXDrag.Bottom=item.Bottom;
|
|
4460
|
+
if (item.LButton && IFrameSplitOperator.IsNumber(item.LButton.Type)) chart.EnableXDrag.LButton.Type=item.LButton.Type;
|
|
4461
|
+
if (item.RButton && IFrameSplitOperator.IsNumber(item.RButton.Type)) chart.EnableXDrag.RButton.Type=item.RButton.Type;
|
|
4460
4462
|
}
|
|
4461
4463
|
|
|
4462
4464
|
if (option.KLineTooltip)
|
|
@@ -5015,6 +5017,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5015
5017
|
if (IFrameSplitOperator.IsBool(option.EnableIndexChartDrag)) chart.EnableIndexChartDrag=option.EnableIndexChartDrag;
|
|
5016
5018
|
if (IFrameSplitOperator.IsBool(option.EnableVerifyRecvData)) chart.EnableVerifyRecvData=option.EnableVerifyRecvData;
|
|
5017
5019
|
if (IFrameSplitOperator.IsBool(option.EnableNightDayBG)) chart.EnableNightDayBG=option.EnableNightDayBG;
|
|
5020
|
+
if (IFrameSplitOperator.IsNumber(option.MaxDayCount)) chart.MaxDayCount=option.MaxDayCount;
|
|
5018
5021
|
|
|
5019
5022
|
//老版本开启左键区间选择
|
|
5020
5023
|
if (IFrameSplitOperator.IsBool(option.EnableSelectRect))
|
|
@@ -6648,6 +6651,17 @@ JSChart.GetfloatPrecision=function(symbol)
|
|
|
6648
6651
|
return GetfloatPrecision(symbol);
|
|
6649
6652
|
}
|
|
6650
6653
|
|
|
6654
|
+
//获取不带后缀的代码
|
|
6655
|
+
JSChart.GetShortSymbol=function(symbol)
|
|
6656
|
+
{
|
|
6657
|
+
if (IFrameSplitOperator.IsString(symbol)) return null;
|
|
6658
|
+
var pos=symbol.lastIndexOf(".");
|
|
6659
|
+
if (pos<=0) return symbol;
|
|
6660
|
+
|
|
6661
|
+
return symbol.slice(0,pos);
|
|
6662
|
+
}
|
|
6663
|
+
|
|
6664
|
+
|
|
6651
6665
|
var JSCHART_EVENT_ID=
|
|
6652
6666
|
{
|
|
6653
6667
|
//RECV_KLINE_MATCH:1, //接收到形态匹配
|
|
@@ -7813,7 +7827,11 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7813
7827
|
|
|
7814
7828
|
if (this.ChartSplashPaint && this.ChartSplashPaint.IsEnableSplash == true) return;
|
|
7815
7829
|
if (!this.IsShowRightMenu) return;
|
|
7816
|
-
if (this.PreventRightMenu.Enable)
|
|
7830
|
+
if (this.PreventRightMenu.Enable)
|
|
7831
|
+
{
|
|
7832
|
+
this.PreventRightMenu.Enable=false; //生效一次就可以
|
|
7833
|
+
return;
|
|
7834
|
+
}
|
|
7817
7835
|
|
|
7818
7836
|
var x = e.clientX-this.UIElement.getBoundingClientRect().left;
|
|
7819
7837
|
var y = e.clientY-this.UIElement.getBoundingClientRect().top;
|
|
@@ -8792,7 +8810,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8792
8810
|
}
|
|
8793
8811
|
else if (this.MouseDrag && this.MouseDrag.Click && this.MouseDrag.Click.IsInFrameBottom)
|
|
8794
8812
|
{
|
|
8795
|
-
|
|
8813
|
+
if (e && e.button===2 && this.EnableXDrag.RButton.Type>=1) this.PreventRightMenu.Enable=true;
|
|
8796
8814
|
}
|
|
8797
8815
|
else if ((bLButtonSelectRect || bRButtonSelectRect) && !bShfitDragKLine) //K线图区间选择
|
|
8798
8816
|
{
|
|
@@ -14930,6 +14948,8 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
14930
14948
|
break;
|
|
14931
14949
|
case JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID:
|
|
14932
14950
|
if (IFrameSplitOperator.IsBool(srcParam)) this.EnableXDrag.Bottom=srcParam;
|
|
14951
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryArgs) && IFrameSplitOperator.IsNumber(aryArgs[1])) this.EnableXDrag.LButton.Type=aryArgs[1];
|
|
14952
|
+
if (IFrameSplitOperator.IsNonEmptyArray(aryArgs) && IFrameSplitOperator.IsNumber(aryArgs[2])) this.EnableXDrag.RButton.Type=aryArgs[2];
|
|
14933
14953
|
break;
|
|
14934
14954
|
case JSCHART_MENU_ID.CMD_FULLSCREEN_SUMMARY_ID:
|
|
14935
14955
|
this.FullScreenSummary();
|
|
@@ -86965,11 +86985,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
86965
86985
|
Name:"其他设置",
|
|
86966
86986
|
SubMenu:
|
|
86967
86987
|
[
|
|
86968
|
-
|
|
86969
|
-
{ Name:"禁止拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
86970
|
-
{ Name:"启动右键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, false]}, Checked:1==(this.DragMode && !this.KLineDragConfig.EnableShfit) },
|
|
86971
|
-
{ Name:"启动Shift+右键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, true]}, Checked:1==(this.DragMode && this.KLineDragConfig.EnableShfit) },
|
|
86972
|
-
{ Name:"X轴拖动缩放", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
|
|
86973
86988
|
{ Name:"左键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_LBUTTON_SELECT_RECT_ID, Args:[!bLButtonSelectRect]}, Checked:bLButtonSelectRect },
|
|
86974
86989
|
{ Name:"右键区间选择", Data:{ ID:JSCHART_MENU_ID.CMD_RBUTTON_SELECT_RECT_ID, Args:[!bRButtonSelectRect]}, Checked:bRButtonSelectRect },
|
|
86975
86990
|
{ Name:JSPopMenu.SEPARATOR_LINE_NAME },
|
|
@@ -87026,6 +87041,27 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
87026
87041
|
{ Name:"启用", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{Enable:!this.KLineTooltipConfig.Enable}]}, Checked:this.KLineTooltipConfig.Enable },
|
|
87027
87042
|
{ Name:"键盘左右显示", Data:{ ID:JSCHART_MENU_ID.CMD_KLINE_TOOLTIP_ATTRIBUTE, Args:[{EnableKeyDown:!this.KLineTooltipConfig.EnableKeyDown}]}, Checked:this.KLineTooltipConfig.EnableKeyDown },
|
|
87028
87043
|
]
|
|
87044
|
+
},
|
|
87045
|
+
{
|
|
87046
|
+
Name:"X轴拖动",
|
|
87047
|
+
SubMenu:
|
|
87048
|
+
[
|
|
87049
|
+
{ Name:"启动", Data:{ ID:JSCHART_MENU_ID.CMD_ENABLE_XDRAG_BOTTOM_ID, Args:[!this.EnableXDrag.Bottom]}, Checked:this.EnableXDrag.Bottom },
|
|
87050
|
+
{ 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 },
|
|
87051
|
+
{ 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 },
|
|
87052
|
+
|
|
87053
|
+
{ 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 },
|
|
87054
|
+
{ 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 },
|
|
87055
|
+
]
|
|
87056
|
+
},
|
|
87057
|
+
{
|
|
87058
|
+
Name:"K线拖动",
|
|
87059
|
+
SubMenu:
|
|
87060
|
+
[
|
|
87061
|
+
{ Name:"禁用", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[0]}, Checked:0==this.DragMode },
|
|
87062
|
+
{ Name:"左键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, false]}, Checked:1==(this.DragMode && !this.KLineDragConfig.EnableShfit) },
|
|
87063
|
+
{ Name:"Shift+左键拖拽", Data:{ ID:JSCHART_MENU_ID.CMD_CHANGE_DRAG_MODE_ID, Args:[1, true]}, Checked:1==(this.DragMode && this.KLineDragConfig.EnableShfit) },
|
|
87064
|
+
]
|
|
87029
87065
|
}
|
|
87030
87066
|
]
|
|
87031
87067
|
}
|
|
@@ -89240,6 +89276,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
89240
89276
|
this.AutoUpdateTimer; //自动更新定时器
|
|
89241
89277
|
this.TradeDate=0; //行情交易日期
|
|
89242
89278
|
this.DayCount=1; //显示几天的数据
|
|
89279
|
+
this.MaxDayCount=-1; //最大显示天数 -1 无限制
|
|
89243
89280
|
this.DayData; //多日分钟数据
|
|
89244
89281
|
this.LimitPrice; //涨停价格 { Max:null, Min:null };
|
|
89245
89282
|
|
|
@@ -91264,10 +91301,22 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91264
91301
|
|
|
91265
91302
|
if (x>=rtClient.Left && x<=rtClient.Right && y>=rtClient.Top && y<=rtClient.Bottom ) isInClient=true;
|
|
91266
91303
|
|
|
91267
|
-
|
|
91304
|
+
var bPreventDefault=false;
|
|
91305
|
+
if (this.OnWheel_ChangeDayCount(e,x,y)) //ctrl+上下滚轴
|
|
91306
|
+
{
|
|
91307
|
+
bPreventDefault=true;
|
|
91308
|
+
}
|
|
91309
|
+
else
|
|
91310
|
+
{
|
|
91311
|
+
if (this.OnWheel_ZoomUpDownFrameY(e,x,y))
|
|
91312
|
+
bPreventDefault=true;
|
|
91313
|
+
}
|
|
91268
91314
|
|
|
91269
|
-
if
|
|
91270
|
-
|
|
91315
|
+
if (bPreventDefault)
|
|
91316
|
+
{
|
|
91317
|
+
if(e.preventDefault) e.preventDefault();
|
|
91318
|
+
else e.returnValue = false;
|
|
91319
|
+
}
|
|
91271
91320
|
}
|
|
91272
91321
|
|
|
91273
91322
|
//通过滚轴缩放Y轴
|
|
@@ -91297,6 +91346,28 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91297
91346
|
return true;
|
|
91298
91347
|
}
|
|
91299
91348
|
|
|
91349
|
+
this.OnWheel_ChangeDayCount=function(e, x, y)
|
|
91350
|
+
{
|
|
91351
|
+
if (!e.ctrlKey) return false;
|
|
91352
|
+
|
|
91353
|
+
var wheelValue=e.wheelDelta;
|
|
91354
|
+
if (!IFrameSplitOperator.IsObjectExist(e.wheelDelta))
|
|
91355
|
+
wheelValue=e.deltaY* -0.01;
|
|
91356
|
+
|
|
91357
|
+
var value=wheelValue>=0?-1:1;
|
|
91358
|
+
var dayCount=this.DayCount;
|
|
91359
|
+
|
|
91360
|
+
dayCount+=value;
|
|
91361
|
+
if (IFrameSplitOperator.IsPlusNumber(dayCount))
|
|
91362
|
+
{
|
|
91363
|
+
if (IFrameSplitOperator.IsPlusNumber(this.MaxDayCount) && dayCount>this.MaxDayCount) return true;
|
|
91364
|
+
|
|
91365
|
+
this.ChangeDayCount(dayCount);
|
|
91366
|
+
}
|
|
91367
|
+
|
|
91368
|
+
return true;
|
|
91369
|
+
}
|
|
91370
|
+
|
|
91300
91371
|
this.OnDoubleClick=function(x,y,e)
|
|
91301
91372
|
{
|
|
91302
91373
|
JSConsole.Chart.Log("[MinuteChartContainer::OnDoubleClick]", e);
|
|
@@ -91446,7 +91517,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
91446
91517
|
this.ChartCorssCursor.StringFormatY.ShareAfterVol=this.ShareAfterVol;
|
|
91447
91518
|
this.ChartCorssCursor.CallAcutionXOperator=new CallAcutionXOperator();
|
|
91448
91519
|
this.ChartCorssCursor.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
|
|
91449
|
-
|
|
91520
|
+
this.ChartCorssCursor.OnChangeStatusCallback=(data, obj)=>{ this.OnChangeCorssCursorStatus(data,obj); }
|
|
91450
91521
|
|
|
91451
91522
|
//创建等待提示
|
|
91452
91523
|
this.ChartSplashPaint = new ChartSplashPaint();
|
|
@@ -131182,7 +131253,7 @@ function GetBlackStyle()
|
|
|
131182
131253
|
Color:"rgba(255,250, 250,0.8)",
|
|
131183
131254
|
TextColor:'rgba(0,0, 0, 0.8)',
|
|
131184
131255
|
|
|
131185
|
-
MoveRowColor:'rgb(
|
|
131256
|
+
MoveRowColor:'rgb(37,47,69)',
|
|
131186
131257
|
SrcRowColor:'rgb(49,48,56)',
|
|
131187
131258
|
},
|
|
131188
131259
|
|
|
@@ -133276,6 +133347,11 @@ function JSReportChart(divElement)
|
|
|
133276
133347
|
if (this.JSChartContainer) this.JSChartContainer.DeleteSymbol(arySymbol, option);
|
|
133277
133348
|
}
|
|
133278
133349
|
|
|
133350
|
+
this.AddSymbol=function(arySymbol, option)
|
|
133351
|
+
{
|
|
133352
|
+
if (this.JSChartContainer) this.JSChartContainer.AddSymbol(arySymbol, option);
|
|
133353
|
+
}
|
|
133354
|
+
|
|
133279
133355
|
this.EnableFilter=function(bEnable, option) //启动|关闭筛选
|
|
133280
133356
|
{
|
|
133281
133357
|
if (this.JSChartContainer) this.JSChartContainer.EnableFilter(bEnable, option);
|
|
@@ -134229,22 +134305,59 @@ function JSReportChartContainer(uielement)
|
|
|
134229
134305
|
return true;
|
|
134230
134306
|
}
|
|
134231
134307
|
|
|
134232
|
-
|
|
134308
|
+
//添加股票
|
|
134309
|
+
this.AddSymbol=function(arySymbol, option)
|
|
134233
134310
|
{
|
|
134234
|
-
|
|
134235
|
-
if (!this.mapEvent.has(eventID)) return;
|
|
134311
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(arySymbol)) return false;
|
|
134236
134312
|
|
|
134237
|
-
var
|
|
134238
|
-
|
|
134239
|
-
|
|
134240
|
-
|
|
134313
|
+
var bDuplicate=true;
|
|
134314
|
+
if (option && IFrameSplitOperator.IsBool(option.Duplicate)) bDuplicate=option.Duplicate; //是否去重
|
|
134315
|
+
|
|
134316
|
+
var mapSymbol=new Map();
|
|
134317
|
+
for(var i=0;i<arySymbol.length;++i)
|
|
134241
134318
|
{
|
|
134242
|
-
|
|
134243
|
-
|
|
134244
|
-
|
|
134319
|
+
var item={ Symbol:arySymbol[i], IsExist:false, IsExist2:false };
|
|
134320
|
+
mapSymbol.set(item.Symbol, item);
|
|
134321
|
+
}
|
|
134322
|
+
|
|
134323
|
+
if (bDuplicate)
|
|
134324
|
+
{
|
|
134325
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.SourceData.Data))
|
|
134326
|
+
{
|
|
134327
|
+
for(var i=0;i<this.SourceData.Data.length;++i)
|
|
134328
|
+
{
|
|
134329
|
+
var item=this.Data.Data[i];
|
|
134330
|
+
if (mapSymbol.has(item))
|
|
134331
|
+
{
|
|
134332
|
+
mapSymbol.get(item).IsExist=true;
|
|
134333
|
+
}
|
|
134334
|
+
}
|
|
134335
|
+
}
|
|
134336
|
+
|
|
134337
|
+
if (IFrameSplitOperator.IsNonEmptyArray(this.Data.Data))
|
|
134338
|
+
{
|
|
134339
|
+
for(var i=0;i<this.Data.Data.length;++i)
|
|
134340
|
+
{
|
|
134341
|
+
var item=this.Data.Data[i];
|
|
134342
|
+
if (mapSymbol.has(item))
|
|
134343
|
+
{
|
|
134344
|
+
mapSymbol.get(item).IsExist2=true;
|
|
134345
|
+
}
|
|
134346
|
+
}
|
|
134245
134347
|
}
|
|
134246
134348
|
}
|
|
134247
|
-
|
|
134349
|
+
|
|
134350
|
+
for(var mapItem of mapSymbol)
|
|
134351
|
+
{
|
|
134352
|
+
var item=mapItem[1];
|
|
134353
|
+
if (!item.IsExist) this.SourceData.Data.push(item.Symbol);
|
|
134354
|
+
if (!item.IsExist2) this.Data.Data.push(item.Symbol);
|
|
134355
|
+
}
|
|
134356
|
+
|
|
134357
|
+
this.Draw();
|
|
134358
|
+
this.UpdateStockData();
|
|
134359
|
+
|
|
134360
|
+
return true;
|
|
134248
134361
|
}
|
|
134249
134362
|
|
|
134250
134363
|
//下载码表
|
|
@@ -134779,7 +134892,6 @@ function JSReportChartContainer(uielement)
|
|
|
134779
134892
|
this.StopAutoUpdate=function()
|
|
134780
134893
|
{
|
|
134781
134894
|
this.CancelAutoUpdate();
|
|
134782
|
-
this.AutoUpdateEvent(false,'JSDealChartContainer::StopAutoUpdate');
|
|
134783
134895
|
if (!this.IsAutoUpdate) return;
|
|
134784
134896
|
this.IsAutoUpdate=false;
|
|
134785
134897
|
}
|
|
@@ -151818,6 +151930,15 @@ function JSPopKeyboard()
|
|
|
151818
151930
|
}
|
|
151819
151931
|
}
|
|
151820
151932
|
|
|
151933
|
+
this.Destroy=function()
|
|
151934
|
+
{
|
|
151935
|
+
if (this.DivDialog) document.body.removeChild(this.DivDialog);
|
|
151936
|
+
this.DivDialog=null;
|
|
151937
|
+
this.TitleBox=null;
|
|
151938
|
+
if (!this.Keyboard.JSChart) this.Keyboard.JSChart.ChartDestory();
|
|
151939
|
+
this.Keyboard.JSChart=null;
|
|
151940
|
+
}
|
|
151941
|
+
|
|
151821
151942
|
this.Create=function()
|
|
151822
151943
|
{
|
|
151823
151944
|
var divDom=document.createElement('div');
|
|
@@ -156531,7 +156652,7 @@ function HQChartScriptWorker()
|
|
|
156531
156652
|
|
|
156532
156653
|
|
|
156533
156654
|
|
|
156534
|
-
var HQCHART_VERSION="1.1.
|
|
156655
|
+
var HQCHART_VERSION="1.1.14603";
|
|
156535
156656
|
|
|
156536
156657
|
function PrintHQChartVersion()
|
|
156537
156658
|
{
|