hqchart 1.1.14201 → 1.1.14211
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 -27
- package/package.json +1 -1
- package/src/jscommon/umychart.js +87 -25
- package/src/jscommon/umychart.style.js +6 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +94 -26
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +94 -26
package/src/jscommon/umychart.js
CHANGED
|
@@ -699,6 +699,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
699
699
|
if (IFrameSplitOperator.IsBool(item.Export)) frame.ExportData=item.Export;
|
|
700
700
|
if (IFrameSplitOperator.IsBool(item.MaxMin)) chart.Frame.SubFrame[i].Frame.MaxMinWindow=item.MaxMin;
|
|
701
701
|
if (IFrameSplitOperator.IsBool(item.TitleWindow)) chart.Frame.SubFrame[i].Frame.TitleWindow=item.TitleWindow;
|
|
702
|
+
if (IFrameSplitOperator.IsBool(item.AddIndexWindow)) frame.AddIndexWindow=item.AddIndexWindow;
|
|
703
|
+
|
|
702
704
|
if (item.IsDrawTitleBG==true) chart.Frame.SubFrame[i].Frame.IsDrawTitleBG=item.IsDrawTitleBG;
|
|
703
705
|
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[i].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
704
706
|
|
|
@@ -1165,6 +1167,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1165
1167
|
if (IFrameSplitOperator.IsBool(item.Export)) frame.ExportData=item.Export;
|
|
1166
1168
|
if (IFrameSplitOperator.IsBool(item.MaxMin)) frame.MaxMinWindow=item.MaxMin;
|
|
1167
1169
|
if (IFrameSplitOperator.IsBool(item.TitleWindow)) frame.TitleWindow=item.TitleWindow;
|
|
1170
|
+
if (IFrameSplitOperator.IsBool(item.AddIndexWindow)) frame.AddIndexWindow=item.AddIndexWindow;
|
|
1168
1171
|
|
|
1169
1172
|
if (IFrameSplitOperator.IsNumber(item.YSplitType)) chart.Frame.SubFrame[index].Frame.YSplitOperator.SplitType=item.YSplitType;
|
|
1170
1173
|
if (IFrameSplitOperator.IsNumber(item.FilterType)) chart.Frame.SubFrame[index].Frame.YSplitOperator.FilterType=item.FilterType;
|
|
@@ -2752,7 +2755,9 @@ var JSCHART_BUTTON_ID=
|
|
|
2752
2755
|
POP_MENU_2:41,
|
|
2753
2756
|
POP_MENU_3:42,
|
|
2754
2757
|
|
|
2755
|
-
INDEX_NAME_BUTTON:43
|
|
2758
|
+
INDEX_NAME_BUTTON:43,
|
|
2759
|
+
|
|
2760
|
+
ADD_INDEX_WINDOW:44, //增加指标窗口
|
|
2756
2761
|
}
|
|
2757
2762
|
|
|
2758
2763
|
var JSCHART_DATA_FIELD_ID=
|
|
@@ -8989,7 +8994,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8989
8994
|
let indexInfo = scriptData.Get(indexName);
|
|
8990
8995
|
if (!indexInfo) return;
|
|
8991
8996
|
|
|
8992
|
-
this.
|
|
8997
|
+
this.Frame.RestoreIndexWindows(); //还原隐藏的窗口
|
|
8993
8998
|
var index=this.AddNewSubFrame(option);
|
|
8994
8999
|
|
|
8995
9000
|
JSIndexScript.ModifyAttribute(indexInfo, option);
|
|
@@ -9007,7 +9012,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9007
9012
|
{
|
|
9008
9013
|
if (!indexData.API) return;
|
|
9009
9014
|
|
|
9010
|
-
this.
|
|
9015
|
+
this.Frame.RestoreIndexWindows(); //还原隐藏的窗口
|
|
9011
9016
|
var index=this.AddNewSubFrame(option);
|
|
9012
9017
|
|
|
9013
9018
|
//使用API挂接指标数据 API:{ Name:指标名字, Script:指标脚本可以为空, Args:参数可以为空, Url:指标执行地址 }
|
|
@@ -9026,7 +9031,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
9026
9031
|
{
|
|
9027
9032
|
if (!indexInfo || !indexInfo.Script || !indexInfo.Name) return;
|
|
9028
9033
|
|
|
9029
|
-
this.
|
|
9034
|
+
this.Frame.RestoreIndexWindows(); //还原隐藏的窗口
|
|
9030
9035
|
var index=this.AddNewSubFrame(option);
|
|
9031
9036
|
|
|
9032
9037
|
var indexData =
|
|
@@ -11587,6 +11592,7 @@ function AverageWidthFrame()
|
|
|
11587
11592
|
this.MaxMinWindowButton=CloneData(g_JSChartResource.Buttons.MaxMinWindow);
|
|
11588
11593
|
this.TitleWindowButton=CloneData(g_JSChartResource.Buttons.TitleWindow);
|
|
11589
11594
|
this.ExportDataButton=CloneData(g_JSChartResource.Buttons.ExportData);
|
|
11595
|
+
this.AddIndexWindowButton=CloneData(g_JSChartResource.Buttons.AddIndexWindow);
|
|
11590
11596
|
|
|
11591
11597
|
this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);
|
|
11592
11598
|
|
|
@@ -11624,6 +11630,7 @@ function AverageWidthFrame()
|
|
|
11624
11630
|
this.MaxMinWindowButton=CloneData(g_JSChartResource.Buttons.MaxMinWindow);
|
|
11625
11631
|
this.TitleWindowButton=CloneData(g_JSChartResource.Buttons.TitleWindow);
|
|
11626
11632
|
this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);
|
|
11633
|
+
this.AddIndexWindowButton=CloneData(g_JSChartResource.Buttons.AddIndexWindow);
|
|
11627
11634
|
}
|
|
11628
11635
|
}
|
|
11629
11636
|
|
|
@@ -14050,8 +14057,9 @@ function MinuteFrame()
|
|
|
14050
14057
|
this.CloseIndex=g_JSChartResource.MinuteToolbar.CloseIndex; //是否显示'关闭指标窗口'菜单
|
|
14051
14058
|
this.MaxMinWindow=g_JSChartResource.MinuteToolbar.MaxMinWindow;
|
|
14052
14059
|
this.TitleWindow=g_JSChartResource.MinuteToolbar.TitleWindow;
|
|
14053
|
-
this.ExportData=g_JSChartResource.MinuteToolbar.ExportData;
|
|
14060
|
+
this.ExportData=g_JSChartResource.MinuteToolbar.ExportData; //是否显示'导出数据'菜单
|
|
14054
14061
|
this.OverlayIndex=g_JSChartResource.MinuteToolbar.OverlayIndex; //是否显示叠加指标
|
|
14062
|
+
this.AddIndexWindow=g_JSChartResource.MinuteToolbar.AddIndexWindow; //是否显示'增加指标窗口'菜单
|
|
14055
14063
|
|
|
14056
14064
|
this.ToolbarRect=null; //保存工具条的位置
|
|
14057
14065
|
this.IsShowPositionTitle=false; //是否显示持仓标题
|
|
@@ -14312,6 +14320,7 @@ function MinuteFrame()
|
|
|
14312
14320
|
if (this.OverlayIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.OVERLAY_INDEX, Style:this.OverlayIndexButton });
|
|
14313
14321
|
if (this.ChangeIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.CHANGE_INDEX, Style:this.ChangeIndexButton });
|
|
14314
14322
|
if (this.ModifyIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM, Style:this.ModifyIndexParamButton });
|
|
14323
|
+
if (this.AddIndexWindow) aryButton.push({ ID:JSCHART_BUTTON_ID.ADD_INDEX_WINDOW, Style:this.AddIndexWindowButton} );
|
|
14315
14324
|
}
|
|
14316
14325
|
|
|
14317
14326
|
if (IFrameSplitOperator.IsNonEmptyArray(this.CustomToolbar))
|
|
@@ -16478,6 +16487,7 @@ function KLineFrame()
|
|
|
16478
16487
|
this.MaxMinWindow=g_JSChartResource.KLineToolbar.MaxMinWindow;
|
|
16479
16488
|
this.TitleWindow=g_JSChartResource.KLineToolbar.TitleWindow;
|
|
16480
16489
|
this.ExportData=g_JSChartResource.KLineToolbar.ExportData; //是否显示'导出数据'菜单
|
|
16490
|
+
this.AddIndexWindow=g_JSChartResource.KLineToolbar.AddIndexWindow; //是否显示'增加指标窗口'菜单
|
|
16481
16491
|
|
|
16482
16492
|
this.SelBorderColor=g_JSChartResource.SelFrameBorderColor;
|
|
16483
16493
|
|
|
@@ -16673,6 +16683,7 @@ function KLineFrame()
|
|
|
16673
16683
|
if (this.OverlayIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.OVERLAY_INDEX, Style:this.OverlayIndexButton });
|
|
16674
16684
|
if (this.ChangeIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.CHANGE_INDEX, Style:this.ChangeIndexButton });
|
|
16675
16685
|
if (this.ModifyIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM, Style:this.ModifyIndexParamButton });
|
|
16686
|
+
if (this.AddIndexWindow) aryButton.push({ ID:JSCHART_BUTTON_ID.ADD_INDEX_WINDOW, Style:this.AddIndexWindowButton} );
|
|
16676
16687
|
|
|
16677
16688
|
if (IFrameSplitOperator.IsNonEmptyArray(this.CustomToolbar))
|
|
16678
16689
|
{
|
|
@@ -69276,6 +69287,7 @@ function JSChartResource()
|
|
|
69276
69287
|
MaxMinWindow:true, //最大最小化窗口
|
|
69277
69288
|
TitleWindow:true, //标题模式
|
|
69278
69289
|
ExportData:false, //数据导出
|
|
69290
|
+
AddIndexWindow:false, //增加指标窗口
|
|
69279
69291
|
|
|
69280
69292
|
IsShowOverlayToolbar:true, //是否显示叠加坐标工具栏按钮
|
|
69281
69293
|
IsShowOverlayFrame:true, //是否显示右侧叠加坐标
|
|
@@ -69291,6 +69303,7 @@ function JSChartResource()
|
|
|
69291
69303
|
MaxMinWindow:true, //最大最小化窗口
|
|
69292
69304
|
TitleWindow:true, //标题模式
|
|
69293
69305
|
ExportData:false, //数据导出
|
|
69306
|
+
AddIndexWindow:false, //增加指标窗口
|
|
69294
69307
|
}
|
|
69295
69308
|
|
|
69296
69309
|
this.TooltipBGColor="rgb(255, 255, 255)"; //背景色
|
|
@@ -69785,16 +69798,26 @@ function JSChartResource()
|
|
|
69785
69798
|
MerginLeft:4
|
|
69786
69799
|
},
|
|
69787
69800
|
|
|
69788
|
-
|
|
69789
|
-
|
|
69790
|
-
|
|
69791
|
-
|
|
69792
|
-
|
|
69793
|
-
|
|
69794
|
-
|
|
69795
|
-
|
|
69796
|
-
|
|
69797
|
-
|
|
69801
|
+
//指标标题窗口模式
|
|
69802
|
+
ExportData:
|
|
69803
|
+
{
|
|
69804
|
+
Color:"rgb(0,0,0)",
|
|
69805
|
+
MoveOnColor:'rgb(30,144,255)',
|
|
69806
|
+
Family:"iconfont",
|
|
69807
|
+
Text:"\ue6a9",
|
|
69808
|
+
Size:13*GetDevicePixelRatio(),
|
|
69809
|
+
MerginLeft:4
|
|
69810
|
+
},
|
|
69811
|
+
|
|
69812
|
+
AddIndexWindow:
|
|
69813
|
+
{
|
|
69814
|
+
Color:"rgb(0,0,0)",
|
|
69815
|
+
MoveOnColor:'rgb(30,144,255)',
|
|
69816
|
+
Family:"iconfont",
|
|
69817
|
+
Text:"\ue64f",
|
|
69818
|
+
Size:13*GetDevicePixelRatio(),
|
|
69819
|
+
MerginLeft:4
|
|
69820
|
+
},
|
|
69798
69821
|
|
|
69799
69822
|
Tooltip:
|
|
69800
69823
|
{
|
|
@@ -71430,6 +71453,7 @@ function JSChartResource()
|
|
|
71430
71453
|
T_SetButtonStyle(buttons.MaxMinWindow, this.Buttons.MaxMinWindow);
|
|
71431
71454
|
T_SetButtonStyle(buttons.TitleWindow, this.Buttons.TitleWindow);
|
|
71432
71455
|
T_SetButtonStyle(buttons.ExportData, this.Buttons.ExportData);
|
|
71456
|
+
T_SetButtonStyle(buttons.AddIndexWindow, this.Buttons.AddIndexWindow);
|
|
71433
71457
|
|
|
71434
71458
|
if (buttons.Tooltip)
|
|
71435
71459
|
{
|
|
@@ -71511,6 +71535,9 @@ function JSChartResource()
|
|
|
71511
71535
|
|
|
71512
71536
|
|
|
71513
71537
|
if (style.Keyboard) this.SetKeyboardStyle(style.Keyboard);
|
|
71538
|
+
|
|
71539
|
+
if (style.MinuteToolbar) this.SetMinuteToolbar(style.MinuteToolbar);
|
|
71540
|
+
if (style.KLineToolbar) this.SetKLineToolbar(style.KLineToolbar);
|
|
71514
71541
|
}
|
|
71515
71542
|
|
|
71516
71543
|
|
|
@@ -72060,6 +72087,36 @@ function JSChartResource()
|
|
|
72060
72087
|
|
|
72061
72088
|
}
|
|
72062
72089
|
|
|
72090
|
+
this.SetMinuteToolbar=function(style)
|
|
72091
|
+
{
|
|
72092
|
+
var dest=this.MinuteToolbar;
|
|
72093
|
+
if (IFrameSplitOperator.IsBool(style.ModifyIndex)) dest.ModifyIndex=style.ModifyIndex;
|
|
72094
|
+
if (IFrameSplitOperator.IsBool(style.ChangeIndex)) dest.ChangeIndex=style.ChangeIndex;
|
|
72095
|
+
if (IFrameSplitOperator.IsBool(style.CloseIndex)) dest.CloseIndex=style.CloseIndex;
|
|
72096
|
+
if (IFrameSplitOperator.IsBool(style.OverlayIndex)) dest.OverlayIndex=style.OverlayIndex;
|
|
72097
|
+
if (IFrameSplitOperator.IsBool(style.MaxMinWindow)) dest.ModifyIndex=style.MaxMinWindow;
|
|
72098
|
+
if (IFrameSplitOperator.IsBool(style.TitleWindow)) dest.ModifyIndex=style.TitleWindow;
|
|
72099
|
+
if (IFrameSplitOperator.IsBool(style.ExportData)) dest.ModifyIndex=style.ExportData;
|
|
72100
|
+
if (IFrameSplitOperator.IsBool(style.AddIndexWindow)) dest.AddIndexWindow=style.AddIndexWindow;
|
|
72101
|
+
|
|
72102
|
+
if (IFrameSplitOperator.IsBool(style.IsShowOverlayToolbar)) dest.IsShowOverlayToolbar=style.IsShowOverlayToolbar;
|
|
72103
|
+
if (IFrameSplitOperator.IsBool(style.IsShowOverlayFrame)) dest.IsShowOverlayFrame=style.IsShowOverlayFrame;
|
|
72104
|
+
}
|
|
72105
|
+
|
|
72106
|
+
this.SetKLineToolbar=function(style)
|
|
72107
|
+
{
|
|
72108
|
+
var dest=this.KLineToolbar;
|
|
72109
|
+
|
|
72110
|
+
if (IFrameSplitOperator.IsBool(style.ModifyIndex)) dest.ModifyIndex=style.ModifyIndex;
|
|
72111
|
+
if (IFrameSplitOperator.IsBool(style.ChangeIndex)) dest.ChangeIndex=style.ChangeIndex;
|
|
72112
|
+
if (IFrameSplitOperator.IsBool(style.CloseIndex)) dest.CloseIndex=style.CloseIndex;
|
|
72113
|
+
if (IFrameSplitOperator.IsBool(style.OverlayIndex)) dest.OverlayIndex=style.OverlayIndex;
|
|
72114
|
+
if (IFrameSplitOperator.IsBool(style.MaxMinWindow)) dest.ModifyIndex=style.MaxMinWindow;
|
|
72115
|
+
if (IFrameSplitOperator.IsBool(style.TitleWindow)) dest.ModifyIndex=style.TitleWindow;
|
|
72116
|
+
if (IFrameSplitOperator.IsBool(style.ExportData)) dest.ModifyIndex=style.ExportData;
|
|
72117
|
+
if (IFrameSplitOperator.IsBool(style.AddIndexWindow)) dest.AddIndexWindow=style.AddIndexWindow;
|
|
72118
|
+
}
|
|
72119
|
+
|
|
72063
72120
|
}
|
|
72064
72121
|
|
|
72065
72122
|
var g_JSChartResource=new JSChartResource();
|
|
@@ -72270,6 +72327,7 @@ function JSChartLocalization()
|
|
|
72270
72327
|
["Toolbar-"+JSCHART_BUTTON_ID.MAX_MIN_WINDOW, {CN:"最大化", EN:"Maximize", TC:"最大化"}],
|
|
72271
72328
|
["Toolbar-"+JSCHART_BUTTON_ID.TITLE_WINDOW, {CN:"折叠窗口", EN:"Collapse window", TC:"折叠窗口"}],
|
|
72272
72329
|
["Toolbar-"+JSCHART_BUTTON_ID.EXPORT_DATA, {CN:"数据导出", EN:"Export data", TC:"数据导出"}],
|
|
72330
|
+
["Toolbar-"+JSCHART_BUTTON_ID.ADD_INDEX_WINDOW, {CN:"增加指标窗口", EN:"Add index window", TC:"增加指标窗口"}],
|
|
72273
72331
|
|
|
72274
72332
|
["Toolbar-"+JSCHART_BUTTON_ID.CLOSE_BEFOREOPEN_ID, {CN:"关闭集合竞价", EN:"Close call auction", TC:"关闭集合竞价"}],
|
|
72275
72333
|
["Toolbar-"+JSCHART_BUTTON_ID.CLOSE_OVERLAY_INDEX, {CN:"关闭叠加指标", EN:"Delte overlay indicator", TC:"关闭叠加指标"}],
|
|
@@ -80283,11 +80341,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80283
80341
|
var frame=button.Frame;
|
|
80284
80342
|
var sendData={ e:e, WindowIndex:frame.Identify, OpType:1 };
|
|
80285
80343
|
this.ShowChangeIndexDialog(sendData);
|
|
80286
|
-
/*
|
|
80287
|
-
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:false };
|
|
80288
|
-
if (frame.ChangeIndexEvent)
|
|
80289
|
-
frame.ChangeIndexEvent(e);
|
|
80290
|
-
*/
|
|
80291
80344
|
}
|
|
80292
80345
|
else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
|
|
80293
80346
|
{
|
|
@@ -80300,11 +80353,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80300
80353
|
var frame=button.Frame;
|
|
80301
80354
|
var sendData={ e:e, WindowIndex:frame.Identify, OpType:2 };
|
|
80302
80355
|
this.ShowAddOverlayIndexDialog(sendData);
|
|
80303
|
-
/*
|
|
80304
|
-
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:true };
|
|
80305
|
-
if (frame.ChangeIndexEvent)
|
|
80306
|
-
frame.ChangeIndexEvent(e);
|
|
80307
|
-
*/
|
|
80308
80356
|
}
|
|
80309
80357
|
else if (button.ID==JSCHART_BUTTON_ID.MAX_MIN_WINDOW)
|
|
80310
80358
|
{
|
|
@@ -80346,6 +80394,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
80346
80394
|
alink.click();
|
|
80347
80395
|
document.body.removeChild(alink);
|
|
80348
80396
|
}
|
|
80397
|
+
else if (button.ID==JSCHART_BUTTON_ID.ADD_INDEX_WINDOW) //增加指标窗口
|
|
80398
|
+
{
|
|
80399
|
+
var INDEX_LIST=["CCI","CHO","ADTM","BIAS36","MACD"];
|
|
80400
|
+
var index=this.Frame.SubFrame.length+1;
|
|
80401
|
+
var indexName=INDEX_LIST[index%INDEX_LIST.length];
|
|
80402
|
+
this.AddIndexWindow(indexName);
|
|
80403
|
+
}
|
|
80349
80404
|
}
|
|
80350
80405
|
|
|
80351
80406
|
this.ClickTitleButton=function(button, e)
|
|
@@ -81175,6 +81230,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
81175
81230
|
alink.click();
|
|
81176
81231
|
document.body.removeChild(alink);
|
|
81177
81232
|
}
|
|
81233
|
+
else if (button.ID==JSCHART_BUTTON_ID.ADD_INDEX_WINDOW) //增加指标窗口
|
|
81234
|
+
{
|
|
81235
|
+
var INDEX_LIST=["CCI","CHO","ADTM","BIAS36","MACD"];
|
|
81236
|
+
var index=this.Frame.SubFrame.length+1;
|
|
81237
|
+
var indexName=INDEX_LIST[index%INDEX_LIST.length];
|
|
81238
|
+
this.AddIndexWindow(indexName);
|
|
81239
|
+
}
|
|
81178
81240
|
|
|
81179
81241
|
}
|
|
81180
81242
|
|
|
@@ -4624,6 +4624,8 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4624
4624
|
if (IFrameSplitOperator.IsBool(item.Export)) frame.ExportData=item.Export;
|
|
4625
4625
|
if (IFrameSplitOperator.IsBool(item.MaxMin)) chart.Frame.SubFrame[i].Frame.MaxMinWindow=item.MaxMin;
|
|
4626
4626
|
if (IFrameSplitOperator.IsBool(item.TitleWindow)) chart.Frame.SubFrame[i].Frame.TitleWindow=item.TitleWindow;
|
|
4627
|
+
if (IFrameSplitOperator.IsBool(item.AddIndexWindow)) frame.AddIndexWindow=item.AddIndexWindow;
|
|
4628
|
+
|
|
4627
4629
|
if (item.IsDrawTitleBG==true) chart.Frame.SubFrame[i].Frame.IsDrawTitleBG=item.IsDrawTitleBG;
|
|
4628
4630
|
if (IFrameSplitOperator.IsBool(item.IsShowNameArrow)) chart.Frame.SubFrame[i].Frame.IsShowNameArrow=item.IsShowNameArrow;
|
|
4629
4631
|
|
|
@@ -5090,6 +5092,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5090
5092
|
if (IFrameSplitOperator.IsBool(item.Export)) frame.ExportData=item.Export;
|
|
5091
5093
|
if (IFrameSplitOperator.IsBool(item.MaxMin)) frame.MaxMinWindow=item.MaxMin;
|
|
5092
5094
|
if (IFrameSplitOperator.IsBool(item.TitleWindow)) frame.TitleWindow=item.TitleWindow;
|
|
5095
|
+
if (IFrameSplitOperator.IsBool(item.AddIndexWindow)) frame.AddIndexWindow=item.AddIndexWindow;
|
|
5093
5096
|
|
|
5094
5097
|
if (IFrameSplitOperator.IsNumber(item.YSplitType)) chart.Frame.SubFrame[index].Frame.YSplitOperator.SplitType=item.YSplitType;
|
|
5095
5098
|
if (IFrameSplitOperator.IsNumber(item.FilterType)) chart.Frame.SubFrame[index].Frame.YSplitOperator.FilterType=item.FilterType;
|
|
@@ -6677,7 +6680,9 @@ var JSCHART_BUTTON_ID=
|
|
|
6677
6680
|
POP_MENU_2:41,
|
|
6678
6681
|
POP_MENU_3:42,
|
|
6679
6682
|
|
|
6680
|
-
INDEX_NAME_BUTTON:43
|
|
6683
|
+
INDEX_NAME_BUTTON:43,
|
|
6684
|
+
|
|
6685
|
+
ADD_INDEX_WINDOW:44, //增加指标窗口
|
|
6681
6686
|
}
|
|
6682
6687
|
|
|
6683
6688
|
var JSCHART_DATA_FIELD_ID=
|
|
@@ -12914,7 +12919,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12914
12919
|
let indexInfo = scriptData.Get(indexName);
|
|
12915
12920
|
if (!indexInfo) return;
|
|
12916
12921
|
|
|
12917
|
-
this.
|
|
12922
|
+
this.Frame.RestoreIndexWindows(); //还原隐藏的窗口
|
|
12918
12923
|
var index=this.AddNewSubFrame(option);
|
|
12919
12924
|
|
|
12920
12925
|
JSIndexScript.ModifyAttribute(indexInfo, option);
|
|
@@ -12932,7 +12937,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12932
12937
|
{
|
|
12933
12938
|
if (!indexData.API) return;
|
|
12934
12939
|
|
|
12935
|
-
this.
|
|
12940
|
+
this.Frame.RestoreIndexWindows(); //还原隐藏的窗口
|
|
12936
12941
|
var index=this.AddNewSubFrame(option);
|
|
12937
12942
|
|
|
12938
12943
|
//使用API挂接指标数据 API:{ Name:指标名字, Script:指标脚本可以为空, Args:参数可以为空, Url:指标执行地址 }
|
|
@@ -12951,7 +12956,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12951
12956
|
{
|
|
12952
12957
|
if (!indexInfo || !indexInfo.Script || !indexInfo.Name) return;
|
|
12953
12958
|
|
|
12954
|
-
this.
|
|
12959
|
+
this.Frame.RestoreIndexWindows(); //还原隐藏的窗口
|
|
12955
12960
|
var index=this.AddNewSubFrame(option);
|
|
12956
12961
|
|
|
12957
12962
|
var indexData =
|
|
@@ -15512,6 +15517,7 @@ function AverageWidthFrame()
|
|
|
15512
15517
|
this.MaxMinWindowButton=CloneData(g_JSChartResource.Buttons.MaxMinWindow);
|
|
15513
15518
|
this.TitleWindowButton=CloneData(g_JSChartResource.Buttons.TitleWindow);
|
|
15514
15519
|
this.ExportDataButton=CloneData(g_JSChartResource.Buttons.ExportData);
|
|
15520
|
+
this.AddIndexWindowButton=CloneData(g_JSChartResource.Buttons.AddIndexWindow);
|
|
15515
15521
|
|
|
15516
15522
|
this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);
|
|
15517
15523
|
|
|
@@ -15549,6 +15555,7 @@ function AverageWidthFrame()
|
|
|
15549
15555
|
this.MaxMinWindowButton=CloneData(g_JSChartResource.Buttons.MaxMinWindow);
|
|
15550
15556
|
this.TitleWindowButton=CloneData(g_JSChartResource.Buttons.TitleWindow);
|
|
15551
15557
|
this.ButtonTooltip=CloneData(g_JSChartResource.Buttons.Tooltip);
|
|
15558
|
+
this.AddIndexWindowButton=CloneData(g_JSChartResource.Buttons.AddIndexWindow);
|
|
15552
15559
|
}
|
|
15553
15560
|
}
|
|
15554
15561
|
|
|
@@ -17975,8 +17982,9 @@ function MinuteFrame()
|
|
|
17975
17982
|
this.CloseIndex=g_JSChartResource.MinuteToolbar.CloseIndex; //是否显示'关闭指标窗口'菜单
|
|
17976
17983
|
this.MaxMinWindow=g_JSChartResource.MinuteToolbar.MaxMinWindow;
|
|
17977
17984
|
this.TitleWindow=g_JSChartResource.MinuteToolbar.TitleWindow;
|
|
17978
|
-
this.ExportData=g_JSChartResource.MinuteToolbar.ExportData;
|
|
17985
|
+
this.ExportData=g_JSChartResource.MinuteToolbar.ExportData; //是否显示'导出数据'菜单
|
|
17979
17986
|
this.OverlayIndex=g_JSChartResource.MinuteToolbar.OverlayIndex; //是否显示叠加指标
|
|
17987
|
+
this.AddIndexWindow=g_JSChartResource.MinuteToolbar.AddIndexWindow; //是否显示'增加指标窗口'菜单
|
|
17980
17988
|
|
|
17981
17989
|
this.ToolbarRect=null; //保存工具条的位置
|
|
17982
17990
|
this.IsShowPositionTitle=false; //是否显示持仓标题
|
|
@@ -18237,6 +18245,7 @@ function MinuteFrame()
|
|
|
18237
18245
|
if (this.OverlayIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.OVERLAY_INDEX, Style:this.OverlayIndexButton });
|
|
18238
18246
|
if (this.ChangeIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.CHANGE_INDEX, Style:this.ChangeIndexButton });
|
|
18239
18247
|
if (this.ModifyIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM, Style:this.ModifyIndexParamButton });
|
|
18248
|
+
if (this.AddIndexWindow) aryButton.push({ ID:JSCHART_BUTTON_ID.ADD_INDEX_WINDOW, Style:this.AddIndexWindowButton} );
|
|
18240
18249
|
}
|
|
18241
18250
|
|
|
18242
18251
|
if (IFrameSplitOperator.IsNonEmptyArray(this.CustomToolbar))
|
|
@@ -20403,6 +20412,7 @@ function KLineFrame()
|
|
|
20403
20412
|
this.MaxMinWindow=g_JSChartResource.KLineToolbar.MaxMinWindow;
|
|
20404
20413
|
this.TitleWindow=g_JSChartResource.KLineToolbar.TitleWindow;
|
|
20405
20414
|
this.ExportData=g_JSChartResource.KLineToolbar.ExportData; //是否显示'导出数据'菜单
|
|
20415
|
+
this.AddIndexWindow=g_JSChartResource.KLineToolbar.AddIndexWindow; //是否显示'增加指标窗口'菜单
|
|
20406
20416
|
|
|
20407
20417
|
this.SelBorderColor=g_JSChartResource.SelFrameBorderColor;
|
|
20408
20418
|
|
|
@@ -20598,6 +20608,7 @@ function KLineFrame()
|
|
|
20598
20608
|
if (this.OverlayIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.OVERLAY_INDEX, Style:this.OverlayIndexButton });
|
|
20599
20609
|
if (this.ChangeIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.CHANGE_INDEX, Style:this.ChangeIndexButton });
|
|
20600
20610
|
if (this.ModifyIndex) aryButton.push( { ID:JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM, Style:this.ModifyIndexParamButton });
|
|
20611
|
+
if (this.AddIndexWindow) aryButton.push({ ID:JSCHART_BUTTON_ID.ADD_INDEX_WINDOW, Style:this.AddIndexWindowButton} );
|
|
20601
20612
|
|
|
20602
20613
|
if (IFrameSplitOperator.IsNonEmptyArray(this.CustomToolbar))
|
|
20603
20614
|
{
|
|
@@ -73201,6 +73212,7 @@ function JSChartResource()
|
|
|
73201
73212
|
MaxMinWindow:true, //最大最小化窗口
|
|
73202
73213
|
TitleWindow:true, //标题模式
|
|
73203
73214
|
ExportData:false, //数据导出
|
|
73215
|
+
AddIndexWindow:false, //增加指标窗口
|
|
73204
73216
|
|
|
73205
73217
|
IsShowOverlayToolbar:true, //是否显示叠加坐标工具栏按钮
|
|
73206
73218
|
IsShowOverlayFrame:true, //是否显示右侧叠加坐标
|
|
@@ -73216,6 +73228,7 @@ function JSChartResource()
|
|
|
73216
73228
|
MaxMinWindow:true, //最大最小化窗口
|
|
73217
73229
|
TitleWindow:true, //标题模式
|
|
73218
73230
|
ExportData:false, //数据导出
|
|
73231
|
+
AddIndexWindow:false, //增加指标窗口
|
|
73219
73232
|
}
|
|
73220
73233
|
|
|
73221
73234
|
this.TooltipBGColor="rgb(255, 255, 255)"; //背景色
|
|
@@ -73710,16 +73723,26 @@ function JSChartResource()
|
|
|
73710
73723
|
MerginLeft:4
|
|
73711
73724
|
},
|
|
73712
73725
|
|
|
73713
|
-
|
|
73714
|
-
|
|
73715
|
-
|
|
73716
|
-
|
|
73717
|
-
|
|
73718
|
-
|
|
73719
|
-
|
|
73720
|
-
|
|
73721
|
-
|
|
73722
|
-
|
|
73726
|
+
//指标标题窗口模式
|
|
73727
|
+
ExportData:
|
|
73728
|
+
{
|
|
73729
|
+
Color:"rgb(0,0,0)",
|
|
73730
|
+
MoveOnColor:'rgb(30,144,255)',
|
|
73731
|
+
Family:"iconfont",
|
|
73732
|
+
Text:"\ue6a9",
|
|
73733
|
+
Size:13*GetDevicePixelRatio(),
|
|
73734
|
+
MerginLeft:4
|
|
73735
|
+
},
|
|
73736
|
+
|
|
73737
|
+
AddIndexWindow:
|
|
73738
|
+
{
|
|
73739
|
+
Color:"rgb(0,0,0)",
|
|
73740
|
+
MoveOnColor:'rgb(30,144,255)',
|
|
73741
|
+
Family:"iconfont",
|
|
73742
|
+
Text:"\ue64f",
|
|
73743
|
+
Size:13*GetDevicePixelRatio(),
|
|
73744
|
+
MerginLeft:4
|
|
73745
|
+
},
|
|
73723
73746
|
|
|
73724
73747
|
Tooltip:
|
|
73725
73748
|
{
|
|
@@ -75355,6 +75378,7 @@ function JSChartResource()
|
|
|
75355
75378
|
T_SetButtonStyle(buttons.MaxMinWindow, this.Buttons.MaxMinWindow);
|
|
75356
75379
|
T_SetButtonStyle(buttons.TitleWindow, this.Buttons.TitleWindow);
|
|
75357
75380
|
T_SetButtonStyle(buttons.ExportData, this.Buttons.ExportData);
|
|
75381
|
+
T_SetButtonStyle(buttons.AddIndexWindow, this.Buttons.AddIndexWindow);
|
|
75358
75382
|
|
|
75359
75383
|
if (buttons.Tooltip)
|
|
75360
75384
|
{
|
|
@@ -75436,6 +75460,9 @@ function JSChartResource()
|
|
|
75436
75460
|
|
|
75437
75461
|
|
|
75438
75462
|
if (style.Keyboard) this.SetKeyboardStyle(style.Keyboard);
|
|
75463
|
+
|
|
75464
|
+
if (style.MinuteToolbar) this.SetMinuteToolbar(style.MinuteToolbar);
|
|
75465
|
+
if (style.KLineToolbar) this.SetKLineToolbar(style.KLineToolbar);
|
|
75439
75466
|
}
|
|
75440
75467
|
|
|
75441
75468
|
|
|
@@ -75985,6 +76012,36 @@ function JSChartResource()
|
|
|
75985
76012
|
|
|
75986
76013
|
}
|
|
75987
76014
|
|
|
76015
|
+
this.SetMinuteToolbar=function(style)
|
|
76016
|
+
{
|
|
76017
|
+
var dest=this.MinuteToolbar;
|
|
76018
|
+
if (IFrameSplitOperator.IsBool(style.ModifyIndex)) dest.ModifyIndex=style.ModifyIndex;
|
|
76019
|
+
if (IFrameSplitOperator.IsBool(style.ChangeIndex)) dest.ChangeIndex=style.ChangeIndex;
|
|
76020
|
+
if (IFrameSplitOperator.IsBool(style.CloseIndex)) dest.CloseIndex=style.CloseIndex;
|
|
76021
|
+
if (IFrameSplitOperator.IsBool(style.OverlayIndex)) dest.OverlayIndex=style.OverlayIndex;
|
|
76022
|
+
if (IFrameSplitOperator.IsBool(style.MaxMinWindow)) dest.ModifyIndex=style.MaxMinWindow;
|
|
76023
|
+
if (IFrameSplitOperator.IsBool(style.TitleWindow)) dest.ModifyIndex=style.TitleWindow;
|
|
76024
|
+
if (IFrameSplitOperator.IsBool(style.ExportData)) dest.ModifyIndex=style.ExportData;
|
|
76025
|
+
if (IFrameSplitOperator.IsBool(style.AddIndexWindow)) dest.AddIndexWindow=style.AddIndexWindow;
|
|
76026
|
+
|
|
76027
|
+
if (IFrameSplitOperator.IsBool(style.IsShowOverlayToolbar)) dest.IsShowOverlayToolbar=style.IsShowOverlayToolbar;
|
|
76028
|
+
if (IFrameSplitOperator.IsBool(style.IsShowOverlayFrame)) dest.IsShowOverlayFrame=style.IsShowOverlayFrame;
|
|
76029
|
+
}
|
|
76030
|
+
|
|
76031
|
+
this.SetKLineToolbar=function(style)
|
|
76032
|
+
{
|
|
76033
|
+
var dest=this.KLineToolbar;
|
|
76034
|
+
|
|
76035
|
+
if (IFrameSplitOperator.IsBool(style.ModifyIndex)) dest.ModifyIndex=style.ModifyIndex;
|
|
76036
|
+
if (IFrameSplitOperator.IsBool(style.ChangeIndex)) dest.ChangeIndex=style.ChangeIndex;
|
|
76037
|
+
if (IFrameSplitOperator.IsBool(style.CloseIndex)) dest.CloseIndex=style.CloseIndex;
|
|
76038
|
+
if (IFrameSplitOperator.IsBool(style.OverlayIndex)) dest.OverlayIndex=style.OverlayIndex;
|
|
76039
|
+
if (IFrameSplitOperator.IsBool(style.MaxMinWindow)) dest.ModifyIndex=style.MaxMinWindow;
|
|
76040
|
+
if (IFrameSplitOperator.IsBool(style.TitleWindow)) dest.ModifyIndex=style.TitleWindow;
|
|
76041
|
+
if (IFrameSplitOperator.IsBool(style.ExportData)) dest.ModifyIndex=style.ExportData;
|
|
76042
|
+
if (IFrameSplitOperator.IsBool(style.AddIndexWindow)) dest.AddIndexWindow=style.AddIndexWindow;
|
|
76043
|
+
}
|
|
76044
|
+
|
|
75988
76045
|
}
|
|
75989
76046
|
|
|
75990
76047
|
var g_JSChartResource=new JSChartResource();
|
|
@@ -76195,6 +76252,7 @@ function JSChartLocalization()
|
|
|
76195
76252
|
["Toolbar-"+JSCHART_BUTTON_ID.MAX_MIN_WINDOW, {CN:"最大化", EN:"Maximize", TC:"最大化"}],
|
|
76196
76253
|
["Toolbar-"+JSCHART_BUTTON_ID.TITLE_WINDOW, {CN:"折叠窗口", EN:"Collapse window", TC:"折叠窗口"}],
|
|
76197
76254
|
["Toolbar-"+JSCHART_BUTTON_ID.EXPORT_DATA, {CN:"数据导出", EN:"Export data", TC:"数据导出"}],
|
|
76255
|
+
["Toolbar-"+JSCHART_BUTTON_ID.ADD_INDEX_WINDOW, {CN:"增加指标窗口", EN:"Add index window", TC:"增加指标窗口"}],
|
|
76198
76256
|
|
|
76199
76257
|
["Toolbar-"+JSCHART_BUTTON_ID.CLOSE_BEFOREOPEN_ID, {CN:"关闭集合竞价", EN:"Close call auction", TC:"关闭集合竞价"}],
|
|
76200
76258
|
["Toolbar-"+JSCHART_BUTTON_ID.CLOSE_OVERLAY_INDEX, {CN:"关闭叠加指标", EN:"Delte overlay indicator", TC:"关闭叠加指标"}],
|
|
@@ -84208,11 +84266,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
84208
84266
|
var frame=button.Frame;
|
|
84209
84267
|
var sendData={ e:e, WindowIndex:frame.Identify, OpType:1 };
|
|
84210
84268
|
this.ShowChangeIndexDialog(sendData);
|
|
84211
|
-
/*
|
|
84212
|
-
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:false };
|
|
84213
|
-
if (frame.ChangeIndexEvent)
|
|
84214
|
-
frame.ChangeIndexEvent(e);
|
|
84215
|
-
*/
|
|
84216
84269
|
}
|
|
84217
84270
|
else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
|
|
84218
84271
|
{
|
|
@@ -84225,11 +84278,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
84225
84278
|
var frame=button.Frame;
|
|
84226
84279
|
var sendData={ e:e, WindowIndex:frame.Identify, OpType:2 };
|
|
84227
84280
|
this.ShowAddOverlayIndexDialog(sendData);
|
|
84228
|
-
/*
|
|
84229
|
-
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:true };
|
|
84230
|
-
if (frame.ChangeIndexEvent)
|
|
84231
|
-
frame.ChangeIndexEvent(e);
|
|
84232
|
-
*/
|
|
84233
84281
|
}
|
|
84234
84282
|
else if (button.ID==JSCHART_BUTTON_ID.MAX_MIN_WINDOW)
|
|
84235
84283
|
{
|
|
@@ -84271,6 +84319,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
84271
84319
|
alink.click();
|
|
84272
84320
|
document.body.removeChild(alink);
|
|
84273
84321
|
}
|
|
84322
|
+
else if (button.ID==JSCHART_BUTTON_ID.ADD_INDEX_WINDOW) //增加指标窗口
|
|
84323
|
+
{
|
|
84324
|
+
var INDEX_LIST=["CCI","CHO","ADTM","BIAS36","MACD"];
|
|
84325
|
+
var index=this.Frame.SubFrame.length+1;
|
|
84326
|
+
var indexName=INDEX_LIST[index%INDEX_LIST.length];
|
|
84327
|
+
this.AddIndexWindow(indexName);
|
|
84328
|
+
}
|
|
84274
84329
|
}
|
|
84275
84330
|
|
|
84276
84331
|
this.ClickTitleButton=function(button, e)
|
|
@@ -85100,6 +85155,13 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
85100
85155
|
alink.click();
|
|
85101
85156
|
document.body.removeChild(alink);
|
|
85102
85157
|
}
|
|
85158
|
+
else if (button.ID==JSCHART_BUTTON_ID.ADD_INDEX_WINDOW) //增加指标窗口
|
|
85159
|
+
{
|
|
85160
|
+
var INDEX_LIST=["CCI","CHO","ADTM","BIAS36","MACD"];
|
|
85161
|
+
var index=this.Frame.SubFrame.length+1;
|
|
85162
|
+
var indexName=INDEX_LIST[index%INDEX_LIST.length];
|
|
85163
|
+
this.AddIndexWindow(indexName);
|
|
85164
|
+
}
|
|
85103
85165
|
|
|
85104
85166
|
}
|
|
85105
85167
|
|
|
@@ -125604,6 +125666,12 @@ function GetBlackStyle()
|
|
|
125604
125666
|
Color:"rgb(156,156,156)"
|
|
125605
125667
|
},
|
|
125606
125668
|
|
|
125669
|
+
AddIndexWindow:
|
|
125670
|
+
{
|
|
125671
|
+
MoveOnColor:"rgb(255,255,255)",
|
|
125672
|
+
Color:"rgb(156,156,156)"
|
|
125673
|
+
},
|
|
125674
|
+
|
|
125607
125675
|
Tooltip:
|
|
125608
125676
|
{
|
|
125609
125677
|
//Font:12*GetDevicePixelRatio() +"px 微软雅黑",
|
|
@@ -140037,7 +140105,7 @@ function ScrollBarBGChart()
|
|
|
140037
140105
|
|
|
140038
140106
|
|
|
140039
140107
|
|
|
140040
|
-
var HQCHART_VERSION="1.1.
|
|
140108
|
+
var HQCHART_VERSION="1.1.14210";
|
|
140041
140109
|
|
|
140042
140110
|
function PrintHQChartVersion()
|
|
140043
140111
|
{
|