hqchart 1.1.14056 → 1.1.14072
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 +122 -91
- package/package.json +1 -1
- package/src/jscommon/umychart.DialogSearchIndex.js +603 -0
- package/src/jscommon/umychart.DialogTooltip.js +274 -5
- package/src/jscommon/umychart.js +163 -504
- package/src/jscommon/umychart.resource/css/tools.css +133 -1
- package/src/jscommon/umychart.style.js +11 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +175 -505
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +1052 -510
package/src/jscommon/umychart.js
CHANGED
|
@@ -55,7 +55,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
55
55
|
|
|
56
56
|
//改参数div
|
|
57
57
|
this.ModifyIndexDialog=new ModifyIndexDialog(divElement);
|
|
58
|
-
this.ChangeIndexDialog=new ChangeIndexDialog(divElement);
|
|
59
58
|
|
|
60
59
|
//额外的画布
|
|
61
60
|
this.MapExtraCanvasElement=new Map(); //key=画布名字, value={ Element:, Canvas:}
|
|
@@ -291,7 +290,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
291
290
|
|
|
292
291
|
//创建改参数div
|
|
293
292
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
294
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
295
293
|
|
|
296
294
|
var pixelRatio=GetDevicePixelRatio();
|
|
297
295
|
|
|
@@ -744,7 +742,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
744
742
|
|
|
745
743
|
//创建改参数div
|
|
746
744
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
747
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
748
745
|
|
|
749
746
|
//右键菜单
|
|
750
747
|
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
@@ -847,7 +844,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
847
844
|
if (option.NetworkFilter) chart.NetworkFilter=option.NetworkFilter;
|
|
848
845
|
|
|
849
846
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
850
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
851
847
|
|
|
852
848
|
var pixelRatio=GetDevicePixelRatio();
|
|
853
849
|
|
|
@@ -1429,7 +1425,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1429
1425
|
|
|
1430
1426
|
//创建改参数div
|
|
1431
1427
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
1432
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
1433
1428
|
|
|
1434
1429
|
if (option.ScriptError) chart.ScriptErrorCallback=option.ScriptError;
|
|
1435
1430
|
|
|
@@ -1726,9 +1721,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
1726
1721
|
chart.InitalFloatTooltip(option.FloatTooltip);
|
|
1727
1722
|
|
|
1728
1723
|
if (option.SelectRectDialog && option.SelectRectDialog.Enable)
|
|
1729
|
-
{
|
|
1730
1724
|
chart.InitalSelectRectDialog(option.SelectRectDialog);
|
|
1731
|
-
|
|
1725
|
+
|
|
1726
|
+
if (option.SearchIndexDialog && option.SearchIndexDialog.Enable)
|
|
1727
|
+
chart.InitalSearchIndexDialog(option.SearchIndexDialog);
|
|
1732
1728
|
|
|
1733
1729
|
//注册事件
|
|
1734
1730
|
if (option.EventCallback)
|
|
@@ -2443,6 +2439,12 @@ JSChart.GetScrollPosition=function()
|
|
|
2443
2439
|
return GetScrollPosition();
|
|
2444
2440
|
}
|
|
2445
2441
|
|
|
2442
|
+
//品种小数位数
|
|
2443
|
+
JSChart.GetfloatPrecision=function(symbol)
|
|
2444
|
+
{
|
|
2445
|
+
return GetfloatPrecision(symbol);
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2446
2448
|
|
|
2447
2449
|
|
|
2448
2450
|
|
|
@@ -2641,6 +2643,7 @@ var JSCHART_EVENT_ID=
|
|
|
2641
2643
|
ON_CHANGE_KLINE_RIGHT:160, //切换复权
|
|
2642
2644
|
|
|
2643
2645
|
ON_FORMAT_KLINE_FLOAT_TOOLTIP:161, //格式化k线浮动框显示文字
|
|
2646
|
+
ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP:162, //格式化信息地雷显示文字
|
|
2644
2647
|
}
|
|
2645
2648
|
|
|
2646
2649
|
var JSCHART_OPERATOR_ID=
|
|
@@ -3045,6 +3048,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3045
3048
|
this.DialogTooltip; //tooltip信息
|
|
3046
3049
|
this.DialogSelectRect; //区间统计
|
|
3047
3050
|
this.FloatTooltip; //浮动tooltip信息
|
|
3051
|
+
this.DialogSearchIndex; //指标搜索
|
|
3048
3052
|
|
|
3049
3053
|
|
|
3050
3054
|
this.ClearStockCache=function()
|
|
@@ -3105,6 +3109,34 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3105
3109
|
this.DialogSelectRect.Create();
|
|
3106
3110
|
}
|
|
3107
3111
|
|
|
3112
|
+
this.InitalSearchIndexDialog=function(option)
|
|
3113
|
+
{
|
|
3114
|
+
if (this.DialogSearchIndex) return;
|
|
3115
|
+
|
|
3116
|
+
this.DialogSearchIndex=new JSDialogSearchIndex();
|
|
3117
|
+
this.DialogSearchIndex.Inital(this, option);
|
|
3118
|
+
this.DialogSearchIndex.Create();
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3121
|
+
this.ShowChangeIndexDialog=function(data)
|
|
3122
|
+
{
|
|
3123
|
+
if (!data) return;
|
|
3124
|
+
if (!this.DialogSearchIndex) return;
|
|
3125
|
+
|
|
3126
|
+
data.Title=`切换指标 [窗口${data.WindowIndex+1}]`;
|
|
3127
|
+
this.DialogSearchIndex.SetOpData(data);
|
|
3128
|
+
this.DialogSearchIndex.Show();
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
this.ShowAddOverlayIndexDialog=function(data)
|
|
3132
|
+
{
|
|
3133
|
+
if (!data) return;
|
|
3134
|
+
if (!this.DialogSearchIndex) return;
|
|
3135
|
+
|
|
3136
|
+
data.Title=`添加叠加指标 [窗口${data.WindowIndex+1}]`;
|
|
3137
|
+
this.DialogSearchIndex.SetOpData(data);
|
|
3138
|
+
this.DialogSearchIndex.Show();
|
|
3139
|
+
}
|
|
3108
3140
|
|
|
3109
3141
|
|
|
3110
3142
|
this.DrawSelectRectDialog=function()
|
|
@@ -3203,6 +3235,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3203
3235
|
this.FloatTooltip=null;
|
|
3204
3236
|
}
|
|
3205
3237
|
|
|
3238
|
+
this.DestroySearchIndexDialog=function()
|
|
3239
|
+
{
|
|
3240
|
+
if (!this.DialogSearchIndex) return;
|
|
3241
|
+
|
|
3242
|
+
this.DialogSearchIndex.Destroy();
|
|
3243
|
+
this.DialogSearchIndex=null;
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3206
3246
|
|
|
3207
3247
|
|
|
3208
3248
|
//obj={ Element:, Canvas: }
|
|
@@ -3256,6 +3296,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
3256
3296
|
this.StopAutoUpdate();
|
|
3257
3297
|
this.DestroyTooltipDialog();
|
|
3258
3298
|
this.DestroyFloatTooltip();
|
|
3299
|
+
this.DestroySearchIndexDialog();
|
|
3259
3300
|
}
|
|
3260
3301
|
|
|
3261
3302
|
this.ChartDestory=this.ChartDestroy; //老版本写错了,需要兼容下
|
|
@@ -7029,7 +7070,25 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7029
7070
|
|
|
7030
7071
|
this.DrawFloatTooltip=function(point,toolTip)
|
|
7031
7072
|
{
|
|
7073
|
+
if (!this.FloatTooltip) return;
|
|
7032
7074
|
|
|
7075
|
+
this.UpdateFloatTooltip(point, toolTip)
|
|
7076
|
+
}
|
|
7077
|
+
|
|
7078
|
+
this.UpdateFloatTooltip=function(point, toolTip)
|
|
7079
|
+
{
|
|
7080
|
+
if (!this.FloatTooltip) return;
|
|
7081
|
+
|
|
7082
|
+
var sendData=
|
|
7083
|
+
{
|
|
7084
|
+
Tooltip:toolTip,
|
|
7085
|
+
Point:point,
|
|
7086
|
+
Symbol:this.Symbol,
|
|
7087
|
+
Name:this.Name,
|
|
7088
|
+
DataType:1,
|
|
7089
|
+
};
|
|
7090
|
+
|
|
7091
|
+
this.FloatTooltip.Update(sendData);
|
|
7033
7092
|
}
|
|
7034
7093
|
|
|
7035
7094
|
//更新实时行情到浮动tooltip
|
|
@@ -7134,6 +7193,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7134
7193
|
}
|
|
7135
7194
|
else if (toolTip.Type==2) //指标信息
|
|
7136
7195
|
{
|
|
7196
|
+
if (this.FloatTooltip)
|
|
7197
|
+
{
|
|
7198
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
7199
|
+
bHideFloatToolip=false;
|
|
7200
|
+
return;
|
|
7201
|
+
}
|
|
7202
|
+
|
|
7137
7203
|
var left = x;
|
|
7138
7204
|
var top = y;
|
|
7139
7205
|
|
|
@@ -7155,6 +7221,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7155
7221
|
}
|
|
7156
7222
|
else if (toolTip.Type==3) //分时图异动信息
|
|
7157
7223
|
{
|
|
7224
|
+
if (this.FloatTooltip)
|
|
7225
|
+
{
|
|
7226
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
7227
|
+
bHideFloatToolip=false;
|
|
7228
|
+
return;
|
|
7229
|
+
}
|
|
7230
|
+
|
|
7158
7231
|
var left = x;
|
|
7159
7232
|
var top = y;
|
|
7160
7233
|
|
|
@@ -7174,8 +7247,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7174
7247
|
this.Tooltip.innerHTML=format.Text;;
|
|
7175
7248
|
this.Tooltip.style.display = "block";
|
|
7176
7249
|
}
|
|
7177
|
-
else if (toolTip.Type==4) //
|
|
7250
|
+
else if (toolTip.Type==4) //ChartMultiSVGIconV2 图标信息
|
|
7178
7251
|
{
|
|
7252
|
+
if (this.FloatTooltip)
|
|
7253
|
+
{
|
|
7254
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
7255
|
+
bHideFloatToolip=false;
|
|
7256
|
+
return;
|
|
7257
|
+
}
|
|
7258
|
+
|
|
7179
7259
|
var left = x;
|
|
7180
7260
|
var top = y;
|
|
7181
7261
|
|
|
@@ -7197,6 +7277,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7197
7277
|
}
|
|
7198
7278
|
else if (toolTip.Type==5)
|
|
7199
7279
|
{
|
|
7280
|
+
if (this.FloatTooltip)
|
|
7281
|
+
{
|
|
7282
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
7283
|
+
bHideFloatToolip=false;
|
|
7284
|
+
return;
|
|
7285
|
+
}
|
|
7286
|
+
|
|
7200
7287
|
var left = x;
|
|
7201
7288
|
var top = y;
|
|
7202
7289
|
|
|
@@ -7219,6 +7306,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7219
7306
|
}
|
|
7220
7307
|
else if (toolTip.Type==6) //散点图
|
|
7221
7308
|
{
|
|
7309
|
+
if (this.FloatTooltip)
|
|
7310
|
+
{
|
|
7311
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
7312
|
+
bHideFloatToolip=false;
|
|
7313
|
+
return;
|
|
7314
|
+
}
|
|
7315
|
+
|
|
7222
7316
|
var left = x;
|
|
7223
7317
|
var top = y;
|
|
7224
7318
|
|
|
@@ -7241,6 +7335,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7241
7335
|
}
|
|
7242
7336
|
else if (toolTip.Type==7) //ChartDrawSVG
|
|
7243
7337
|
{
|
|
7338
|
+
if (this.FloatTooltip)
|
|
7339
|
+
{
|
|
7340
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
7341
|
+
bHideFloatToolip=false;
|
|
7342
|
+
return;
|
|
7343
|
+
}
|
|
7344
|
+
|
|
7244
7345
|
var left = x;
|
|
7245
7346
|
var top = y;
|
|
7246
7347
|
|
|
@@ -7261,6 +7362,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7261
7362
|
this.Tooltip.innerHTML=format.Text;
|
|
7262
7363
|
this.Tooltip.style.display = "block";
|
|
7263
7364
|
}
|
|
7365
|
+
else if (toolTip.Type==8) //ChartDrawSVG 新版本
|
|
7366
|
+
{
|
|
7367
|
+
if (this.FloatTooltip)
|
|
7368
|
+
{
|
|
7369
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
7370
|
+
bHideFloatToolip=false;
|
|
7371
|
+
return;
|
|
7372
|
+
}
|
|
7373
|
+
}
|
|
7264
7374
|
|
|
7265
7375
|
|
|
7266
7376
|
if (bHideFloatToolip) this.HideFloatTooltip();
|
|
@@ -8169,6 +8279,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
8169
8279
|
if (this.DialogTooltip) this.DialogTooltip.ReloadResource(option);
|
|
8170
8280
|
if (this.FloatTooltip) this.FloatTooltip.ReloadResource(option);
|
|
8171
8281
|
if (this.DialogSelectRect) this.DialogSelectRect.ReloadResource(option);
|
|
8282
|
+
if (this.DialogSearchIndex) this.DialogSearchIndex.ReloadResource(option);
|
|
8172
8283
|
}
|
|
8173
8284
|
|
|
8174
8285
|
this.ReloadBorder=function(option) //根据页面缩放调整对应边框的尺长
|
|
@@ -10504,7 +10615,7 @@ function CoordinateInfo()
|
|
|
10504
10615
|
this.Font=g_JSChartResource.FrameSplitTextFont; //字体
|
|
10505
10616
|
this.LineColor=g_JSChartResource.FrameSplitPen; //线段颜色
|
|
10506
10617
|
this.LineDash=null; //当线段类型==2时 可以设置虚线样式
|
|
10507
|
-
this.LineType=1; //线段类型 -1=不画线段 2=虚线, 8,9=集合竞价坐标
|
|
10618
|
+
this.LineType=1; //线段类型 -1=不画线段 0=虚线 1,2=虚线, 3=短线 8,9=集合竞价坐标
|
|
10508
10619
|
this.LineWidth; //线段宽度
|
|
10509
10620
|
this.ExtendLine; //延长线长度[ ] { Width:长度 } [0]=左 [1]=右 实例: [null, { Width: 50}];
|
|
10510
10621
|
this.ExtendData; //扩展属性
|
|
@@ -13514,7 +13625,7 @@ function AverageWidthFrame()
|
|
|
13514
13625
|
{
|
|
13515
13626
|
if (lineType==-1) return;
|
|
13516
13627
|
|
|
13517
|
-
if (lineType==0)
|
|
13628
|
+
if (lineType==0) //直线
|
|
13518
13629
|
{
|
|
13519
13630
|
var pixelRatio=GetDevicePixelRatio();
|
|
13520
13631
|
this.Canvas.strokeStyle=color;
|
|
@@ -13560,7 +13671,7 @@ function AverageWidthFrame()
|
|
|
13560
13671
|
}
|
|
13561
13672
|
this.Canvas.stroke();
|
|
13562
13673
|
}
|
|
13563
|
-
else
|
|
13674
|
+
else if (lineType==1 || lineType==2) //虚线
|
|
13564
13675
|
{
|
|
13565
13676
|
this.DrawDotLine(left,right,y, color, option);
|
|
13566
13677
|
}
|
|
@@ -13802,7 +13913,6 @@ function MinuteFrame()
|
|
|
13802
13913
|
this.OverlayIndex=g_JSChartResource.MinuteToolbar.OverlayIndex; //是否显示叠加指标
|
|
13803
13914
|
|
|
13804
13915
|
this.ModifyIndexEvent; //改参数 点击事件
|
|
13805
|
-
this.ChangeIndexEvent; //换指标 点击事件
|
|
13806
13916
|
this.ToolbarRect=null; //保存工具条的位置
|
|
13807
13917
|
this.IsShowPositionTitle=false; //是否显示持仓标题
|
|
13808
13918
|
|
|
@@ -16232,7 +16342,6 @@ function KLineFrame()
|
|
|
16232
16342
|
this.SelBorderColor=g_JSChartResource.SelFrameBorderColor;
|
|
16233
16343
|
|
|
16234
16344
|
this.ModifyIndexEvent; //改参数 点击事件
|
|
16235
|
-
this.ChangeIndexEvent; //换指标 点击事件
|
|
16236
16345
|
this.ToolbarRect=null; //保存工具条的位置
|
|
16237
16346
|
this.ReDrawToolbar=false;
|
|
16238
16347
|
|
|
@@ -39941,203 +40050,6 @@ function ChartMultiText()
|
|
|
39941
40050
|
}
|
|
39942
40051
|
}
|
|
39943
40052
|
|
|
39944
|
-
// 图标集合 支持横屏
|
|
39945
|
-
function ChartMultiSVGIcon()
|
|
39946
|
-
{
|
|
39947
|
-
this.newMethod=IChartPainting; //派生
|
|
39948
|
-
this.newMethod();
|
|
39949
|
-
delete this.newMethod;
|
|
39950
|
-
|
|
39951
|
-
this.ClassName="ChartMultiSVGIcon";
|
|
39952
|
-
this.Icon; //[ {Index:, Value:, Symbol:, Color:, Baseline:, Line:{ Color:, Dash:[虚线点], KData:"H/L", Offset:[5,10], Width:线粗细 } } ]
|
|
39953
|
-
this.IconSize={ Max: g_JSChartResource.DRAWICON.Icon.MaxSize, Min:g_JSChartResource.DRAWICON.Icon.MinSize , //图标的最大最小值
|
|
39954
|
-
Zoom:{ Type:g_JSChartResource.DRAWICON.Icon.Zoom.Type , Value:g_JSChartResource.DRAWICON.Icon.Zoom.Value } //放大倍数
|
|
39955
|
-
};
|
|
39956
|
-
this.Family;
|
|
39957
|
-
this.Color=g_JSChartResource.DefaultTextColor;
|
|
39958
|
-
this.IsHScreen=false;
|
|
39959
|
-
this.IconRect=[]; //0=序号,1=区域
|
|
39960
|
-
|
|
39961
|
-
this.Draw=function()
|
|
39962
|
-
{
|
|
39963
|
-
this.IconRect=[];
|
|
39964
|
-
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
39965
|
-
if (this.IsShowIndexTitleOnly()) return;
|
|
39966
|
-
if (this.IsHideScriptIndex()) return;
|
|
39967
|
-
if (!this.Data || this.Data.length<=0) return;
|
|
39968
|
-
if (!this.Family || !this.Icon) return;
|
|
39969
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.Icon)) return;
|
|
39970
|
-
|
|
39971
|
-
this.IsHScreen=(this.ChartFrame.IsHScreen===true);
|
|
39972
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
39973
|
-
var offset=this.Data.DataOffset;
|
|
39974
|
-
this.DataWidth=this.ChartFrame.DataWidth;
|
|
39975
|
-
this.DistanceWidth=this.ChartFrame.DistanceWidth;
|
|
39976
|
-
|
|
39977
|
-
var border=this.GetBorder();
|
|
39978
|
-
if (this.IsHScreen)
|
|
39979
|
-
{
|
|
39980
|
-
var left=border.TopEx;
|
|
39981
|
-
var right=border.BottomEx;
|
|
39982
|
-
}
|
|
39983
|
-
else
|
|
39984
|
-
{
|
|
39985
|
-
var left=border.LeftEx;
|
|
39986
|
-
var right=border.RightEx;
|
|
39987
|
-
}
|
|
39988
|
-
|
|
39989
|
-
var fontSize=this.GetDynamicIconSize(this.DataWidth,this.DistanceWidth,this.IconSize.Max,this.IconSize.Min,this.IconSize.Zoom);
|
|
39990
|
-
this.Canvas.font=fontSize+'px '+this.Family;
|
|
39991
|
-
|
|
39992
|
-
for(var i=0; i<this.Icon.length; ++i)
|
|
39993
|
-
{
|
|
39994
|
-
var item=this.Icon[i];
|
|
39995
|
-
if (!IFrameSplitOperator.IsNumber(item.Index)) continue;
|
|
39996
|
-
|
|
39997
|
-
var index=item.Index-offset;
|
|
39998
|
-
if (index>=0 && index<xPointCount)
|
|
39999
|
-
{
|
|
40000
|
-
var x=this.ChartFrame.GetXFromIndex(index);
|
|
40001
|
-
var y=this.ChartFrame.GetYFromData(item.Value);
|
|
40002
|
-
|
|
40003
|
-
if (item.Color) this.Canvas.fillStyle = item.Color;
|
|
40004
|
-
else this.Canvas.fillStyle = this.Color;
|
|
40005
|
-
|
|
40006
|
-
var textWidth=this.Canvas.measureText(item.Symbol).width;
|
|
40007
|
-
this.Canvas.textAlign='center';
|
|
40008
|
-
var rtIcon=new Rect(x-fontSize/2,y-fontSize/2,fontSize,fontSize);
|
|
40009
|
-
if (x+textWidth/2>=right)
|
|
40010
|
-
{
|
|
40011
|
-
this.Canvas.textAlign='right';
|
|
40012
|
-
x+=this.DataWidth/2;
|
|
40013
|
-
rtIcon.X=x-fontSize;
|
|
40014
|
-
}
|
|
40015
|
-
else if (x-textWidth/2<left)
|
|
40016
|
-
{
|
|
40017
|
-
this.Canvas.textAlign = 'left';
|
|
40018
|
-
x-=this.DataWidth/2;
|
|
40019
|
-
rtIcon.X=x;
|
|
40020
|
-
}
|
|
40021
|
-
|
|
40022
|
-
if (item.Baseline==1)
|
|
40023
|
-
{
|
|
40024
|
-
this.Canvas.textBaseline='top';
|
|
40025
|
-
rtIcon.Y=y;
|
|
40026
|
-
}
|
|
40027
|
-
else if (item.Baseline==2)
|
|
40028
|
-
{
|
|
40029
|
-
this.Canvas.textBaseline='bottom';
|
|
40030
|
-
rtIcon.Y=y-fontSize;
|
|
40031
|
-
}
|
|
40032
|
-
else
|
|
40033
|
-
{
|
|
40034
|
-
this.Canvas.textBaseline = 'middle';
|
|
40035
|
-
rtIcon.Y=y-fontSize/2;
|
|
40036
|
-
}
|
|
40037
|
-
|
|
40038
|
-
if (this.IsHScreen)
|
|
40039
|
-
{
|
|
40040
|
-
this.Canvas.save();
|
|
40041
|
-
this.Canvas.translate(y, x);
|
|
40042
|
-
this.Canvas.rotate(90 * Math.PI / 180);
|
|
40043
|
-
this.Canvas.fillText(item.Symbol,0,0);
|
|
40044
|
-
this.Canvas.restore();
|
|
40045
|
-
}
|
|
40046
|
-
else
|
|
40047
|
-
{
|
|
40048
|
-
if (IFrameSplitOperator.IsNumber(item.YMove)) y+=item.YMove;
|
|
40049
|
-
this.Canvas.fillText(item.Symbol, x, y);
|
|
40050
|
-
if (item.Text) this.IconRect.push({ Index:i, Rect:rtIcon , Item:item });
|
|
40051
|
-
}
|
|
40052
|
-
|
|
40053
|
-
if (item.Line)
|
|
40054
|
-
{
|
|
40055
|
-
var kItem=this.Data.Data[item.Index];
|
|
40056
|
-
var price=item.Line.KData=="H"? kItem.High:kItem.Low;
|
|
40057
|
-
var yPrice=this.ChartFrame.GetYFromData(price);
|
|
40058
|
-
var yText=y;
|
|
40059
|
-
if (Array.isArray(item.Line.Offset) && item.Line.Offset.length==2)
|
|
40060
|
-
{
|
|
40061
|
-
if (yText>yPrice) //文字在下方
|
|
40062
|
-
{
|
|
40063
|
-
yText-=item.Line.Offset[1];
|
|
40064
|
-
yPrice+=item.Line.Offset[0]
|
|
40065
|
-
}
|
|
40066
|
-
else if (yText<yPrice)
|
|
40067
|
-
{
|
|
40068
|
-
yText+=item.Line.Offset[1];
|
|
40069
|
-
yPrice-=item.Line.Offset[0]
|
|
40070
|
-
}
|
|
40071
|
-
}
|
|
40072
|
-
this.Canvas.save();
|
|
40073
|
-
if (item.Line.Dash) this.Canvas.setLineDash(item.Line.Dash); //虚线
|
|
40074
|
-
if (item.Line.Width>0) this.Canvas.lineWidth=item.Line.Width; //线宽
|
|
40075
|
-
this.Canvas.strokeStyle = item.Line.Color;
|
|
40076
|
-
this.Canvas.beginPath();
|
|
40077
|
-
if (this.IsHScreen)
|
|
40078
|
-
{
|
|
40079
|
-
this.Canvas.moveTo(yText, ToFixedPoint(x));
|
|
40080
|
-
this.Canvas.lineTo(yPrice,ToFixedPoint(x));
|
|
40081
|
-
}
|
|
40082
|
-
else
|
|
40083
|
-
{
|
|
40084
|
-
this.Canvas.moveTo(ToFixedPoint(x),yText);
|
|
40085
|
-
this.Canvas.lineTo(ToFixedPoint(x),yPrice);
|
|
40086
|
-
}
|
|
40087
|
-
|
|
40088
|
-
this.Canvas.stroke();
|
|
40089
|
-
this.Canvas.restore();
|
|
40090
|
-
}
|
|
40091
|
-
}
|
|
40092
|
-
}
|
|
40093
|
-
}
|
|
40094
|
-
|
|
40095
|
-
this.GetTooltipData=function(x,y,tooltip)
|
|
40096
|
-
{
|
|
40097
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.IconRect)) return false;
|
|
40098
|
-
for(var i=0; i<this.IconRect.length; ++i)
|
|
40099
|
-
{
|
|
40100
|
-
var item=this.IconRect[i];
|
|
40101
|
-
if (!item.Rect) continue;
|
|
40102
|
-
var rect=item.Rect;
|
|
40103
|
-
this.Canvas.beginPath();
|
|
40104
|
-
this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
|
|
40105
|
-
if (this.Canvas.isPointInPath(x,y))
|
|
40106
|
-
{
|
|
40107
|
-
JSConsole.Chart.Log('[ChartMultiSVGIcon::GetTooltipData] icon ', item);
|
|
40108
|
-
tooltip.Data=item;
|
|
40109
|
-
tooltip.ChartPaint=this;
|
|
40110
|
-
tooltip.Type=4; //指标
|
|
40111
|
-
return true;
|
|
40112
|
-
}
|
|
40113
|
-
}
|
|
40114
|
-
|
|
40115
|
-
return false;
|
|
40116
|
-
}
|
|
40117
|
-
|
|
40118
|
-
this.GetMaxMin=function()
|
|
40119
|
-
{
|
|
40120
|
-
var range={ Min:null, Max:null };
|
|
40121
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
40122
|
-
var start=this.Data.DataOffset;
|
|
40123
|
-
var end=start+xPointCount;
|
|
40124
|
-
|
|
40125
|
-
for(var i in this.Icon)
|
|
40126
|
-
{
|
|
40127
|
-
var item=this.Icon[i];
|
|
40128
|
-
if (item.Index>=start && item.Index<end)
|
|
40129
|
-
{
|
|
40130
|
-
if (range.Max==null) range.Max=item.Value;
|
|
40131
|
-
else if (range.Max<item.Value) range.Max=item.Value;
|
|
40132
|
-
if (range.Min==null) range.Min=item.Value;
|
|
40133
|
-
else if (range.Min>item.Value) range.Min=item.Value;
|
|
40134
|
-
}
|
|
40135
|
-
}
|
|
40136
|
-
|
|
40137
|
-
return range;
|
|
40138
|
-
}
|
|
40139
|
-
}
|
|
40140
|
-
|
|
40141
40053
|
|
|
40142
40054
|
//图标集合(2.0) 支持横屏
|
|
40143
40055
|
function ChartMultiSVGIconV2()
|
|
@@ -40349,6 +40261,7 @@ function ChartMultiSVGIconV2()
|
|
|
40349
40261
|
if (IFrameSplitOperator.IsNumber(item.YMove)) y+=item.YMove;
|
|
40350
40262
|
this.Canvas.fillText(item.Symbol, x, y);
|
|
40351
40263
|
if (item.Text) this.IconRect.push({ Rect:rtIcon , Item:item, KItem:kItem });
|
|
40264
|
+
else if (IFrameSplitOperator.IsNonEmptyArray(item.AryText)) this.IconRect.push({ Rect:rtIcon , Item:item, KItem:kItem });
|
|
40352
40265
|
}
|
|
40353
40266
|
|
|
40354
40267
|
if (item.Line)
|
|
@@ -41098,6 +41011,7 @@ function ChartDrawSVG()
|
|
|
41098
41011
|
tooltip.Data={ Rect:item.Rect, Item:data, Index:item.Index };
|
|
41099
41012
|
tooltip.ChartPaint=this;
|
|
41100
41013
|
tooltip.Type=7; //drawsvg
|
|
41014
|
+
if (data.Tooltip && data.Tooltip.Ver==2.0) tooltip.Type=8; //drawsvg 新本版
|
|
41101
41015
|
return true;
|
|
41102
41016
|
}
|
|
41103
41017
|
}
|
|
@@ -69388,6 +69302,19 @@ function JSChartResource()
|
|
|
69388
69302
|
}
|
|
69389
69303
|
};
|
|
69390
69304
|
|
|
69305
|
+
//指标搜索
|
|
69306
|
+
this.DialogSearchIndex=
|
|
69307
|
+
{
|
|
69308
|
+
BGColor:'rgb(250,250,250)', //背景色
|
|
69309
|
+
BorderColor:'rgb(20,20,20)', //边框颜色
|
|
69310
|
+
TitleColor:'rgb(250,250,250)', //标题颜色
|
|
69311
|
+
TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
|
|
69312
|
+
|
|
69313
|
+
IndexNameColor:"rgb(0,0,0)", //数值名称
|
|
69314
|
+
GroupNameColor:"rgb(0,0,0)",
|
|
69315
|
+
InputTextColor:"rgb(0,0,0)"
|
|
69316
|
+
};
|
|
69317
|
+
|
|
69391
69318
|
//弹幕
|
|
69392
69319
|
this.Barrage= {
|
|
69393
69320
|
Font:16*GetDevicePixelRatio() +'px 微软雅黑', //字体
|
|
@@ -70453,6 +70380,20 @@ function JSChartResource()
|
|
|
70453
70380
|
}
|
|
70454
70381
|
}
|
|
70455
70382
|
|
|
70383
|
+
if (style.DialogSearchIndex)
|
|
70384
|
+
{
|
|
70385
|
+
var item=style.DialogSearchIndex;
|
|
70386
|
+
|
|
70387
|
+
if (item.BGColor) this.DialogSearchIndex.BGColor=item.BGColor;
|
|
70388
|
+
if (item.BorderColor) this.DialogSearchIndex.BorderColor=item.BorderColor;
|
|
70389
|
+
if (item.TitleColor) this.DialogSearchIndex.TitleColor=item.TitleColor;
|
|
70390
|
+
if (item.TitleBGColor) this.DialogSearchIndex.TitleBGColor=item.TitleBGColor;
|
|
70391
|
+
|
|
70392
|
+
if (item.IndexNameColor) this.DialogSearchIndex.IndexNameColor=item.IndexNameColor;
|
|
70393
|
+
if (item.GroupNameColor) this.DialogSearchIndex.GroupNameColor=item.GroupNameColor;
|
|
70394
|
+
if (item.InputTextColor) this.DialogSearchIndex.InputTextColor=item.InputTextColor;
|
|
70395
|
+
}
|
|
70396
|
+
|
|
70456
70397
|
if (style.MinuteInfo)
|
|
70457
70398
|
{
|
|
70458
70399
|
var item=style.MinuteInfo;
|
|
@@ -73537,7 +73478,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73537
73478
|
frame.GlobalOption=this.GlobalOption;
|
|
73538
73479
|
|
|
73539
73480
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
73540
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
73541
73481
|
|
|
73542
73482
|
frame.HorizontalMax=20;
|
|
73543
73483
|
frame.HorizontalMin=10;
|
|
@@ -73622,7 +73562,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
73622
73562
|
frame.GlobalOption=this.GlobalOption;
|
|
73623
73563
|
|
|
73624
73564
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
73625
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
73626
73565
|
|
|
73627
73566
|
frame.HorizontalMax=20;
|
|
73628
73567
|
frame.HorizontalMin=10;
|
|
@@ -79620,9 +79559,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
79620
79559
|
else if (button.ID==JSCHART_BUTTON_ID.CHANGE_INDEX)
|
|
79621
79560
|
{
|
|
79622
79561
|
var frame=button.Frame;
|
|
79562
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:1 };
|
|
79563
|
+
this.ShowChangeIndexDialog(sendData);
|
|
79564
|
+
/*
|
|
79623
79565
|
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:false };
|
|
79624
79566
|
if (frame.ChangeIndexEvent)
|
|
79625
79567
|
frame.ChangeIndexEvent(e);
|
|
79568
|
+
*/
|
|
79626
79569
|
}
|
|
79627
79570
|
else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
|
|
79628
79571
|
{
|
|
@@ -79634,9 +79577,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
79634
79577
|
else if (button.ID==JSCHART_BUTTON_ID.OVERLAY_INDEX)
|
|
79635
79578
|
{
|
|
79636
79579
|
var frame=button.Frame;
|
|
79580
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:2 };
|
|
79581
|
+
this.ShowAddOverlayIndexDialog(sendData);
|
|
79582
|
+
/*
|
|
79637
79583
|
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:true };
|
|
79638
79584
|
if (frame.ChangeIndexEvent)
|
|
79639
79585
|
frame.ChangeIndexEvent(e);
|
|
79586
|
+
*/
|
|
79640
79587
|
}
|
|
79641
79588
|
else if (button.ID==JSCHART_BUTTON_ID.MAX_MIN_WINDOW)
|
|
79642
79589
|
{
|
|
@@ -79887,29 +79834,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
79887
79834
|
this.DialogSelectRect.Update(sendData);
|
|
79888
79835
|
}
|
|
79889
79836
|
|
|
79890
|
-
this.DrawFloatTooltip=function(point,toolTip)
|
|
79891
|
-
{
|
|
79892
|
-
if (!this.FloatTooltip) return;
|
|
79893
|
-
|
|
79894
|
-
this.UpdateFloatTooltip(point, toolTip)
|
|
79895
|
-
}
|
|
79896
|
-
|
|
79897
|
-
this.UpdateFloatTooltip=function(point, toolTip)
|
|
79898
|
-
{
|
|
79899
|
-
if (!this.FloatTooltip) return;
|
|
79900
|
-
|
|
79901
|
-
var sendData=
|
|
79902
|
-
{
|
|
79903
|
-
Tooltip:toolTip,
|
|
79904
|
-
Point:point,
|
|
79905
|
-
Symbol:this.Symbol,
|
|
79906
|
-
Name:this.Name,
|
|
79907
|
-
DataType:1,
|
|
79908
|
-
};
|
|
79909
|
-
|
|
79910
|
-
this.FloatTooltip.Update(sendData);
|
|
79911
|
-
}
|
|
79912
|
-
|
|
79913
79837
|
this.UpdateHQFloatTooltip=function(kData)
|
|
79914
79838
|
{
|
|
79915
79839
|
if (!this.FloatTooltip) return;
|
|
@@ -80472,9 +80396,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80472
80396
|
else if (button.ID==JSCHART_BUTTON_ID.CHANGE_INDEX)
|
|
80473
80397
|
{
|
|
80474
80398
|
var frame=button.Frame;
|
|
80475
|
-
|
|
80476
|
-
|
|
80477
|
-
frame.ChangeIndexEvent(e);
|
|
80399
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:1 };
|
|
80400
|
+
this.ShowChangeIndexDialog(sendData);
|
|
80478
80401
|
}
|
|
80479
80402
|
else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
|
|
80480
80403
|
{
|
|
@@ -80486,9 +80409,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
80486
80409
|
else if (button.ID==JSCHART_BUTTON_ID.OVERLAY_INDEX)
|
|
80487
80410
|
{
|
|
80488
80411
|
var frame=button.Frame;
|
|
80489
|
-
|
|
80490
|
-
|
|
80491
|
-
frame.ChangeIndexEvent(e);
|
|
80412
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:2 };
|
|
80413
|
+
this.ShowAddOverlayIndexDialog(sendData);
|
|
80492
80414
|
}
|
|
80493
80415
|
else if (button.ID==JSCHART_BUTTON_ID.MAX_MIN_WINDOW)
|
|
80494
80416
|
{
|
|
@@ -82250,7 +82172,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
82250
82172
|
if (i>=2)
|
|
82251
82173
|
{
|
|
82252
82174
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
82253
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
82254
82175
|
}
|
|
82255
82176
|
|
|
82256
82177
|
var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
|
|
@@ -82342,7 +82263,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
82342
82263
|
if (id>=2)
|
|
82343
82264
|
{
|
|
82344
82265
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
82345
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
82346
82266
|
}
|
|
82347
82267
|
|
|
82348
82268
|
var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
|
|
@@ -87917,7 +87837,6 @@ function KLineChartHScreenContainer(uielement)
|
|
|
87917
87837
|
frame.RightSpaceCount=this.RightSpaceCount; //右边
|
|
87918
87838
|
|
|
87919
87839
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
87920
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
87921
87840
|
|
|
87922
87841
|
frame.HorizontalMax=20;
|
|
87923
87842
|
frame.HorizontalMin=10;
|
|
@@ -90747,266 +90666,6 @@ function ModifyIndexDialog(divElement)
|
|
|
90747
90666
|
}
|
|
90748
90667
|
}
|
|
90749
90668
|
|
|
90750
|
-
//换指标
|
|
90751
|
-
function ChangeIndexDialog(divElement)
|
|
90752
|
-
{
|
|
90753
|
-
this.newMethod=IDivDialog; //派生
|
|
90754
|
-
this.newMethod(divElement);
|
|
90755
|
-
delete this.newMethod;
|
|
90756
|
-
|
|
90757
|
-
this.DivElement=divElement; //父节点
|
|
90758
|
-
//this.IndexTreeApiUrl="../commonindextree.json"; //数据下载地址
|
|
90759
|
-
//this.OverlayIndexTreeApiUrl="../commonindextree.json"; //叠加指标列表数据下载地址
|
|
90760
|
-
this.IsOverlayIndex=false;
|
|
90761
|
-
|
|
90762
|
-
this.Create=function()
|
|
90763
|
-
{
|
|
90764
|
-
var div=document.createElement('div');
|
|
90765
|
-
div.className='jchart-changeindex-box';
|
|
90766
|
-
div.id=this.ID=Guid();
|
|
90767
|
-
div.innerHTML=
|
|
90768
|
-
'<div class="target-panel">\n' +
|
|
90769
|
-
' <div class="target-header">\n' +
|
|
90770
|
-
' <span>换指标</span>\n' +
|
|
90771
|
-
' <strong class="close-tar icon iconfont icon-close"></strong>\n' +
|
|
90772
|
-
' </div>\n' +
|
|
90773
|
-
' <div class="target-content">\n' +
|
|
90774
|
-
' <div class="target-left">\n' +
|
|
90775
|
-
' <input type="text">\n' +
|
|
90776
|
-
' <ul></ul>\n' +
|
|
90777
|
-
' </div>\n' +
|
|
90778
|
-
' <div class="target-right">\n' +
|
|
90779
|
-
' <ul></ul>\n' +
|
|
90780
|
-
' </div>\n' +
|
|
90781
|
-
' </div>\n' +
|
|
90782
|
-
' </div>';
|
|
90783
|
-
|
|
90784
|
-
this.DivElement.appendChild(div);
|
|
90785
|
-
}
|
|
90786
|
-
|
|
90787
|
-
//指标菜单内容
|
|
90788
|
-
this.GetMenuData=function()
|
|
90789
|
-
{
|
|
90790
|
-
var data={
|
|
90791
|
-
"name":"页面通用版指标树",
|
|
90792
|
-
"list":
|
|
90793
|
-
[
|
|
90794
|
-
{
|
|
90795
|
-
"node":"超买超卖型",
|
|
90796
|
-
"list":
|
|
90797
|
-
[
|
|
90798
|
-
{"name":"ADTM 动态买卖气指标", "id":"ADTM"},
|
|
90799
|
-
{"name":"BIAS 乖离率", "id":"BIAS"},
|
|
90800
|
-
{"name":"BIAS36 三六乖离", "id":"BIAS36"},
|
|
90801
|
-
{"name":"BIAS_QL 乖离率-传统版", "id":"BIAS_QL"},
|
|
90802
|
-
{"name":"CCI 商品路径指标", "id":"CCI"},
|
|
90803
|
-
{"name":"FSL 分水岭", "id":"FSL"},
|
|
90804
|
-
{"name":"KDJ 随机指标", "id":"KDJ"},
|
|
90805
|
-
{"name":"MTM 动量线", "id":"MTM"},
|
|
90806
|
-
{"name":"OSC 变动速率线", "id":"OSC"},
|
|
90807
|
-
{"name":"RSI 相对强弱指标", "id":"RSI"},
|
|
90808
|
-
{"name":"ROC 变动率指标", "id":"ROC"},
|
|
90809
|
-
{"name":"WR 威廉指标", "id":"WR"}
|
|
90810
|
-
]
|
|
90811
|
-
},
|
|
90812
|
-
{
|
|
90813
|
-
"node":"趋势型",
|
|
90814
|
-
"list":
|
|
90815
|
-
[
|
|
90816
|
-
{"name":"CHO 济坚指数", "id":"CHO"},
|
|
90817
|
-
{"name":"DMA 平均差", "id":"DMA"},
|
|
90818
|
-
{"name":"DMI 趋向指标", "id":"DMI"},
|
|
90819
|
-
{"name":"EMV 简易波动指标", "id":"EMV"},
|
|
90820
|
-
{"name":"MACD 平滑异同平均", "id":"MACD"},
|
|
90821
|
-
{"name":"TRIX 三重指数平均线", "id":"TRIX"},
|
|
90822
|
-
{"name":"UOS 终极指标", "id":"UOS"},
|
|
90823
|
-
{"name":"TRIX 三重指数平均线", "id":"TRIX"}
|
|
90824
|
-
]
|
|
90825
|
-
},
|
|
90826
|
-
{
|
|
90827
|
-
"node":"成交量型",
|
|
90828
|
-
"list":
|
|
90829
|
-
[
|
|
90830
|
-
{"name":"HSL 换手率", "id":"HSL"},
|
|
90831
|
-
{"name":"OBV 累积能量线", "id":"OBV"},
|
|
90832
|
-
{"name":"NVI 负成交量", "id":"NVI"},
|
|
90833
|
-
{"name":"PVI 正成交量", "id":"PVI"},
|
|
90834
|
-
{"name":"VOL 成交量", "id":"VOL"}
|
|
90835
|
-
]
|
|
90836
|
-
},
|
|
90837
|
-
{
|
|
90838
|
-
"node":"均线型",
|
|
90839
|
-
"list":
|
|
90840
|
-
[
|
|
90841
|
-
{"name":"MA 均线", "id":"均线"},
|
|
90842
|
-
{"name":"BBI 多空线", "id":"BBI"}
|
|
90843
|
-
]
|
|
90844
|
-
},
|
|
90845
|
-
{
|
|
90846
|
-
"node":"路径型",
|
|
90847
|
-
"list":
|
|
90848
|
-
[
|
|
90849
|
-
{"name":"BOLL 布林线", "id":"BOLL"},
|
|
90850
|
-
{"name":"BOLL副图 布林线", "id":"BOLL副图"},
|
|
90851
|
-
{"name":"MIKE 麦克支撑压力", "id":"MIKE"},
|
|
90852
|
-
{"name":"ENE 轨道线", "id":"ENE"}
|
|
90853
|
-
]
|
|
90854
|
-
},
|
|
90855
|
-
{
|
|
90856
|
-
"node":"能量型",
|
|
90857
|
-
"list":
|
|
90858
|
-
[
|
|
90859
|
-
{"name":"BRAR 情绪指标", "id":"BRAR"},
|
|
90860
|
-
{"name":"CYR 市场强弱", "id":"CYR"},
|
|
90861
|
-
{"name":"MASS 梅斯线", "id":"MASS"},
|
|
90862
|
-
{"name":"PSY 心理线", "id":"PSY"},
|
|
90863
|
-
{"name":"CR 带状能量线", "id":"CR"},
|
|
90864
|
-
{"name":"VR 成交量变异率", "id":"VR"},
|
|
90865
|
-
{"name":"WAD 威廉多空力度线", "id":"WAD"}
|
|
90866
|
-
]
|
|
90867
|
-
}
|
|
90868
|
-
|
|
90869
|
-
]
|
|
90870
|
-
};
|
|
90871
|
-
|
|
90872
|
-
return data;
|
|
90873
|
-
}
|
|
90874
|
-
|
|
90875
|
-
//下载数据 如果上次下载过可以 可以不用下载
|
|
90876
|
-
this.ReqeustData=function()
|
|
90877
|
-
{
|
|
90878
|
-
if($("#" + this.ID + " .target-left ul li").length>0){
|
|
90879
|
-
return false;
|
|
90880
|
-
}
|
|
90881
|
-
|
|
90882
|
-
var res=this.GetMenuData();
|
|
90883
|
-
var item = res.list;
|
|
90884
|
-
changeIndexLeftList(item); //处理左侧list列表
|
|
90885
|
-
changeIndexRightList(item); //处理右侧内容列表
|
|
90886
|
-
|
|
90887
|
-
/*
|
|
90888
|
-
var url = this.IndexTreeApiUrl;
|
|
90889
|
-
if (this.IsOverlayIndex==true) url=this.OverlayIndexTreeApiUrl;
|
|
90890
|
-
JSNetwork.HttpRequest({
|
|
90891
|
-
url: url,
|
|
90892
|
-
type: 'get',
|
|
90893
|
-
success: function (res) {
|
|
90894
|
-
var item = res.list;
|
|
90895
|
-
changeIndexLeftList(item); //处理左侧list列表
|
|
90896
|
-
changeIndexRightList(item); //处理右侧内容列表
|
|
90897
|
-
}
|
|
90898
|
-
});
|
|
90899
|
-
*/
|
|
90900
|
-
|
|
90901
|
-
//处理左侧list列表
|
|
90902
|
-
function changeIndexLeftList(item) {
|
|
90903
|
-
$(".target-left ul").html('');
|
|
90904
|
-
$.each(item,function(i,result){
|
|
90905
|
-
var htmlList;
|
|
90906
|
-
htmlList = '<li>' + result.node + '</li>';
|
|
90907
|
-
$(".target-left ul").append(htmlList);
|
|
90908
|
-
});
|
|
90909
|
-
//默认选中第一项
|
|
90910
|
-
$(".target-left ul li:first-child").addClass("active-list");
|
|
90911
|
-
}
|
|
90912
|
-
//处理右侧内容列表
|
|
90913
|
-
function changeIndexRightList(listNum) {
|
|
90914
|
-
var contentHtml;
|
|
90915
|
-
var conData = [];
|
|
90916
|
-
$.each(listNum,function(index,result){
|
|
90917
|
-
conData.push(result.list);
|
|
90918
|
-
})
|
|
90919
|
-
//页面初始化时显示第一个列表分类下的内容
|
|
90920
|
-
$.each(conData[0],function (i, res) {
|
|
90921
|
-
contentHtml = '<li id='+res.id+'>'+ res.name +'</li>';
|
|
90922
|
-
$(".target-right ul").append(contentHtml);
|
|
90923
|
-
})
|
|
90924
|
-
//切换list
|
|
90925
|
-
$(".target-left ul").delegate("li","click",function () {
|
|
90926
|
-
$(this).addClass("active-list").siblings().removeClass("active-list");
|
|
90927
|
-
var item = $(this).index();
|
|
90928
|
-
$(".target-right ul").html("");
|
|
90929
|
-
$.each(conData[item],function (i, res) {
|
|
90930
|
-
contentHtml = '<li id='+res.id+'>'+ res.name +'</li>';
|
|
90931
|
-
$(".target-right ul").append(contentHtml);
|
|
90932
|
-
})
|
|
90933
|
-
})
|
|
90934
|
-
}
|
|
90935
|
-
}
|
|
90936
|
-
|
|
90937
|
-
this.BindClose=function(chart)
|
|
90938
|
-
{
|
|
90939
|
-
//关闭按钮
|
|
90940
|
-
$("#"+this.ID+" .close-tar").click(
|
|
90941
|
-
{
|
|
90942
|
-
Chart:chart,
|
|
90943
|
-
},
|
|
90944
|
-
function(event)
|
|
90945
|
-
{
|
|
90946
|
-
var chart=event.data.Chart;
|
|
90947
|
-
chart.ChangeIndexDialog.Hide();
|
|
90948
|
-
}
|
|
90949
|
-
);
|
|
90950
|
-
}
|
|
90951
|
-
|
|
90952
|
-
//搜索事件
|
|
90953
|
-
this.BindSearch=function(chart)
|
|
90954
|
-
{
|
|
90955
|
-
$(".target-left input").on('input',
|
|
90956
|
-
{
|
|
90957
|
-
Chart:chart
|
|
90958
|
-
},
|
|
90959
|
-
function(event)
|
|
90960
|
-
{
|
|
90961
|
-
let scriptData = new JSIndexScript();
|
|
90962
|
-
let result=scriptData.Search(event.target.value);
|
|
90963
|
-
|
|
90964
|
-
$(".target-right ul").html("");
|
|
90965
|
-
for(var i in result)
|
|
90966
|
-
{
|
|
90967
|
-
var name=result[i];
|
|
90968
|
-
var contentHtml = '<li id='+name+'>'+ name +'</li>';
|
|
90969
|
-
$(".target-right ul").append(contentHtml);
|
|
90970
|
-
}
|
|
90971
|
-
|
|
90972
|
-
}
|
|
90973
|
-
);
|
|
90974
|
-
}
|
|
90975
|
-
|
|
90976
|
-
this.DoModal=function(event)
|
|
90977
|
-
{
|
|
90978
|
-
var chart=event.data.Chart;
|
|
90979
|
-
var identify=event.data.Identify;
|
|
90980
|
-
var dialog=chart.ChangeIndexDialog;
|
|
90981
|
-
var isOverlay=event.data.IsOverlay; //是否叠加
|
|
90982
|
-
|
|
90983
|
-
if(!dialog) return;
|
|
90984
|
-
|
|
90985
|
-
if (dialog.ID==null) dialog.Create(); //第1次 需要创建div
|
|
90986
|
-
dialog.IsOverlayIndex=isOverlay;
|
|
90987
|
-
dialog.ReqeustData(); //下载数据
|
|
90988
|
-
|
|
90989
|
-
//切换窗口指标类型 每次委托事件执行之前,先用undelegate()解除之前的所有绑定
|
|
90990
|
-
changeIndeWindow();
|
|
90991
|
-
function changeIndeWindow()
|
|
90992
|
-
{
|
|
90993
|
-
$(".target-right ul").undelegate().delegate("li","click",function () {
|
|
90994
|
-
var idv = $(this).attr("id");
|
|
90995
|
-
if (isOverlay)
|
|
90996
|
-
chart.AddOverlayIndex({WindowIndex:identify,IndexName:idv});
|
|
90997
|
-
else
|
|
90998
|
-
chart.ChangeIndex(identify,idv);
|
|
90999
|
-
$(this).addClass("active-list").siblings().removeClass("active-list");
|
|
91000
|
-
});
|
|
91001
|
-
}
|
|
91002
|
-
|
|
91003
|
-
dialog.BindSearch(chart);
|
|
91004
|
-
//关闭弹窗
|
|
91005
|
-
dialog.BindClose(chart);
|
|
91006
|
-
dialog.Show();
|
|
91007
|
-
}
|
|
91008
|
-
}
|
|
91009
|
-
|
|
91010
90669
|
//等待动画窗口
|
|
91011
90670
|
function WaitDialog(divElement)
|
|
91012
90671
|
{
|