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
|
@@ -4024,7 +4024,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4024
4024
|
|
|
4025
4025
|
//改参数div
|
|
4026
4026
|
this.ModifyIndexDialog=new ModifyIndexDialog(divElement);
|
|
4027
|
-
this.ChangeIndexDialog=new ChangeIndexDialog(divElement);
|
|
4028
4027
|
|
|
4029
4028
|
//额外的画布
|
|
4030
4029
|
this.MapExtraCanvasElement=new Map(); //key=画布名字, value={ Element:, Canvas:}
|
|
@@ -4260,7 +4259,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4260
4259
|
|
|
4261
4260
|
//创建改参数div
|
|
4262
4261
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
4263
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
4264
4262
|
|
|
4265
4263
|
var pixelRatio=GetDevicePixelRatio();
|
|
4266
4264
|
|
|
@@ -4713,7 +4711,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4713
4711
|
|
|
4714
4712
|
//创建改参数div
|
|
4715
4713
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
4716
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
4717
4714
|
|
|
4718
4715
|
//右键菜单
|
|
4719
4716
|
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
@@ -4816,7 +4813,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4816
4813
|
if (option.NetworkFilter) chart.NetworkFilter=option.NetworkFilter;
|
|
4817
4814
|
|
|
4818
4815
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
4819
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
4820
4816
|
|
|
4821
4817
|
var pixelRatio=GetDevicePixelRatio();
|
|
4822
4818
|
|
|
@@ -5398,7 +5394,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5398
5394
|
|
|
5399
5395
|
//创建改参数div
|
|
5400
5396
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
5401
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
5402
5397
|
|
|
5403
5398
|
if (option.ScriptError) chart.ScriptErrorCallback=option.ScriptError;
|
|
5404
5399
|
|
|
@@ -5695,9 +5690,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5695
5690
|
chart.InitalFloatTooltip(option.FloatTooltip);
|
|
5696
5691
|
|
|
5697
5692
|
if (option.SelectRectDialog && option.SelectRectDialog.Enable)
|
|
5698
|
-
{
|
|
5699
5693
|
chart.InitalSelectRectDialog(option.SelectRectDialog);
|
|
5700
|
-
|
|
5694
|
+
|
|
5695
|
+
if (option.SearchIndexDialog && option.SearchIndexDialog.Enable)
|
|
5696
|
+
chart.InitalSearchIndexDialog(option.SearchIndexDialog);
|
|
5701
5697
|
|
|
5702
5698
|
//注册事件
|
|
5703
5699
|
if (option.EventCallback)
|
|
@@ -6412,6 +6408,12 @@ JSChart.GetScrollPosition=function()
|
|
|
6412
6408
|
return GetScrollPosition();
|
|
6413
6409
|
}
|
|
6414
6410
|
|
|
6411
|
+
//品种小数位数
|
|
6412
|
+
JSChart.GetfloatPrecision=function(symbol)
|
|
6413
|
+
{
|
|
6414
|
+
return GetfloatPrecision(symbol);
|
|
6415
|
+
}
|
|
6416
|
+
|
|
6415
6417
|
|
|
6416
6418
|
|
|
6417
6419
|
|
|
@@ -6610,6 +6612,7 @@ var JSCHART_EVENT_ID=
|
|
|
6610
6612
|
ON_CHANGE_KLINE_RIGHT:160, //切换复权
|
|
6611
6613
|
|
|
6612
6614
|
ON_FORMAT_KLINE_FLOAT_TOOLTIP:161, //格式化k线浮动框显示文字
|
|
6615
|
+
ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP:162, //格式化信息地雷显示文字
|
|
6613
6616
|
}
|
|
6614
6617
|
|
|
6615
6618
|
var JSCHART_OPERATOR_ID=
|
|
@@ -7014,6 +7017,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7014
7017
|
this.DialogTooltip; //tooltip信息
|
|
7015
7018
|
this.DialogSelectRect; //区间统计
|
|
7016
7019
|
this.FloatTooltip; //浮动tooltip信息
|
|
7020
|
+
this.DialogSearchIndex; //指标搜索
|
|
7017
7021
|
|
|
7018
7022
|
|
|
7019
7023
|
this.ClearStockCache=function()
|
|
@@ -7074,6 +7078,34 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7074
7078
|
this.DialogSelectRect.Create();
|
|
7075
7079
|
}
|
|
7076
7080
|
|
|
7081
|
+
this.InitalSearchIndexDialog=function(option)
|
|
7082
|
+
{
|
|
7083
|
+
if (this.DialogSearchIndex) return;
|
|
7084
|
+
|
|
7085
|
+
this.DialogSearchIndex=new JSDialogSearchIndex();
|
|
7086
|
+
this.DialogSearchIndex.Inital(this, option);
|
|
7087
|
+
this.DialogSearchIndex.Create();
|
|
7088
|
+
}
|
|
7089
|
+
|
|
7090
|
+
this.ShowChangeIndexDialog=function(data)
|
|
7091
|
+
{
|
|
7092
|
+
if (!data) return;
|
|
7093
|
+
if (!this.DialogSearchIndex) return;
|
|
7094
|
+
|
|
7095
|
+
data.Title=`切换指标 [窗口${data.WindowIndex+1}]`;
|
|
7096
|
+
this.DialogSearchIndex.SetOpData(data);
|
|
7097
|
+
this.DialogSearchIndex.Show();
|
|
7098
|
+
}
|
|
7099
|
+
|
|
7100
|
+
this.ShowAddOverlayIndexDialog=function(data)
|
|
7101
|
+
{
|
|
7102
|
+
if (!data) return;
|
|
7103
|
+
if (!this.DialogSearchIndex) return;
|
|
7104
|
+
|
|
7105
|
+
data.Title=`添加叠加指标 [窗口${data.WindowIndex+1}]`;
|
|
7106
|
+
this.DialogSearchIndex.SetOpData(data);
|
|
7107
|
+
this.DialogSearchIndex.Show();
|
|
7108
|
+
}
|
|
7077
7109
|
|
|
7078
7110
|
|
|
7079
7111
|
this.DrawSelectRectDialog=function()
|
|
@@ -7172,6 +7204,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7172
7204
|
this.FloatTooltip=null;
|
|
7173
7205
|
}
|
|
7174
7206
|
|
|
7207
|
+
this.DestroySearchIndexDialog=function()
|
|
7208
|
+
{
|
|
7209
|
+
if (!this.DialogSearchIndex) return;
|
|
7210
|
+
|
|
7211
|
+
this.DialogSearchIndex.Destroy();
|
|
7212
|
+
this.DialogSearchIndex=null;
|
|
7213
|
+
}
|
|
7214
|
+
|
|
7175
7215
|
|
|
7176
7216
|
|
|
7177
7217
|
//obj={ Element:, Canvas: }
|
|
@@ -7225,6 +7265,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7225
7265
|
this.StopAutoUpdate();
|
|
7226
7266
|
this.DestroyTooltipDialog();
|
|
7227
7267
|
this.DestroyFloatTooltip();
|
|
7268
|
+
this.DestroySearchIndexDialog();
|
|
7228
7269
|
}
|
|
7229
7270
|
|
|
7230
7271
|
this.ChartDestory=this.ChartDestroy; //老版本写错了,需要兼容下
|
|
@@ -10998,7 +11039,25 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10998
11039
|
|
|
10999
11040
|
this.DrawFloatTooltip=function(point,toolTip)
|
|
11000
11041
|
{
|
|
11042
|
+
if (!this.FloatTooltip) return;
|
|
11001
11043
|
|
|
11044
|
+
this.UpdateFloatTooltip(point, toolTip)
|
|
11045
|
+
}
|
|
11046
|
+
|
|
11047
|
+
this.UpdateFloatTooltip=function(point, toolTip)
|
|
11048
|
+
{
|
|
11049
|
+
if (!this.FloatTooltip) return;
|
|
11050
|
+
|
|
11051
|
+
var sendData=
|
|
11052
|
+
{
|
|
11053
|
+
Tooltip:toolTip,
|
|
11054
|
+
Point:point,
|
|
11055
|
+
Symbol:this.Symbol,
|
|
11056
|
+
Name:this.Name,
|
|
11057
|
+
DataType:1,
|
|
11058
|
+
};
|
|
11059
|
+
|
|
11060
|
+
this.FloatTooltip.Update(sendData);
|
|
11002
11061
|
}
|
|
11003
11062
|
|
|
11004
11063
|
//更新实时行情到浮动tooltip
|
|
@@ -11103,6 +11162,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11103
11162
|
}
|
|
11104
11163
|
else if (toolTip.Type==2) //指标信息
|
|
11105
11164
|
{
|
|
11165
|
+
if (this.FloatTooltip)
|
|
11166
|
+
{
|
|
11167
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11168
|
+
bHideFloatToolip=false;
|
|
11169
|
+
return;
|
|
11170
|
+
}
|
|
11171
|
+
|
|
11106
11172
|
var left = x;
|
|
11107
11173
|
var top = y;
|
|
11108
11174
|
|
|
@@ -11124,6 +11190,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11124
11190
|
}
|
|
11125
11191
|
else if (toolTip.Type==3) //分时图异动信息
|
|
11126
11192
|
{
|
|
11193
|
+
if (this.FloatTooltip)
|
|
11194
|
+
{
|
|
11195
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11196
|
+
bHideFloatToolip=false;
|
|
11197
|
+
return;
|
|
11198
|
+
}
|
|
11199
|
+
|
|
11127
11200
|
var left = x;
|
|
11128
11201
|
var top = y;
|
|
11129
11202
|
|
|
@@ -11143,8 +11216,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11143
11216
|
this.Tooltip.innerHTML=format.Text;;
|
|
11144
11217
|
this.Tooltip.style.display = "block";
|
|
11145
11218
|
}
|
|
11146
|
-
else if (toolTip.Type==4) //
|
|
11219
|
+
else if (toolTip.Type==4) //ChartMultiSVGIconV2 图标信息
|
|
11147
11220
|
{
|
|
11221
|
+
if (this.FloatTooltip)
|
|
11222
|
+
{
|
|
11223
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11224
|
+
bHideFloatToolip=false;
|
|
11225
|
+
return;
|
|
11226
|
+
}
|
|
11227
|
+
|
|
11148
11228
|
var left = x;
|
|
11149
11229
|
var top = y;
|
|
11150
11230
|
|
|
@@ -11166,6 +11246,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11166
11246
|
}
|
|
11167
11247
|
else if (toolTip.Type==5)
|
|
11168
11248
|
{
|
|
11249
|
+
if (this.FloatTooltip)
|
|
11250
|
+
{
|
|
11251
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11252
|
+
bHideFloatToolip=false;
|
|
11253
|
+
return;
|
|
11254
|
+
}
|
|
11255
|
+
|
|
11169
11256
|
var left = x;
|
|
11170
11257
|
var top = y;
|
|
11171
11258
|
|
|
@@ -11188,6 +11275,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11188
11275
|
}
|
|
11189
11276
|
else if (toolTip.Type==6) //散点图
|
|
11190
11277
|
{
|
|
11278
|
+
if (this.FloatTooltip)
|
|
11279
|
+
{
|
|
11280
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11281
|
+
bHideFloatToolip=false;
|
|
11282
|
+
return;
|
|
11283
|
+
}
|
|
11284
|
+
|
|
11191
11285
|
var left = x;
|
|
11192
11286
|
var top = y;
|
|
11193
11287
|
|
|
@@ -11210,6 +11304,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11210
11304
|
}
|
|
11211
11305
|
else if (toolTip.Type==7) //ChartDrawSVG
|
|
11212
11306
|
{
|
|
11307
|
+
if (this.FloatTooltip)
|
|
11308
|
+
{
|
|
11309
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11310
|
+
bHideFloatToolip=false;
|
|
11311
|
+
return;
|
|
11312
|
+
}
|
|
11313
|
+
|
|
11213
11314
|
var left = x;
|
|
11214
11315
|
var top = y;
|
|
11215
11316
|
|
|
@@ -11230,6 +11331,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11230
11331
|
this.Tooltip.innerHTML=format.Text;
|
|
11231
11332
|
this.Tooltip.style.display = "block";
|
|
11232
11333
|
}
|
|
11334
|
+
else if (toolTip.Type==8) //ChartDrawSVG 新版本
|
|
11335
|
+
{
|
|
11336
|
+
if (this.FloatTooltip)
|
|
11337
|
+
{
|
|
11338
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11339
|
+
bHideFloatToolip=false;
|
|
11340
|
+
return;
|
|
11341
|
+
}
|
|
11342
|
+
}
|
|
11233
11343
|
|
|
11234
11344
|
|
|
11235
11345
|
if (bHideFloatToolip) this.HideFloatTooltip();
|
|
@@ -12138,6 +12248,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12138
12248
|
if (this.DialogTooltip) this.DialogTooltip.ReloadResource(option);
|
|
12139
12249
|
if (this.FloatTooltip) this.FloatTooltip.ReloadResource(option);
|
|
12140
12250
|
if (this.DialogSelectRect) this.DialogSelectRect.ReloadResource(option);
|
|
12251
|
+
if (this.DialogSearchIndex) this.DialogSearchIndex.ReloadResource(option);
|
|
12141
12252
|
}
|
|
12142
12253
|
|
|
12143
12254
|
this.ReloadBorder=function(option) //根据页面缩放调整对应边框的尺长
|
|
@@ -14473,7 +14584,7 @@ function CoordinateInfo()
|
|
|
14473
14584
|
this.Font=g_JSChartResource.FrameSplitTextFont; //字体
|
|
14474
14585
|
this.LineColor=g_JSChartResource.FrameSplitPen; //线段颜色
|
|
14475
14586
|
this.LineDash=null; //当线段类型==2时 可以设置虚线样式
|
|
14476
|
-
this.LineType=1; //线段类型 -1=不画线段 2=虚线, 8,9=集合竞价坐标
|
|
14587
|
+
this.LineType=1; //线段类型 -1=不画线段 0=虚线 1,2=虚线, 3=短线 8,9=集合竞价坐标
|
|
14477
14588
|
this.LineWidth; //线段宽度
|
|
14478
14589
|
this.ExtendLine; //延长线长度[ ] { Width:长度 } [0]=左 [1]=右 实例: [null, { Width: 50}];
|
|
14479
14590
|
this.ExtendData; //扩展属性
|
|
@@ -17483,7 +17594,7 @@ function AverageWidthFrame()
|
|
|
17483
17594
|
{
|
|
17484
17595
|
if (lineType==-1) return;
|
|
17485
17596
|
|
|
17486
|
-
if (lineType==0)
|
|
17597
|
+
if (lineType==0) //直线
|
|
17487
17598
|
{
|
|
17488
17599
|
var pixelRatio=GetDevicePixelRatio();
|
|
17489
17600
|
this.Canvas.strokeStyle=color;
|
|
@@ -17529,7 +17640,7 @@ function AverageWidthFrame()
|
|
|
17529
17640
|
}
|
|
17530
17641
|
this.Canvas.stroke();
|
|
17531
17642
|
}
|
|
17532
|
-
else
|
|
17643
|
+
else if (lineType==1 || lineType==2) //虚线
|
|
17533
17644
|
{
|
|
17534
17645
|
this.DrawDotLine(left,right,y, color, option);
|
|
17535
17646
|
}
|
|
@@ -17771,7 +17882,6 @@ function MinuteFrame()
|
|
|
17771
17882
|
this.OverlayIndex=g_JSChartResource.MinuteToolbar.OverlayIndex; //是否显示叠加指标
|
|
17772
17883
|
|
|
17773
17884
|
this.ModifyIndexEvent; //改参数 点击事件
|
|
17774
|
-
this.ChangeIndexEvent; //换指标 点击事件
|
|
17775
17885
|
this.ToolbarRect=null; //保存工具条的位置
|
|
17776
17886
|
this.IsShowPositionTitle=false; //是否显示持仓标题
|
|
17777
17887
|
|
|
@@ -20201,7 +20311,6 @@ function KLineFrame()
|
|
|
20201
20311
|
this.SelBorderColor=g_JSChartResource.SelFrameBorderColor;
|
|
20202
20312
|
|
|
20203
20313
|
this.ModifyIndexEvent; //改参数 点击事件
|
|
20204
|
-
this.ChangeIndexEvent; //换指标 点击事件
|
|
20205
20314
|
this.ToolbarRect=null; //保存工具条的位置
|
|
20206
20315
|
this.ReDrawToolbar=false;
|
|
20207
20316
|
|
|
@@ -43910,203 +44019,6 @@ function ChartMultiText()
|
|
|
43910
44019
|
}
|
|
43911
44020
|
}
|
|
43912
44021
|
|
|
43913
|
-
// 图标集合 支持横屏
|
|
43914
|
-
function ChartMultiSVGIcon()
|
|
43915
|
-
{
|
|
43916
|
-
this.newMethod=IChartPainting; //派生
|
|
43917
|
-
this.newMethod();
|
|
43918
|
-
delete this.newMethod;
|
|
43919
|
-
|
|
43920
|
-
this.ClassName="ChartMultiSVGIcon";
|
|
43921
|
-
this.Icon; //[ {Index:, Value:, Symbol:, Color:, Baseline:, Line:{ Color:, Dash:[虚线点], KData:"H/L", Offset:[5,10], Width:线粗细 } } ]
|
|
43922
|
-
this.IconSize={ Max: g_JSChartResource.DRAWICON.Icon.MaxSize, Min:g_JSChartResource.DRAWICON.Icon.MinSize , //图标的最大最小值
|
|
43923
|
-
Zoom:{ Type:g_JSChartResource.DRAWICON.Icon.Zoom.Type , Value:g_JSChartResource.DRAWICON.Icon.Zoom.Value } //放大倍数
|
|
43924
|
-
};
|
|
43925
|
-
this.Family;
|
|
43926
|
-
this.Color=g_JSChartResource.DefaultTextColor;
|
|
43927
|
-
this.IsHScreen=false;
|
|
43928
|
-
this.IconRect=[]; //0=序号,1=区域
|
|
43929
|
-
|
|
43930
|
-
this.Draw=function()
|
|
43931
|
-
{
|
|
43932
|
-
this.IconRect=[];
|
|
43933
|
-
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
43934
|
-
if (this.IsShowIndexTitleOnly()) return;
|
|
43935
|
-
if (this.IsHideScriptIndex()) return;
|
|
43936
|
-
if (!this.Data || this.Data.length<=0) return;
|
|
43937
|
-
if (!this.Family || !this.Icon) return;
|
|
43938
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.Icon)) return;
|
|
43939
|
-
|
|
43940
|
-
this.IsHScreen=(this.ChartFrame.IsHScreen===true);
|
|
43941
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
43942
|
-
var offset=this.Data.DataOffset;
|
|
43943
|
-
this.DataWidth=this.ChartFrame.DataWidth;
|
|
43944
|
-
this.DistanceWidth=this.ChartFrame.DistanceWidth;
|
|
43945
|
-
|
|
43946
|
-
var border=this.GetBorder();
|
|
43947
|
-
if (this.IsHScreen)
|
|
43948
|
-
{
|
|
43949
|
-
var left=border.TopEx;
|
|
43950
|
-
var right=border.BottomEx;
|
|
43951
|
-
}
|
|
43952
|
-
else
|
|
43953
|
-
{
|
|
43954
|
-
var left=border.LeftEx;
|
|
43955
|
-
var right=border.RightEx;
|
|
43956
|
-
}
|
|
43957
|
-
|
|
43958
|
-
var fontSize=this.GetDynamicIconSize(this.DataWidth,this.DistanceWidth,this.IconSize.Max,this.IconSize.Min,this.IconSize.Zoom);
|
|
43959
|
-
this.Canvas.font=fontSize+'px '+this.Family;
|
|
43960
|
-
|
|
43961
|
-
for(var i=0; i<this.Icon.length; ++i)
|
|
43962
|
-
{
|
|
43963
|
-
var item=this.Icon[i];
|
|
43964
|
-
if (!IFrameSplitOperator.IsNumber(item.Index)) continue;
|
|
43965
|
-
|
|
43966
|
-
var index=item.Index-offset;
|
|
43967
|
-
if (index>=0 && index<xPointCount)
|
|
43968
|
-
{
|
|
43969
|
-
var x=this.ChartFrame.GetXFromIndex(index);
|
|
43970
|
-
var y=this.ChartFrame.GetYFromData(item.Value);
|
|
43971
|
-
|
|
43972
|
-
if (item.Color) this.Canvas.fillStyle = item.Color;
|
|
43973
|
-
else this.Canvas.fillStyle = this.Color;
|
|
43974
|
-
|
|
43975
|
-
var textWidth=this.Canvas.measureText(item.Symbol).width;
|
|
43976
|
-
this.Canvas.textAlign='center';
|
|
43977
|
-
var rtIcon=new Rect(x-fontSize/2,y-fontSize/2,fontSize,fontSize);
|
|
43978
|
-
if (x+textWidth/2>=right)
|
|
43979
|
-
{
|
|
43980
|
-
this.Canvas.textAlign='right';
|
|
43981
|
-
x+=this.DataWidth/2;
|
|
43982
|
-
rtIcon.X=x-fontSize;
|
|
43983
|
-
}
|
|
43984
|
-
else if (x-textWidth/2<left)
|
|
43985
|
-
{
|
|
43986
|
-
this.Canvas.textAlign = 'left';
|
|
43987
|
-
x-=this.DataWidth/2;
|
|
43988
|
-
rtIcon.X=x;
|
|
43989
|
-
}
|
|
43990
|
-
|
|
43991
|
-
if (item.Baseline==1)
|
|
43992
|
-
{
|
|
43993
|
-
this.Canvas.textBaseline='top';
|
|
43994
|
-
rtIcon.Y=y;
|
|
43995
|
-
}
|
|
43996
|
-
else if (item.Baseline==2)
|
|
43997
|
-
{
|
|
43998
|
-
this.Canvas.textBaseline='bottom';
|
|
43999
|
-
rtIcon.Y=y-fontSize;
|
|
44000
|
-
}
|
|
44001
|
-
else
|
|
44002
|
-
{
|
|
44003
|
-
this.Canvas.textBaseline = 'middle';
|
|
44004
|
-
rtIcon.Y=y-fontSize/2;
|
|
44005
|
-
}
|
|
44006
|
-
|
|
44007
|
-
if (this.IsHScreen)
|
|
44008
|
-
{
|
|
44009
|
-
this.Canvas.save();
|
|
44010
|
-
this.Canvas.translate(y, x);
|
|
44011
|
-
this.Canvas.rotate(90 * Math.PI / 180);
|
|
44012
|
-
this.Canvas.fillText(item.Symbol,0,0);
|
|
44013
|
-
this.Canvas.restore();
|
|
44014
|
-
}
|
|
44015
|
-
else
|
|
44016
|
-
{
|
|
44017
|
-
if (IFrameSplitOperator.IsNumber(item.YMove)) y+=item.YMove;
|
|
44018
|
-
this.Canvas.fillText(item.Symbol, x, y);
|
|
44019
|
-
if (item.Text) this.IconRect.push({ Index:i, Rect:rtIcon , Item:item });
|
|
44020
|
-
}
|
|
44021
|
-
|
|
44022
|
-
if (item.Line)
|
|
44023
|
-
{
|
|
44024
|
-
var kItem=this.Data.Data[item.Index];
|
|
44025
|
-
var price=item.Line.KData=="H"? kItem.High:kItem.Low;
|
|
44026
|
-
var yPrice=this.ChartFrame.GetYFromData(price);
|
|
44027
|
-
var yText=y;
|
|
44028
|
-
if (Array.isArray(item.Line.Offset) && item.Line.Offset.length==2)
|
|
44029
|
-
{
|
|
44030
|
-
if (yText>yPrice) //文字在下方
|
|
44031
|
-
{
|
|
44032
|
-
yText-=item.Line.Offset[1];
|
|
44033
|
-
yPrice+=item.Line.Offset[0]
|
|
44034
|
-
}
|
|
44035
|
-
else if (yText<yPrice)
|
|
44036
|
-
{
|
|
44037
|
-
yText+=item.Line.Offset[1];
|
|
44038
|
-
yPrice-=item.Line.Offset[0]
|
|
44039
|
-
}
|
|
44040
|
-
}
|
|
44041
|
-
this.Canvas.save();
|
|
44042
|
-
if (item.Line.Dash) this.Canvas.setLineDash(item.Line.Dash); //虚线
|
|
44043
|
-
if (item.Line.Width>0) this.Canvas.lineWidth=item.Line.Width; //线宽
|
|
44044
|
-
this.Canvas.strokeStyle = item.Line.Color;
|
|
44045
|
-
this.Canvas.beginPath();
|
|
44046
|
-
if (this.IsHScreen)
|
|
44047
|
-
{
|
|
44048
|
-
this.Canvas.moveTo(yText, ToFixedPoint(x));
|
|
44049
|
-
this.Canvas.lineTo(yPrice,ToFixedPoint(x));
|
|
44050
|
-
}
|
|
44051
|
-
else
|
|
44052
|
-
{
|
|
44053
|
-
this.Canvas.moveTo(ToFixedPoint(x),yText);
|
|
44054
|
-
this.Canvas.lineTo(ToFixedPoint(x),yPrice);
|
|
44055
|
-
}
|
|
44056
|
-
|
|
44057
|
-
this.Canvas.stroke();
|
|
44058
|
-
this.Canvas.restore();
|
|
44059
|
-
}
|
|
44060
|
-
}
|
|
44061
|
-
}
|
|
44062
|
-
}
|
|
44063
|
-
|
|
44064
|
-
this.GetTooltipData=function(x,y,tooltip)
|
|
44065
|
-
{
|
|
44066
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.IconRect)) return false;
|
|
44067
|
-
for(var i=0; i<this.IconRect.length; ++i)
|
|
44068
|
-
{
|
|
44069
|
-
var item=this.IconRect[i];
|
|
44070
|
-
if (!item.Rect) continue;
|
|
44071
|
-
var rect=item.Rect;
|
|
44072
|
-
this.Canvas.beginPath();
|
|
44073
|
-
this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
|
|
44074
|
-
if (this.Canvas.isPointInPath(x,y))
|
|
44075
|
-
{
|
|
44076
|
-
JSConsole.Chart.Log('[ChartMultiSVGIcon::GetTooltipData] icon ', item);
|
|
44077
|
-
tooltip.Data=item;
|
|
44078
|
-
tooltip.ChartPaint=this;
|
|
44079
|
-
tooltip.Type=4; //指标
|
|
44080
|
-
return true;
|
|
44081
|
-
}
|
|
44082
|
-
}
|
|
44083
|
-
|
|
44084
|
-
return false;
|
|
44085
|
-
}
|
|
44086
|
-
|
|
44087
|
-
this.GetMaxMin=function()
|
|
44088
|
-
{
|
|
44089
|
-
var range={ Min:null, Max:null };
|
|
44090
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
44091
|
-
var start=this.Data.DataOffset;
|
|
44092
|
-
var end=start+xPointCount;
|
|
44093
|
-
|
|
44094
|
-
for(var i in this.Icon)
|
|
44095
|
-
{
|
|
44096
|
-
var item=this.Icon[i];
|
|
44097
|
-
if (item.Index>=start && item.Index<end)
|
|
44098
|
-
{
|
|
44099
|
-
if (range.Max==null) range.Max=item.Value;
|
|
44100
|
-
else if (range.Max<item.Value) range.Max=item.Value;
|
|
44101
|
-
if (range.Min==null) range.Min=item.Value;
|
|
44102
|
-
else if (range.Min>item.Value) range.Min=item.Value;
|
|
44103
|
-
}
|
|
44104
|
-
}
|
|
44105
|
-
|
|
44106
|
-
return range;
|
|
44107
|
-
}
|
|
44108
|
-
}
|
|
44109
|
-
|
|
44110
44022
|
|
|
44111
44023
|
//图标集合(2.0) 支持横屏
|
|
44112
44024
|
function ChartMultiSVGIconV2()
|
|
@@ -44318,6 +44230,7 @@ function ChartMultiSVGIconV2()
|
|
|
44318
44230
|
if (IFrameSplitOperator.IsNumber(item.YMove)) y+=item.YMove;
|
|
44319
44231
|
this.Canvas.fillText(item.Symbol, x, y);
|
|
44320
44232
|
if (item.Text) this.IconRect.push({ Rect:rtIcon , Item:item, KItem:kItem });
|
|
44233
|
+
else if (IFrameSplitOperator.IsNonEmptyArray(item.AryText)) this.IconRect.push({ Rect:rtIcon , Item:item, KItem:kItem });
|
|
44321
44234
|
}
|
|
44322
44235
|
|
|
44323
44236
|
if (item.Line)
|
|
@@ -45067,6 +44980,7 @@ function ChartDrawSVG()
|
|
|
45067
44980
|
tooltip.Data={ Rect:item.Rect, Item:data, Index:item.Index };
|
|
45068
44981
|
tooltip.ChartPaint=this;
|
|
45069
44982
|
tooltip.Type=7; //drawsvg
|
|
44983
|
+
if (data.Tooltip && data.Tooltip.Ver==2.0) tooltip.Type=8; //drawsvg 新本版
|
|
45070
44984
|
return true;
|
|
45071
44985
|
}
|
|
45072
44986
|
}
|
|
@@ -73357,6 +73271,19 @@ function JSChartResource()
|
|
|
73357
73271
|
}
|
|
73358
73272
|
};
|
|
73359
73273
|
|
|
73274
|
+
//指标搜索
|
|
73275
|
+
this.DialogSearchIndex=
|
|
73276
|
+
{
|
|
73277
|
+
BGColor:'rgb(250,250,250)', //背景色
|
|
73278
|
+
BorderColor:'rgb(20,20,20)', //边框颜色
|
|
73279
|
+
TitleColor:'rgb(250,250,250)', //标题颜色
|
|
73280
|
+
TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
|
|
73281
|
+
|
|
73282
|
+
IndexNameColor:"rgb(0,0,0)", //数值名称
|
|
73283
|
+
GroupNameColor:"rgb(0,0,0)",
|
|
73284
|
+
InputTextColor:"rgb(0,0,0)"
|
|
73285
|
+
};
|
|
73286
|
+
|
|
73360
73287
|
//弹幕
|
|
73361
73288
|
this.Barrage= {
|
|
73362
73289
|
Font:16*GetDevicePixelRatio() +'px 微软雅黑', //字体
|
|
@@ -74422,6 +74349,20 @@ function JSChartResource()
|
|
|
74422
74349
|
}
|
|
74423
74350
|
}
|
|
74424
74351
|
|
|
74352
|
+
if (style.DialogSearchIndex)
|
|
74353
|
+
{
|
|
74354
|
+
var item=style.DialogSearchIndex;
|
|
74355
|
+
|
|
74356
|
+
if (item.BGColor) this.DialogSearchIndex.BGColor=item.BGColor;
|
|
74357
|
+
if (item.BorderColor) this.DialogSearchIndex.BorderColor=item.BorderColor;
|
|
74358
|
+
if (item.TitleColor) this.DialogSearchIndex.TitleColor=item.TitleColor;
|
|
74359
|
+
if (item.TitleBGColor) this.DialogSearchIndex.TitleBGColor=item.TitleBGColor;
|
|
74360
|
+
|
|
74361
|
+
if (item.IndexNameColor) this.DialogSearchIndex.IndexNameColor=item.IndexNameColor;
|
|
74362
|
+
if (item.GroupNameColor) this.DialogSearchIndex.GroupNameColor=item.GroupNameColor;
|
|
74363
|
+
if (item.InputTextColor) this.DialogSearchIndex.InputTextColor=item.InputTextColor;
|
|
74364
|
+
}
|
|
74365
|
+
|
|
74425
74366
|
if (style.MinuteInfo)
|
|
74426
74367
|
{
|
|
74427
74368
|
var item=style.MinuteInfo;
|
|
@@ -77506,7 +77447,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77506
77447
|
frame.GlobalOption=this.GlobalOption;
|
|
77507
77448
|
|
|
77508
77449
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
77509
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
77510
77450
|
|
|
77511
77451
|
frame.HorizontalMax=20;
|
|
77512
77452
|
frame.HorizontalMin=10;
|
|
@@ -77591,7 +77531,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77591
77531
|
frame.GlobalOption=this.GlobalOption;
|
|
77592
77532
|
|
|
77593
77533
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
77594
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
77595
77534
|
|
|
77596
77535
|
frame.HorizontalMax=20;
|
|
77597
77536
|
frame.HorizontalMin=10;
|
|
@@ -83589,9 +83528,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
83589
83528
|
else if (button.ID==JSCHART_BUTTON_ID.CHANGE_INDEX)
|
|
83590
83529
|
{
|
|
83591
83530
|
var frame=button.Frame;
|
|
83531
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:1 };
|
|
83532
|
+
this.ShowChangeIndexDialog(sendData);
|
|
83533
|
+
/*
|
|
83592
83534
|
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:false };
|
|
83593
83535
|
if (frame.ChangeIndexEvent)
|
|
83594
83536
|
frame.ChangeIndexEvent(e);
|
|
83537
|
+
*/
|
|
83595
83538
|
}
|
|
83596
83539
|
else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
|
|
83597
83540
|
{
|
|
@@ -83603,9 +83546,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
83603
83546
|
else if (button.ID==JSCHART_BUTTON_ID.OVERLAY_INDEX)
|
|
83604
83547
|
{
|
|
83605
83548
|
var frame=button.Frame;
|
|
83549
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:2 };
|
|
83550
|
+
this.ShowAddOverlayIndexDialog(sendData);
|
|
83551
|
+
/*
|
|
83606
83552
|
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:true };
|
|
83607
83553
|
if (frame.ChangeIndexEvent)
|
|
83608
83554
|
frame.ChangeIndexEvent(e);
|
|
83555
|
+
*/
|
|
83609
83556
|
}
|
|
83610
83557
|
else if (button.ID==JSCHART_BUTTON_ID.MAX_MIN_WINDOW)
|
|
83611
83558
|
{
|
|
@@ -83856,29 +83803,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
83856
83803
|
this.DialogSelectRect.Update(sendData);
|
|
83857
83804
|
}
|
|
83858
83805
|
|
|
83859
|
-
this.DrawFloatTooltip=function(point,toolTip)
|
|
83860
|
-
{
|
|
83861
|
-
if (!this.FloatTooltip) return;
|
|
83862
|
-
|
|
83863
|
-
this.UpdateFloatTooltip(point, toolTip)
|
|
83864
|
-
}
|
|
83865
|
-
|
|
83866
|
-
this.UpdateFloatTooltip=function(point, toolTip)
|
|
83867
|
-
{
|
|
83868
|
-
if (!this.FloatTooltip) return;
|
|
83869
|
-
|
|
83870
|
-
var sendData=
|
|
83871
|
-
{
|
|
83872
|
-
Tooltip:toolTip,
|
|
83873
|
-
Point:point,
|
|
83874
|
-
Symbol:this.Symbol,
|
|
83875
|
-
Name:this.Name,
|
|
83876
|
-
DataType:1,
|
|
83877
|
-
};
|
|
83878
|
-
|
|
83879
|
-
this.FloatTooltip.Update(sendData);
|
|
83880
|
-
}
|
|
83881
|
-
|
|
83882
83806
|
this.UpdateHQFloatTooltip=function(kData)
|
|
83883
83807
|
{
|
|
83884
83808
|
if (!this.FloatTooltip) return;
|
|
@@ -84441,9 +84365,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84441
84365
|
else if (button.ID==JSCHART_BUTTON_ID.CHANGE_INDEX)
|
|
84442
84366
|
{
|
|
84443
84367
|
var frame=button.Frame;
|
|
84444
|
-
|
|
84445
|
-
|
|
84446
|
-
frame.ChangeIndexEvent(e);
|
|
84368
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:1 };
|
|
84369
|
+
this.ShowChangeIndexDialog(sendData);
|
|
84447
84370
|
}
|
|
84448
84371
|
else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
|
|
84449
84372
|
{
|
|
@@ -84455,9 +84378,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84455
84378
|
else if (button.ID==JSCHART_BUTTON_ID.OVERLAY_INDEX)
|
|
84456
84379
|
{
|
|
84457
84380
|
var frame=button.Frame;
|
|
84458
|
-
|
|
84459
|
-
|
|
84460
|
-
frame.ChangeIndexEvent(e);
|
|
84381
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:2 };
|
|
84382
|
+
this.ShowAddOverlayIndexDialog(sendData);
|
|
84461
84383
|
}
|
|
84462
84384
|
else if (button.ID==JSCHART_BUTTON_ID.MAX_MIN_WINDOW)
|
|
84463
84385
|
{
|
|
@@ -86219,7 +86141,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86219
86141
|
if (i>=2)
|
|
86220
86142
|
{
|
|
86221
86143
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
86222
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
86223
86144
|
}
|
|
86224
86145
|
|
|
86225
86146
|
var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
|
|
@@ -86311,7 +86232,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86311
86232
|
if (id>=2)
|
|
86312
86233
|
{
|
|
86313
86234
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
86314
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
86315
86235
|
}
|
|
86316
86236
|
|
|
86317
86237
|
var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
|
|
@@ -91886,7 +91806,6 @@ function KLineChartHScreenContainer(uielement)
|
|
|
91886
91806
|
frame.RightSpaceCount=this.RightSpaceCount; //右边
|
|
91887
91807
|
|
|
91888
91808
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
91889
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
91890
91809
|
|
|
91891
91810
|
frame.HorizontalMax=20;
|
|
91892
91811
|
frame.HorizontalMin=10;
|
|
@@ -94716,266 +94635,6 @@ function ModifyIndexDialog(divElement)
|
|
|
94716
94635
|
}
|
|
94717
94636
|
}
|
|
94718
94637
|
|
|
94719
|
-
//换指标
|
|
94720
|
-
function ChangeIndexDialog(divElement)
|
|
94721
|
-
{
|
|
94722
|
-
this.newMethod=IDivDialog; //派生
|
|
94723
|
-
this.newMethod(divElement);
|
|
94724
|
-
delete this.newMethod;
|
|
94725
|
-
|
|
94726
|
-
this.DivElement=divElement; //父节点
|
|
94727
|
-
//this.IndexTreeApiUrl="../commonindextree.json"; //数据下载地址
|
|
94728
|
-
//this.OverlayIndexTreeApiUrl="../commonindextree.json"; //叠加指标列表数据下载地址
|
|
94729
|
-
this.IsOverlayIndex=false;
|
|
94730
|
-
|
|
94731
|
-
this.Create=function()
|
|
94732
|
-
{
|
|
94733
|
-
var div=document.createElement('div');
|
|
94734
|
-
div.className='jchart-changeindex-box';
|
|
94735
|
-
div.id=this.ID=Guid();
|
|
94736
|
-
div.innerHTML=
|
|
94737
|
-
'<div class="target-panel">\n' +
|
|
94738
|
-
' <div class="target-header">\n' +
|
|
94739
|
-
' <span>换指标</span>\n' +
|
|
94740
|
-
' <strong class="close-tar icon iconfont icon-close"></strong>\n' +
|
|
94741
|
-
' </div>\n' +
|
|
94742
|
-
' <div class="target-content">\n' +
|
|
94743
|
-
' <div class="target-left">\n' +
|
|
94744
|
-
' <input type="text">\n' +
|
|
94745
|
-
' <ul></ul>\n' +
|
|
94746
|
-
' </div>\n' +
|
|
94747
|
-
' <div class="target-right">\n' +
|
|
94748
|
-
' <ul></ul>\n' +
|
|
94749
|
-
' </div>\n' +
|
|
94750
|
-
' </div>\n' +
|
|
94751
|
-
' </div>';
|
|
94752
|
-
|
|
94753
|
-
this.DivElement.appendChild(div);
|
|
94754
|
-
}
|
|
94755
|
-
|
|
94756
|
-
//指标菜单内容
|
|
94757
|
-
this.GetMenuData=function()
|
|
94758
|
-
{
|
|
94759
|
-
var data={
|
|
94760
|
-
"name":"页面通用版指标树",
|
|
94761
|
-
"list":
|
|
94762
|
-
[
|
|
94763
|
-
{
|
|
94764
|
-
"node":"超买超卖型",
|
|
94765
|
-
"list":
|
|
94766
|
-
[
|
|
94767
|
-
{"name":"ADTM 动态买卖气指标", "id":"ADTM"},
|
|
94768
|
-
{"name":"BIAS 乖离率", "id":"BIAS"},
|
|
94769
|
-
{"name":"BIAS36 三六乖离", "id":"BIAS36"},
|
|
94770
|
-
{"name":"BIAS_QL 乖离率-传统版", "id":"BIAS_QL"},
|
|
94771
|
-
{"name":"CCI 商品路径指标", "id":"CCI"},
|
|
94772
|
-
{"name":"FSL 分水岭", "id":"FSL"},
|
|
94773
|
-
{"name":"KDJ 随机指标", "id":"KDJ"},
|
|
94774
|
-
{"name":"MTM 动量线", "id":"MTM"},
|
|
94775
|
-
{"name":"OSC 变动速率线", "id":"OSC"},
|
|
94776
|
-
{"name":"RSI 相对强弱指标", "id":"RSI"},
|
|
94777
|
-
{"name":"ROC 变动率指标", "id":"ROC"},
|
|
94778
|
-
{"name":"WR 威廉指标", "id":"WR"}
|
|
94779
|
-
]
|
|
94780
|
-
},
|
|
94781
|
-
{
|
|
94782
|
-
"node":"趋势型",
|
|
94783
|
-
"list":
|
|
94784
|
-
[
|
|
94785
|
-
{"name":"CHO 济坚指数", "id":"CHO"},
|
|
94786
|
-
{"name":"DMA 平均差", "id":"DMA"},
|
|
94787
|
-
{"name":"DMI 趋向指标", "id":"DMI"},
|
|
94788
|
-
{"name":"EMV 简易波动指标", "id":"EMV"},
|
|
94789
|
-
{"name":"MACD 平滑异同平均", "id":"MACD"},
|
|
94790
|
-
{"name":"TRIX 三重指数平均线", "id":"TRIX"},
|
|
94791
|
-
{"name":"UOS 终极指标", "id":"UOS"},
|
|
94792
|
-
{"name":"TRIX 三重指数平均线", "id":"TRIX"}
|
|
94793
|
-
]
|
|
94794
|
-
},
|
|
94795
|
-
{
|
|
94796
|
-
"node":"成交量型",
|
|
94797
|
-
"list":
|
|
94798
|
-
[
|
|
94799
|
-
{"name":"HSL 换手率", "id":"HSL"},
|
|
94800
|
-
{"name":"OBV 累积能量线", "id":"OBV"},
|
|
94801
|
-
{"name":"NVI 负成交量", "id":"NVI"},
|
|
94802
|
-
{"name":"PVI 正成交量", "id":"PVI"},
|
|
94803
|
-
{"name":"VOL 成交量", "id":"VOL"}
|
|
94804
|
-
]
|
|
94805
|
-
},
|
|
94806
|
-
{
|
|
94807
|
-
"node":"均线型",
|
|
94808
|
-
"list":
|
|
94809
|
-
[
|
|
94810
|
-
{"name":"MA 均线", "id":"均线"},
|
|
94811
|
-
{"name":"BBI 多空线", "id":"BBI"}
|
|
94812
|
-
]
|
|
94813
|
-
},
|
|
94814
|
-
{
|
|
94815
|
-
"node":"路径型",
|
|
94816
|
-
"list":
|
|
94817
|
-
[
|
|
94818
|
-
{"name":"BOLL 布林线", "id":"BOLL"},
|
|
94819
|
-
{"name":"BOLL副图 布林线", "id":"BOLL副图"},
|
|
94820
|
-
{"name":"MIKE 麦克支撑压力", "id":"MIKE"},
|
|
94821
|
-
{"name":"ENE 轨道线", "id":"ENE"}
|
|
94822
|
-
]
|
|
94823
|
-
},
|
|
94824
|
-
{
|
|
94825
|
-
"node":"能量型",
|
|
94826
|
-
"list":
|
|
94827
|
-
[
|
|
94828
|
-
{"name":"BRAR 情绪指标", "id":"BRAR"},
|
|
94829
|
-
{"name":"CYR 市场强弱", "id":"CYR"},
|
|
94830
|
-
{"name":"MASS 梅斯线", "id":"MASS"},
|
|
94831
|
-
{"name":"PSY 心理线", "id":"PSY"},
|
|
94832
|
-
{"name":"CR 带状能量线", "id":"CR"},
|
|
94833
|
-
{"name":"VR 成交量变异率", "id":"VR"},
|
|
94834
|
-
{"name":"WAD 威廉多空力度线", "id":"WAD"}
|
|
94835
|
-
]
|
|
94836
|
-
}
|
|
94837
|
-
|
|
94838
|
-
]
|
|
94839
|
-
};
|
|
94840
|
-
|
|
94841
|
-
return data;
|
|
94842
|
-
}
|
|
94843
|
-
|
|
94844
|
-
//下载数据 如果上次下载过可以 可以不用下载
|
|
94845
|
-
this.ReqeustData=function()
|
|
94846
|
-
{
|
|
94847
|
-
if($("#" + this.ID + " .target-left ul li").length>0){
|
|
94848
|
-
return false;
|
|
94849
|
-
}
|
|
94850
|
-
|
|
94851
|
-
var res=this.GetMenuData();
|
|
94852
|
-
var item = res.list;
|
|
94853
|
-
changeIndexLeftList(item); //处理左侧list列表
|
|
94854
|
-
changeIndexRightList(item); //处理右侧内容列表
|
|
94855
|
-
|
|
94856
|
-
/*
|
|
94857
|
-
var url = this.IndexTreeApiUrl;
|
|
94858
|
-
if (this.IsOverlayIndex==true) url=this.OverlayIndexTreeApiUrl;
|
|
94859
|
-
JSNetwork.HttpRequest({
|
|
94860
|
-
url: url,
|
|
94861
|
-
type: 'get',
|
|
94862
|
-
success: function (res) {
|
|
94863
|
-
var item = res.list;
|
|
94864
|
-
changeIndexLeftList(item); //处理左侧list列表
|
|
94865
|
-
changeIndexRightList(item); //处理右侧内容列表
|
|
94866
|
-
}
|
|
94867
|
-
});
|
|
94868
|
-
*/
|
|
94869
|
-
|
|
94870
|
-
//处理左侧list列表
|
|
94871
|
-
function changeIndexLeftList(item) {
|
|
94872
|
-
$(".target-left ul").html('');
|
|
94873
|
-
$.each(item,function(i,result){
|
|
94874
|
-
var htmlList;
|
|
94875
|
-
htmlList = '<li>' + result.node + '</li>';
|
|
94876
|
-
$(".target-left ul").append(htmlList);
|
|
94877
|
-
});
|
|
94878
|
-
//默认选中第一项
|
|
94879
|
-
$(".target-left ul li:first-child").addClass("active-list");
|
|
94880
|
-
}
|
|
94881
|
-
//处理右侧内容列表
|
|
94882
|
-
function changeIndexRightList(listNum) {
|
|
94883
|
-
var contentHtml;
|
|
94884
|
-
var conData = [];
|
|
94885
|
-
$.each(listNum,function(index,result){
|
|
94886
|
-
conData.push(result.list);
|
|
94887
|
-
})
|
|
94888
|
-
//页面初始化时显示第一个列表分类下的内容
|
|
94889
|
-
$.each(conData[0],function (i, res) {
|
|
94890
|
-
contentHtml = '<li id='+res.id+'>'+ res.name +'</li>';
|
|
94891
|
-
$(".target-right ul").append(contentHtml);
|
|
94892
|
-
})
|
|
94893
|
-
//切换list
|
|
94894
|
-
$(".target-left ul").delegate("li","click",function () {
|
|
94895
|
-
$(this).addClass("active-list").siblings().removeClass("active-list");
|
|
94896
|
-
var item = $(this).index();
|
|
94897
|
-
$(".target-right ul").html("");
|
|
94898
|
-
$.each(conData[item],function (i, res) {
|
|
94899
|
-
contentHtml = '<li id='+res.id+'>'+ res.name +'</li>';
|
|
94900
|
-
$(".target-right ul").append(contentHtml);
|
|
94901
|
-
})
|
|
94902
|
-
})
|
|
94903
|
-
}
|
|
94904
|
-
}
|
|
94905
|
-
|
|
94906
|
-
this.BindClose=function(chart)
|
|
94907
|
-
{
|
|
94908
|
-
//关闭按钮
|
|
94909
|
-
$("#"+this.ID+" .close-tar").click(
|
|
94910
|
-
{
|
|
94911
|
-
Chart:chart,
|
|
94912
|
-
},
|
|
94913
|
-
function(event)
|
|
94914
|
-
{
|
|
94915
|
-
var chart=event.data.Chart;
|
|
94916
|
-
chart.ChangeIndexDialog.Hide();
|
|
94917
|
-
}
|
|
94918
|
-
);
|
|
94919
|
-
}
|
|
94920
|
-
|
|
94921
|
-
//搜索事件
|
|
94922
|
-
this.BindSearch=function(chart)
|
|
94923
|
-
{
|
|
94924
|
-
$(".target-left input").on('input',
|
|
94925
|
-
{
|
|
94926
|
-
Chart:chart
|
|
94927
|
-
},
|
|
94928
|
-
function(event)
|
|
94929
|
-
{
|
|
94930
|
-
let scriptData = new JSIndexScript();
|
|
94931
|
-
let result=scriptData.Search(event.target.value);
|
|
94932
|
-
|
|
94933
|
-
$(".target-right ul").html("");
|
|
94934
|
-
for(var i in result)
|
|
94935
|
-
{
|
|
94936
|
-
var name=result[i];
|
|
94937
|
-
var contentHtml = '<li id='+name+'>'+ name +'</li>';
|
|
94938
|
-
$(".target-right ul").append(contentHtml);
|
|
94939
|
-
}
|
|
94940
|
-
|
|
94941
|
-
}
|
|
94942
|
-
);
|
|
94943
|
-
}
|
|
94944
|
-
|
|
94945
|
-
this.DoModal=function(event)
|
|
94946
|
-
{
|
|
94947
|
-
var chart=event.data.Chart;
|
|
94948
|
-
var identify=event.data.Identify;
|
|
94949
|
-
var dialog=chart.ChangeIndexDialog;
|
|
94950
|
-
var isOverlay=event.data.IsOverlay; //是否叠加
|
|
94951
|
-
|
|
94952
|
-
if(!dialog) return;
|
|
94953
|
-
|
|
94954
|
-
if (dialog.ID==null) dialog.Create(); //第1次 需要创建div
|
|
94955
|
-
dialog.IsOverlayIndex=isOverlay;
|
|
94956
|
-
dialog.ReqeustData(); //下载数据
|
|
94957
|
-
|
|
94958
|
-
//切换窗口指标类型 每次委托事件执行之前,先用undelegate()解除之前的所有绑定
|
|
94959
|
-
changeIndeWindow();
|
|
94960
|
-
function changeIndeWindow()
|
|
94961
|
-
{
|
|
94962
|
-
$(".target-right ul").undelegate().delegate("li","click",function () {
|
|
94963
|
-
var idv = $(this).attr("id");
|
|
94964
|
-
if (isOverlay)
|
|
94965
|
-
chart.AddOverlayIndex({WindowIndex:identify,IndexName:idv});
|
|
94966
|
-
else
|
|
94967
|
-
chart.ChangeIndex(identify,idv);
|
|
94968
|
-
$(this).addClass("active-list").siblings().removeClass("active-list");
|
|
94969
|
-
});
|
|
94970
|
-
}
|
|
94971
|
-
|
|
94972
|
-
dialog.BindSearch(chart);
|
|
94973
|
-
//关闭弹窗
|
|
94974
|
-
dialog.BindClose(chart);
|
|
94975
|
-
dialog.Show();
|
|
94976
|
-
}
|
|
94977
|
-
}
|
|
94978
|
-
|
|
94979
94638
|
//等待动画窗口
|
|
94980
94639
|
function WaitDialog(divElement)
|
|
94981
94640
|
{
|
|
@@ -125550,6 +125209,17 @@ function GetBlackStyle()
|
|
|
125550
125209
|
PositionColor:"rgb(255,0,255)" //持仓
|
|
125551
125210
|
},
|
|
125552
125211
|
|
|
125212
|
+
DialogSearchIndex:
|
|
125213
|
+
{
|
|
125214
|
+
BGColor:'rgb(20,20,20)', //背景色
|
|
125215
|
+
BorderColor:'rgb(170,170,170)', //边框颜色
|
|
125216
|
+
TitleColor:'rgb(230,230,230)', //标题颜色
|
|
125217
|
+
|
|
125218
|
+
IndexNameColor:"rgb(210,210,210)",
|
|
125219
|
+
GroupNameColor:"rgb(210,210,210)",
|
|
125220
|
+
InputTextColor:"rgb(210,210,210)",
|
|
125221
|
+
},
|
|
125222
|
+
|
|
125553
125223
|
DialogPopKeyboard:
|
|
125554
125224
|
{
|
|
125555
125225
|
BGColor:'rgb(20,20,20)', //背景色
|
|
@@ -145099,7 +144769,7 @@ function JSDialogTooltip()
|
|
|
145099
144769
|
if (this.TitleColor) this.TitleBox.DivName.style['color']=this.TitleColor;
|
|
145100
144770
|
|
|
145101
144771
|
this.UpdateTableDOM();
|
|
145102
|
-
}
|
|
144772
|
+
}
|
|
145103
144773
|
|
|
145104
144774
|
|
|
145105
144775
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -145385,7 +145055,7 @@ function JSFloatTooltip()
|
|
|
145385
145055
|
{
|
|
145386
145056
|
Left:"UMyChart_Tooltip_Float_Text2_Span", //左对齐
|
|
145387
145057
|
MarginLeft:'UMyChart_Tooltip_Float_Text3_Span',
|
|
145388
|
-
Right:"UMyChart_Tooltip_Float_Text_Span"
|
|
145058
|
+
Right:"UMyChart_Tooltip_Float_Text_Span",
|
|
145389
145059
|
}
|
|
145390
145060
|
|
|
145391
145061
|
this.AryData=[]; //输出文字信息
|
|
@@ -145400,6 +145070,7 @@ function JSFloatTooltip()
|
|
|
145400
145070
|
if (option)
|
|
145401
145071
|
{
|
|
145402
145072
|
if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
|
|
145073
|
+
if (IFrameSplitOperator.IsNumber(option.MaxRowCount)) this.MaxRowCount=option.MaxRowCount;
|
|
145403
145074
|
}
|
|
145404
145075
|
}
|
|
145405
145076
|
|
|
@@ -145557,6 +145228,34 @@ function JSFloatTooltip()
|
|
|
145557
145228
|
{
|
|
145558
145229
|
this.UpdateKLineInfoTooltip(data);
|
|
145559
145230
|
}
|
|
145231
|
+
else if (tooltipData.Type==2) //交易指标
|
|
145232
|
+
{
|
|
145233
|
+
this.UpdateTradeIndexTooltip(data);
|
|
145234
|
+
}
|
|
145235
|
+
else if (tooltipData.Type==3) //分时图异动信息
|
|
145236
|
+
{
|
|
145237
|
+
this.UpdateMinuteInfoTooltip(data);
|
|
145238
|
+
}
|
|
145239
|
+
else if (tooltipData.Type==4) //ChartMultiSVGIconV2 图标信息
|
|
145240
|
+
{
|
|
145241
|
+
this.UpdatMultiSVGIconV2Tooltip(data);
|
|
145242
|
+
}
|
|
145243
|
+
else if (tooltipData.Type==5) //ChartOX 信息
|
|
145244
|
+
{
|
|
145245
|
+
this.UpdatChartOXTooltip(data);
|
|
145246
|
+
}
|
|
145247
|
+
else if (tooltipData.Type==6) //散点图
|
|
145248
|
+
{
|
|
145249
|
+
this.UpdatChartScatterPlotTooltip(data);
|
|
145250
|
+
}
|
|
145251
|
+
else if (tooltipData.Type==7) //ChartDrawSVG 老版本 单行
|
|
145252
|
+
{
|
|
145253
|
+
this.UpdateChartDrawSVGTooltip(data);
|
|
145254
|
+
}
|
|
145255
|
+
else if (tooltipData.Type==8) //ChartDrawSVG 新版本
|
|
145256
|
+
{
|
|
145257
|
+
this.UpdateChartDrawSVGV2Tooltip(data);
|
|
145258
|
+
}
|
|
145560
145259
|
}
|
|
145561
145260
|
else if (data.DataType==2) //更新实时行情数据
|
|
145562
145261
|
{
|
|
@@ -145624,6 +145323,191 @@ function JSFloatTooltip()
|
|
|
145624
145323
|
}
|
|
145625
145324
|
}
|
|
145626
145325
|
|
|
145326
|
+
//ChartDrawSVG 老版本 单行
|
|
145327
|
+
this.UpdateChartDrawSVGTooltip=function(data)
|
|
145328
|
+
{
|
|
145329
|
+
var tooltipData=data.Tooltip;
|
|
145330
|
+
if (!tooltipData.Data || !tooltipData.Data.Item || !tooltipData.Data.Item.Tooltip) return;
|
|
145331
|
+
var item=tooltipData.Data.Item.Tooltip;
|
|
145332
|
+
|
|
145333
|
+
var aryText=[]
|
|
145334
|
+
var rowItem={ Text:"", HTMLTitle:item.Text, Color:this.ValueColor, IsMergeCell:true };
|
|
145335
|
+
aryText.push(rowItem);
|
|
145336
|
+
|
|
145337
|
+
this.AryText=aryText;
|
|
145338
|
+
this.UpdateTableDOM();
|
|
145339
|
+
|
|
145340
|
+
if (data.Point)
|
|
145341
|
+
{
|
|
145342
|
+
var x=data.Point.X;
|
|
145343
|
+
var y=data.Point.Y+data.Point.YMove;
|
|
145344
|
+
this.Show(x, y);
|
|
145345
|
+
}
|
|
145346
|
+
}
|
|
145347
|
+
|
|
145348
|
+
//ChartDrawSVG 新版本
|
|
145349
|
+
this.UpdateChartDrawSVGV2Tooltip=function(data)
|
|
145350
|
+
{
|
|
145351
|
+
var tooltipData=data.Tooltip;
|
|
145352
|
+
if (!tooltipData.Data || !tooltipData.Data.Item || !tooltipData.Data.Item.Tooltip) return;
|
|
145353
|
+
var aryData=tooltipData.Data.Item.Tooltip.AryText;
|
|
145354
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(aryData)) return;
|
|
145355
|
+
var aryText=[];
|
|
145356
|
+
for(var i=0;i<aryData.length;++i)
|
|
145357
|
+
{
|
|
145358
|
+
var item=aryData[i];
|
|
145359
|
+
var rowItem={ Title:"", Text:"", Color:this.ValueColor, ClassName:this.ValueAlign.MarginLeft };
|
|
145360
|
+
if (item.TextColor) rowItem.Color=item.TextColor;
|
|
145361
|
+
if (item.Title) rowItem.Title=item.Title;
|
|
145362
|
+
if (item.Text) rowItem.Text=item.Text;
|
|
145363
|
+
|
|
145364
|
+
aryText.push(rowItem);
|
|
145365
|
+
}
|
|
145366
|
+
|
|
145367
|
+
this.AryText=aryText;
|
|
145368
|
+
|
|
145369
|
+
this.UpdateTableDOM();
|
|
145370
|
+
|
|
145371
|
+
if (data.Point)
|
|
145372
|
+
{
|
|
145373
|
+
var x=data.Point.X;
|
|
145374
|
+
var y=data.Point.Y+data.Point.YMove;
|
|
145375
|
+
this.Show(x, y);
|
|
145376
|
+
}
|
|
145377
|
+
}
|
|
145378
|
+
|
|
145379
|
+
//交易指标
|
|
145380
|
+
this.UpdateTradeIndexTooltip=function(data)
|
|
145381
|
+
{
|
|
145382
|
+
var tooltipData=data.Tooltip;
|
|
145383
|
+
if (!tooltipData.Data || !tooltipData.Data.Data) return;
|
|
145384
|
+
|
|
145385
|
+
var item=tooltipData.Data.Data;
|
|
145386
|
+
var kItem=item.KData;
|
|
145387
|
+
var aryText=[];
|
|
145388
|
+
|
|
145389
|
+
var rowItem={ Title:"日期",Text:IFrameSplitOperator.FormatDateString(kItem.Date,"YYYY-MM-DD"), Color:this.ValueColor };
|
|
145390
|
+
aryText.push(rowItem);
|
|
145391
|
+
|
|
145392
|
+
if (IFrameSplitOperator.IsNumber(kItem.Time))
|
|
145393
|
+
{
|
|
145394
|
+
var format="HH:MM";
|
|
145395
|
+
var rowItem={ Title:"时间",Text:IFrameSplitOperator.FormatTimeString(kItem.Time,format), Color:this.ValueColor };
|
|
145396
|
+
aryText.push(rowItem);
|
|
145397
|
+
}
|
|
145398
|
+
|
|
145399
|
+
var rowItem={ Title:"指标名称:", Text:`${item.Name}${item.Param}`, Color:this.ValueColor };
|
|
145400
|
+
aryText.push(rowItem);
|
|
145401
|
+
|
|
145402
|
+
var rowItem={ Title:"买卖方向:", Text:`${item.Type==1?"买入":"卖出"}`, Color:item.Type==1?this.UpColor:this.DownColor };
|
|
145403
|
+
aryText.push(rowItem);
|
|
145404
|
+
|
|
145405
|
+
var rowItem={ };
|
|
145406
|
+
|
|
145407
|
+
this.AryText=aryText;
|
|
145408
|
+
|
|
145409
|
+
this.UpdateTableDOM();
|
|
145410
|
+
|
|
145411
|
+
if (data.Point)
|
|
145412
|
+
{
|
|
145413
|
+
var x=data.Point.X;
|
|
145414
|
+
var y=data.Point.Y+data.Point.YMove;
|
|
145415
|
+
this.Show(x, y);
|
|
145416
|
+
}
|
|
145417
|
+
}
|
|
145418
|
+
|
|
145419
|
+
//分时图异动信息
|
|
145420
|
+
this.UpdateMinuteInfoTooltip=function(data)
|
|
145421
|
+
{
|
|
145422
|
+
var tooltipData=data.Tooltip;
|
|
145423
|
+
if (!tooltipData.Data || !tooltipData.Data.Data || !tooltipData.Data.Data.Item) return;
|
|
145424
|
+
var item=tooltipData.Data.Data.Item;
|
|
145425
|
+
|
|
145426
|
+
var aryText=[];
|
|
145427
|
+
var rowItem={ Title:"日期",Text:IFrameSplitOperator.FormatDateString(item.Date,"YYYY-MM-DD"), Color:this.ValueColor };
|
|
145428
|
+
aryText.push(rowItem);
|
|
145429
|
+
|
|
145430
|
+
var format="HH:MM";
|
|
145431
|
+
var rowItem={ Title:"时间",Text:IFrameSplitOperator.FormatTimeString(item.Time,format), Color:this.ValueColor };
|
|
145432
|
+
aryText.push(rowItem);
|
|
145433
|
+
|
|
145434
|
+
var rowItem={ Title:"异动", Text:item.Title, Color:this.ValueColor };
|
|
145435
|
+
aryText.push(rowItem);
|
|
145436
|
+
|
|
145437
|
+
this.AryText=aryText;
|
|
145438
|
+
this.UpdateTableDOM();
|
|
145439
|
+
|
|
145440
|
+
if (data.Point)
|
|
145441
|
+
{
|
|
145442
|
+
var x=data.Point.X;
|
|
145443
|
+
var y=data.Point.Y+data.Point.YMove;
|
|
145444
|
+
this.Show(x, y);
|
|
145445
|
+
}
|
|
145446
|
+
}
|
|
145447
|
+
|
|
145448
|
+
//ChartMultiSVGIconV2 图标信息
|
|
145449
|
+
this.UpdatMultiSVGIconV2Tooltip=function(data)
|
|
145450
|
+
{
|
|
145451
|
+
var tooltipData=data.Tooltip;
|
|
145452
|
+
if (!tooltipData.Data || !tooltipData.Data.Item) return;
|
|
145453
|
+
|
|
145454
|
+
var item=tooltipData.Data.Item;
|
|
145455
|
+
var aryText=[];
|
|
145456
|
+
|
|
145457
|
+
var rowItem={ Text:"", HTMLTitle:item.Text, Color:this.ValueColor, IsMergeCell:true };
|
|
145458
|
+
aryText.push(rowItem);
|
|
145459
|
+
|
|
145460
|
+
this.AryText=aryText;
|
|
145461
|
+
this.UpdateTableDOM();
|
|
145462
|
+
|
|
145463
|
+
if (data.Point)
|
|
145464
|
+
{
|
|
145465
|
+
var x=data.Point.X;
|
|
145466
|
+
var y=data.Point.Y+data.Point.YMove;
|
|
145467
|
+
this.Show(x, y);
|
|
145468
|
+
}
|
|
145469
|
+
}
|
|
145470
|
+
|
|
145471
|
+
//ChartOX 信息
|
|
145472
|
+
this.UpdatChartOXTooltip=function(data)
|
|
145473
|
+
{
|
|
145474
|
+
var tooltipData=data.Tooltip;
|
|
145475
|
+
if (!tooltipData.Data || !tooltipData.Data.Data) return;
|
|
145476
|
+
|
|
145477
|
+
var item=tooltipData.Data.Data;
|
|
145478
|
+
var period=this.HQChart.Period;
|
|
145479
|
+
var aryText=[];
|
|
145480
|
+
if (ChartData.IsDayPeriod(period, true))
|
|
145481
|
+
{
|
|
145482
|
+
var strStartDate=IFrameSplitOperator.FormatDateString(item.Start.Date,"YYYY-MM-DD");
|
|
145483
|
+
var strEndDate=IFrameSplitOperator.FormatDateString(item.End.Date,"YYYY-MM-DD");
|
|
145484
|
+
|
|
145485
|
+
aryText.push({ Title:"起始时间",Text:strStartDate, Color:this.ValueColor });
|
|
145486
|
+
aryText.push({ Title:"结束时间",Text:strEndDate, Color:this.ValueColor });
|
|
145487
|
+
}
|
|
145488
|
+
else if (ChartData.IsMinutePeriod(period, true))
|
|
145489
|
+
{
|
|
145490
|
+
var strStartDate=IFrameSplitOperator.FormatDateString(item.Start.Date);
|
|
145491
|
+
var strStartTime=IFrameSplitOperator.FormatTimeString(item.Start.Time,"HH:MM");
|
|
145492
|
+
|
|
145493
|
+
var strEndDate=IFrameSplitOperator.FormatDateString(item.End.Date);
|
|
145494
|
+
var strEndTime=IFrameSplitOperator.FormatTimeString(item.End.Time,"HH:MM");
|
|
145495
|
+
|
|
145496
|
+
aryText.push({ Title:"起始时间",Text:`${strStartDate} ${strStartTime}`, Color:this.ValueColor });
|
|
145497
|
+
aryText.push({ Title:"结束时间",Text:`${strEndDate} ${strEndTime}`, Color:this.ValueColor });
|
|
145498
|
+
}
|
|
145499
|
+
|
|
145500
|
+
this.AryText=aryText;
|
|
145501
|
+
this.UpdateTableDOM();
|
|
145502
|
+
|
|
145503
|
+
if (data.Point)
|
|
145504
|
+
{
|
|
145505
|
+
var x=data.Point.X;
|
|
145506
|
+
var y=data.Point.Y+data.Point.YMove;
|
|
145507
|
+
this.Show(x, y);
|
|
145508
|
+
}
|
|
145509
|
+
}
|
|
145510
|
+
|
|
145627
145511
|
this.UpdateTableDOM=function()
|
|
145628
145512
|
{
|
|
145629
145513
|
var index=0;
|
|
@@ -145632,10 +145516,16 @@ function JSFloatTooltip()
|
|
|
145632
145516
|
var outItem=this.AryText[index];
|
|
145633
145517
|
var item=this.AryData[index];
|
|
145634
145518
|
|
|
145635
|
-
item.TitleSpan.
|
|
145519
|
+
if (outItem.HTMLTitle) item.TitleSpan.innerHTML=outItem.HTMLTitle
|
|
145520
|
+
else item.TitleSpan.innerText=outItem.Title;
|
|
145521
|
+
|
|
145636
145522
|
item.TitleSpan.style.color=this.TextColor;
|
|
145637
|
-
|
|
145523
|
+
|
|
145524
|
+
if (outItem.HTMLText) item.TextSpan.innerHTML=outItem.HTMLText
|
|
145525
|
+
else item.TextSpan.innerText=outItem.Text;
|
|
145526
|
+
|
|
145638
145527
|
item.TextSpan.style.color=outItem.Color;
|
|
145528
|
+
item.TextTd.style.color=outItem.Color;
|
|
145639
145529
|
|
|
145640
145530
|
if (outItem.ClassName)
|
|
145641
145531
|
{
|
|
@@ -145645,9 +145535,21 @@ function JSFloatTooltip()
|
|
|
145645
145535
|
{
|
|
145646
145536
|
if (item.TextSpan.className!=this.ValueAlign.Right) item.TextSpan.className=this.ValueAlign.Right;
|
|
145647
145537
|
}
|
|
145538
|
+
|
|
145539
|
+
if (outItem.IsMergeCell) //合并单元格
|
|
145540
|
+
{
|
|
145541
|
+
item.TitleTd.colspan=2;
|
|
145542
|
+
item.TextTd.style.display="none";
|
|
145543
|
+
}
|
|
145544
|
+
else
|
|
145545
|
+
{
|
|
145546
|
+
if (item.TitleTd.colspan!=1) item.TitleTd.colspan=1;
|
|
145547
|
+
item.TextTd.style.display="";
|
|
145548
|
+
}
|
|
145648
145549
|
|
|
145649
145550
|
item.Tr.style.display="";
|
|
145650
|
-
if (item.Tr2) item.Tr2.style.display="";
|
|
145551
|
+
if (item.Tr2) item.Tr2.style.display="none";
|
|
145552
|
+
|
|
145651
145553
|
}
|
|
145652
145554
|
|
|
145653
145555
|
for( ; index<this.MaxRowCount; ++index)
|
|
@@ -145755,6 +145657,13 @@ function JSFloatTooltip()
|
|
|
145755
145657
|
}
|
|
145756
145658
|
}
|
|
145757
145659
|
|
|
145660
|
+
var event=this.HQChart.GetEventCallback(JSCHART_EVENT_ID.ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP);
|
|
145661
|
+
if (event && event.Callback)
|
|
145662
|
+
{
|
|
145663
|
+
var sendData={ AryText:aryText, Data:data, HQChart:this.HQChart };
|
|
145664
|
+
event.Callback(event, sendData, this);
|
|
145665
|
+
}
|
|
145666
|
+
|
|
145758
145667
|
this.AryText=aryText;
|
|
145759
145668
|
|
|
145760
145669
|
this.UpdateTableDOM();
|
|
@@ -145767,6 +145676,36 @@ function JSFloatTooltip()
|
|
|
145767
145676
|
}
|
|
145768
145677
|
}
|
|
145769
145678
|
|
|
145679
|
+
this.UpdatChartScatterPlotTooltip=function(data)
|
|
145680
|
+
{
|
|
145681
|
+
var tooltipData=data.Tooltip;
|
|
145682
|
+
if (!tooltipData.Data || !tooltipData.Data.Data || !tooltipData.Data.Data.Tooltip) return;
|
|
145683
|
+
var aryData=tooltipData.Data.Data.Tooltip;
|
|
145684
|
+
var aryText=[]; //输出内容
|
|
145685
|
+
|
|
145686
|
+
for(var i=0;i<aryData.length;++i)
|
|
145687
|
+
{
|
|
145688
|
+
var item=aryData[i];
|
|
145689
|
+
if (!item.Text && !item.Title) continue;
|
|
145690
|
+
var rowItem={ Title:"", Text:"", Color:this.ValueColor };
|
|
145691
|
+
if (item.Title) rowItem.Title=item.Title;
|
|
145692
|
+
if (item.Text) rowItem.Text=item.Text;
|
|
145693
|
+
if (item.TextColor) rowItem.Color=item.TextColor;
|
|
145694
|
+
|
|
145695
|
+
aryText.push(rowItem);
|
|
145696
|
+
}
|
|
145697
|
+
|
|
145698
|
+
this.AryText=aryText;
|
|
145699
|
+
this.UpdateTableDOM();
|
|
145700
|
+
|
|
145701
|
+
if (data.Point)
|
|
145702
|
+
{
|
|
145703
|
+
var x=data.Point.X;
|
|
145704
|
+
var y=data.Point.Y+data.Point.YMove;
|
|
145705
|
+
this.Show(x, y);
|
|
145706
|
+
}
|
|
145707
|
+
}
|
|
145708
|
+
|
|
145770
145709
|
|
|
145771
145710
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
145772
145711
|
// 公告数据格式化
|
|
@@ -147043,6 +146982,609 @@ function JSDialogSelectRect()
|
|
|
147043
146982
|
|
|
147044
146983
|
|
|
147045
146984
|
|
|
146985
|
+
|
|
146986
|
+
/*
|
|
146987
|
+
Copyright (c) 2018 jones
|
|
146988
|
+
|
|
146989
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
146990
|
+
|
|
146991
|
+
开源项目 https://github.com/jones2000/HQChart
|
|
146992
|
+
|
|
146993
|
+
jones_2000@163.com
|
|
146994
|
+
|
|
146995
|
+
内置指标搜索对话框
|
|
146996
|
+
*/
|
|
146997
|
+
|
|
146998
|
+
|
|
146999
|
+
function JSDialogSearchIndex()
|
|
147000
|
+
{
|
|
147001
|
+
this.DivDialog=null;
|
|
147002
|
+
this.DragTitle=null;
|
|
147003
|
+
this.TitleBox=null; //{ DivTitle, DivName, DivName }
|
|
147004
|
+
this.InputDom=null;
|
|
147005
|
+
this.Style=0; //样式 预留
|
|
147006
|
+
|
|
147007
|
+
this.HQChart=null;
|
|
147008
|
+
|
|
147009
|
+
//{ WindowIndex:窗口索引, OpType:1=切换主图指标 2=添加叠加指标, Title: };
|
|
147010
|
+
this.OpData=null;
|
|
147011
|
+
|
|
147012
|
+
this.TitleColor=g_JSChartResource.DialogSearchIndex.TitleColor;
|
|
147013
|
+
this.TitleBGColor=g_JSChartResource.DialogSearchIndex.TitleBGColor;
|
|
147014
|
+
this.BGColor=g_JSChartResource.DialogSearchIndex.BGColor;
|
|
147015
|
+
this.BorderColor=g_JSChartResource.DialogSearchIndex.BorderColor;
|
|
147016
|
+
this.IndexNameColor=g_JSChartResource.DialogSearchIndex.IndexNameColor;
|
|
147017
|
+
this.GroupNameColor=g_JSChartResource.DialogSearchIndex.GroupNameColor;
|
|
147018
|
+
this.InputTextColor=g_JSChartResource.DialogSearchIndex.InputTextColor;
|
|
147019
|
+
|
|
147020
|
+
this.MaxRowCount=30; //行
|
|
147021
|
+
this.ColCount=3; //列
|
|
147022
|
+
this.MaxGroupCount=10; //分类最多个数
|
|
147023
|
+
|
|
147024
|
+
this.AryData=[];
|
|
147025
|
+
this.AryGroup=[]; //分类
|
|
147026
|
+
this.IndexData=JSDialogSearchIndex.GetDefaultIndexData();
|
|
147027
|
+
|
|
147028
|
+
this.Inital=function(hqchart, option)
|
|
147029
|
+
{
|
|
147030
|
+
this.HQChart=hqchart;
|
|
147031
|
+
if (option)
|
|
147032
|
+
{
|
|
147033
|
+
if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
|
|
147034
|
+
if (option.IndexData) this.IndexData=option.IndexData;
|
|
147035
|
+
}
|
|
147036
|
+
}
|
|
147037
|
+
|
|
147038
|
+
this.Destroy=function()
|
|
147039
|
+
{
|
|
147040
|
+
this.AryData=[];
|
|
147041
|
+
this.AryGroup=[];
|
|
147042
|
+
this.IndexData=null;
|
|
147043
|
+
this.InputDom=null;
|
|
147044
|
+
|
|
147045
|
+
if (this.DivDialog)
|
|
147046
|
+
{
|
|
147047
|
+
document.body.removeChild(this.DivDialog);
|
|
147048
|
+
this.DivDialog=null;
|
|
147049
|
+
}
|
|
147050
|
+
}
|
|
147051
|
+
|
|
147052
|
+
this.OnClickColseButton=function(e)
|
|
147053
|
+
{
|
|
147054
|
+
this.Close(e);
|
|
147055
|
+
}
|
|
147056
|
+
|
|
147057
|
+
//设置当前窗口数据
|
|
147058
|
+
this.SetOpData=function(data)
|
|
147059
|
+
{
|
|
147060
|
+
this.OpData=data;
|
|
147061
|
+
}
|
|
147062
|
+
|
|
147063
|
+
this.Close=function(e)
|
|
147064
|
+
{
|
|
147065
|
+
this.OpData=null;
|
|
147066
|
+
if (!this.DivDialog) return;
|
|
147067
|
+
|
|
147068
|
+
this.DivDialog.style.visibility='hidden';
|
|
147069
|
+
}
|
|
147070
|
+
|
|
147071
|
+
this.OnMouseDownTitle=function(e)
|
|
147072
|
+
{
|
|
147073
|
+
if (!this.DivDialog) return;
|
|
147074
|
+
|
|
147075
|
+
var dragData={ X:e.clientX, Y:e.clientY };
|
|
147076
|
+
dragData.YOffset=e.clientX - this.DivDialog.offsetLeft;
|
|
147077
|
+
dragData.XOffset=e.clientY - this.DivDialog.offsetTop;
|
|
147078
|
+
this.DragTitle=dragData;
|
|
147079
|
+
|
|
147080
|
+
document.onmousemove=(e)=>{ this.DocOnMouseMoveTitle(e); }
|
|
147081
|
+
document.onmouseup=(e)=>{ this.DocOnMouseUpTitle(e); }
|
|
147082
|
+
}
|
|
147083
|
+
|
|
147084
|
+
this.DocOnMouseMoveTitle=function(e)
|
|
147085
|
+
{
|
|
147086
|
+
if (!this.DragTitle) return;
|
|
147087
|
+
|
|
147088
|
+
var left = e.clientX - this.DragTitle.YOffset;
|
|
147089
|
+
var top = e.clientY - this.DragTitle.XOffset;
|
|
147090
|
+
|
|
147091
|
+
var right=left+this.DivDialog.offsetWidth;
|
|
147092
|
+
var bottom=top+ this.DivDialog.offsetHeight;
|
|
147093
|
+
|
|
147094
|
+
if ((right+5)>=window.innerWidth) left=window.innerWidth-this.DivDialog.offsetWidth-5;
|
|
147095
|
+
if ((bottom+5)>=window.innerHeight) top=window.innerHeight-this.DivDialog.offsetHeight-5;
|
|
147096
|
+
|
|
147097
|
+
this.DivDialog.style.left = left + 'px';
|
|
147098
|
+
this.DivDialog.style.top = top + 'px';
|
|
147099
|
+
|
|
147100
|
+
if(e.preventDefault) e.preventDefault();
|
|
147101
|
+
}
|
|
147102
|
+
|
|
147103
|
+
this.DocOnMouseUpTitle=function(e)
|
|
147104
|
+
{
|
|
147105
|
+
this.DragTitle=null;
|
|
147106
|
+
this.onmousemove = null;
|
|
147107
|
+
this.onmouseup = null;
|
|
147108
|
+
}
|
|
147109
|
+
|
|
147110
|
+
this.Show=function(x, y, groupID)
|
|
147111
|
+
{
|
|
147112
|
+
if (!this.DivDialog) return;
|
|
147113
|
+
|
|
147114
|
+
if (!groupID) groupID=this.IndexData.Data[0].Group.ID;
|
|
147115
|
+
|
|
147116
|
+
this.UpdateGroupData();
|
|
147117
|
+
this.ChangeGroup(groupID);
|
|
147118
|
+
|
|
147119
|
+
if (this.OpData && this.OpData.Title) this.TitleBox.DivName.innerText=this.OpData.Title;
|
|
147120
|
+
|
|
147121
|
+
if (!IFrameSplitOperator.IsNumber(x) || !IFrameSplitOperator.IsNumber(y)) //默认居中显示
|
|
147122
|
+
{
|
|
147123
|
+
var rtClient=this.HQChart.UIElement.getBoundingClientRect();
|
|
147124
|
+
x=rtClient.left+(rtClient.right-rtClient.left-this.DivDialog.offsetWidth)/2;
|
|
147125
|
+
y=rtClient.top+(rtClient.bottom-rtClient.top-this.DivDialog.offsetHeight)/2;
|
|
147126
|
+
}
|
|
147127
|
+
|
|
147128
|
+
this.InputDom.value="";
|
|
147129
|
+
|
|
147130
|
+
this.DivDialog.style.visibility='visible';
|
|
147131
|
+
this.DivDialog.style.top = y + "px";
|
|
147132
|
+
this.DivDialog.style.left = x + "px";
|
|
147133
|
+
}
|
|
147134
|
+
|
|
147135
|
+
this.Create=function()
|
|
147136
|
+
{
|
|
147137
|
+
var divDom=document.createElement("div");
|
|
147138
|
+
divDom.className='UMyChart_SearchIndex_Dialog_Div';
|
|
147139
|
+
|
|
147140
|
+
//对话框标题栏
|
|
147141
|
+
var divTitle=document.createElement("div");
|
|
147142
|
+
divTitle.className='UMyChart_SearchIndex_Title_Div';
|
|
147143
|
+
divTitle.onmousedown=(e)=>{ this.OnMouseDownTitle(e);}
|
|
147144
|
+
divDom.appendChild(divTitle);
|
|
147145
|
+
|
|
147146
|
+
var divName=document.createElement("div");
|
|
147147
|
+
divName.className='UMyChart_SearchIndex_Name_Div';
|
|
147148
|
+
divName.innerText="指标搜索";
|
|
147149
|
+
divTitle.appendChild(divName);
|
|
147150
|
+
|
|
147151
|
+
var divClose=document.createElement("div");
|
|
147152
|
+
divClose.className='UMyChart_SearchIndex_Close_Div';
|
|
147153
|
+
divClose.innerText="x";
|
|
147154
|
+
divClose.onmousedown=(e)=>{ this.OnClickColseButton(e); }
|
|
147155
|
+
divTitle.appendChild(divClose);
|
|
147156
|
+
|
|
147157
|
+
//整个框子
|
|
147158
|
+
var divFrame=document.createElement("div");
|
|
147159
|
+
divFrame.className="UMyChart_SearchIndex_Frome_Div";
|
|
147160
|
+
divDom.appendChild(divFrame);
|
|
147161
|
+
|
|
147162
|
+
//搜索框
|
|
147163
|
+
var divInput=document.createElement("div");
|
|
147164
|
+
divInput.className="UMyChart_SearchIndex_Input_Div";
|
|
147165
|
+
divFrame.appendChild(divInput);
|
|
147166
|
+
|
|
147167
|
+
var input=document.createElement("input");
|
|
147168
|
+
input.className='UMyChart_SearchIndex_Input';
|
|
147169
|
+
input.type="text";
|
|
147170
|
+
input.placeholder="输入指标名称"
|
|
147171
|
+
input.addEventListener("input", (e)=>{this.OnInputSearch(e); })
|
|
147172
|
+
divInput.appendChild(input);
|
|
147173
|
+
this.InputDom=input;
|
|
147174
|
+
|
|
147175
|
+
//分类+指标内容
|
|
147176
|
+
var divContainer=document.createElement("div");
|
|
147177
|
+
divContainer.className="UMyChart_SearchIndex_Container_Div";
|
|
147178
|
+
divDom.appendChild(divContainer);
|
|
147179
|
+
|
|
147180
|
+
//分类
|
|
147181
|
+
var divGroup=document.createElement("div");
|
|
147182
|
+
divGroup.className="UMyChart_SearchIndex_GroupList_Div";
|
|
147183
|
+
divContainer.appendChild(divGroup);
|
|
147184
|
+
|
|
147185
|
+
for(var i=0, j=0;i<this.MaxGroupCount;++i)
|
|
147186
|
+
{
|
|
147187
|
+
var groupItem={ Div:null, Span:null };
|
|
147188
|
+
var divItem=document.createElement("div");
|
|
147189
|
+
divItem.className="UMyChart_SearchIndex_Group_Div";
|
|
147190
|
+
divGroup.appendChild(divItem);
|
|
147191
|
+
groupItem.Div=divItem;
|
|
147192
|
+
|
|
147193
|
+
var spanDom=document.createElement("span");
|
|
147194
|
+
spanDom.className='UMyChart_SearchIndex_Group_Span';
|
|
147195
|
+
spanDom.innerText='分类名称';
|
|
147196
|
+
divItem.appendChild(spanDom);
|
|
147197
|
+
groupItem.Span=spanDom;
|
|
147198
|
+
|
|
147199
|
+
spanDom.onmousedown=(e)=>{ this.OnClickGroup(e); }
|
|
147200
|
+
|
|
147201
|
+
this.AryGroup.push(groupItem);
|
|
147202
|
+
}
|
|
147203
|
+
|
|
147204
|
+
|
|
147205
|
+
//表格
|
|
147206
|
+
var divTable=document.createElement("div");
|
|
147207
|
+
divTable.className='UMyChart_SearchIndex_Table_Div';
|
|
147208
|
+
divContainer.appendChild(divTable);
|
|
147209
|
+
|
|
147210
|
+
var table=document.createElement("table");
|
|
147211
|
+
table.className="UMyChart_SearchIndex_Table";
|
|
147212
|
+
divTable.appendChild(table);
|
|
147213
|
+
|
|
147214
|
+
var tbody=document.createElement("tbody");
|
|
147215
|
+
tbody.className="UMyChart_SearchIndex_Tbody";
|
|
147216
|
+
table.appendChild(tbody);
|
|
147217
|
+
|
|
147218
|
+
this.AryData=[];
|
|
147219
|
+
|
|
147220
|
+
for(var i=0, j=0;i<this.MaxRowCount;++i)
|
|
147221
|
+
{
|
|
147222
|
+
var rowItem={ Tr:null, AryCell:[] };
|
|
147223
|
+
|
|
147224
|
+
var trDom=document.createElement("tr");
|
|
147225
|
+
trDom.className='UMyChart_SearchIndex_Group_Tr';
|
|
147226
|
+
tbody.appendChild(trDom);
|
|
147227
|
+
rowItem.Tr=trDom;
|
|
147228
|
+
|
|
147229
|
+
for(j=0; j<this.ColCount;++j)
|
|
147230
|
+
{
|
|
147231
|
+
var cellItem=this.CreateCellDOM(i,j,trDom);
|
|
147232
|
+
rowItem.AryCell.push(cellItem);
|
|
147233
|
+
}
|
|
147234
|
+
|
|
147235
|
+
this.AryData.push(rowItem);
|
|
147236
|
+
}
|
|
147237
|
+
|
|
147238
|
+
document.body.appendChild(divDom);
|
|
147239
|
+
|
|
147240
|
+
this.DivName=divName;
|
|
147241
|
+
this.DivDialog=divDom;
|
|
147242
|
+
this.TitleBox={ DivTitle:divTitle, DivName:divName, DivColor:divClose };
|
|
147243
|
+
|
|
147244
|
+
this.UpdateStyle();
|
|
147245
|
+
}
|
|
147246
|
+
|
|
147247
|
+
this.CreateCellDOM=function(rowID, colID, trDom)
|
|
147248
|
+
{
|
|
147249
|
+
var cellItem={ Td:null, Span:null, RowID:rowID, ColID:colID, IndexItem:null };
|
|
147250
|
+
var tdDom=document.createElement("td");
|
|
147251
|
+
tdDom.className="UMyChart_SearchIndex_Text_Td"; //指标名称
|
|
147252
|
+
trDom.appendChild(tdDom);
|
|
147253
|
+
cellItem.Td=tdDom;
|
|
147254
|
+
|
|
147255
|
+
var spanDom=document.createElement("span");
|
|
147256
|
+
spanDom.className='UMyChart_SearchIndex_Text_Span';
|
|
147257
|
+
spanDom.innerText='指标名称';
|
|
147258
|
+
spanDom.onmousedown=(e)=>{ this.OnClickIndex(e, cellItem); }
|
|
147259
|
+
tdDom.appendChild(spanDom);
|
|
147260
|
+
cellItem.Span=spanDom;
|
|
147261
|
+
|
|
147262
|
+
return cellItem;
|
|
147263
|
+
}
|
|
147264
|
+
|
|
147265
|
+
|
|
147266
|
+
this.OnClickIndex=function(e, cellItem)
|
|
147267
|
+
{
|
|
147268
|
+
if (!this.OpData) return;
|
|
147269
|
+
if (!cellItem || !cellItem.IndexItem) return;
|
|
147270
|
+
|
|
147271
|
+
if (this.OpData.OpType==1)
|
|
147272
|
+
{
|
|
147273
|
+
if (!IFrameSplitOperator.IsNumber(this.OpData.WindowIndex)) return;
|
|
147274
|
+
var indexItem=cellItem.IndexItem;
|
|
147275
|
+
if (indexItem.Type==0) //系统指标
|
|
147276
|
+
{
|
|
147277
|
+
this.HQChart.ChangeIndex(this.OpData.WindowIndex, indexItem.ID );
|
|
147278
|
+
}
|
|
147279
|
+
else if (indexItem.Type==1) //自定义通达性
|
|
147280
|
+
{
|
|
147281
|
+
|
|
147282
|
+
}
|
|
147283
|
+
else if (indexItem.Type==2) //api指标
|
|
147284
|
+
{
|
|
147285
|
+
|
|
147286
|
+
}
|
|
147287
|
+
}
|
|
147288
|
+
else if (this.OpData.OpType==2)
|
|
147289
|
+
{
|
|
147290
|
+
if (!IFrameSplitOperator.IsNumber(this.OpData.WindowIndex)) return;
|
|
147291
|
+
var indexItem=cellItem.IndexItem;
|
|
147292
|
+
|
|
147293
|
+
if (indexItem.Type==0) //系统指标
|
|
147294
|
+
{
|
|
147295
|
+
var obj={ WindowIndex:this.OpData.WindowIndex, IndexName:indexItem.ID };
|
|
147296
|
+
this.HQChart.AddOverlayIndex(obj);
|
|
147297
|
+
}
|
|
147298
|
+
else if (indexItem.Type==1) //自定义通达性
|
|
147299
|
+
{
|
|
147300
|
+
|
|
147301
|
+
}
|
|
147302
|
+
else if (indexItem.Type==2) //api指标
|
|
147303
|
+
{
|
|
147304
|
+
|
|
147305
|
+
}
|
|
147306
|
+
}
|
|
147307
|
+
|
|
147308
|
+
}
|
|
147309
|
+
|
|
147310
|
+
this.OnClickGroup=function(e)
|
|
147311
|
+
{
|
|
147312
|
+
if (!e.target) return false;
|
|
147313
|
+
var groupID=e.target.dataset.groupid;
|
|
147314
|
+
if (!groupID) return false;
|
|
147315
|
+
|
|
147316
|
+
this.ChangeGroup(groupID);
|
|
147317
|
+
}
|
|
147318
|
+
|
|
147319
|
+
this.UpdateStyle=function()
|
|
147320
|
+
{
|
|
147321
|
+
if (!this.DivDialog) return;
|
|
147322
|
+
|
|
147323
|
+
if (this.BGColor) this.DivDialog.style['background-color']=this.BGColor;
|
|
147324
|
+
if (this.BorderColor) this.DivDialog.style['border-color']=this.BorderColor;
|
|
147325
|
+
|
|
147326
|
+
if (this.TitleBGColor) this.TitleBox.DivTitle.style['background-color']=this.TitleBGColor;
|
|
147327
|
+
if (this.TitleColor) this.TitleBox.DivName.style['color']=this.TitleColor;
|
|
147328
|
+
|
|
147329
|
+
if (this.InputTextColor) this.InputDom.style['color']=this.InputTextColor;
|
|
147330
|
+
};
|
|
147331
|
+
|
|
147332
|
+
this.ChangeGroup=function(groupID)
|
|
147333
|
+
{
|
|
147334
|
+
if (!this.IndexData) return;
|
|
147335
|
+
if (!IFrameSplitOperator.IsNonEmptyArray(this.IndexData.Data)) return;
|
|
147336
|
+
|
|
147337
|
+
var findItem=null;
|
|
147338
|
+
for(var i=0; i<this.IndexData.Data.length; ++i)
|
|
147339
|
+
{
|
|
147340
|
+
var item=this.IndexData.Data[i];
|
|
147341
|
+
if (item.Group.ID==groupID)
|
|
147342
|
+
{
|
|
147343
|
+
findItem=item;
|
|
147344
|
+
break;
|
|
147345
|
+
}
|
|
147346
|
+
}
|
|
147347
|
+
|
|
147348
|
+
if (!findItem) return;
|
|
147349
|
+
|
|
147350
|
+
this.UpdateTableData(findItem);
|
|
147351
|
+
}
|
|
147352
|
+
|
|
147353
|
+
//左侧分类
|
|
147354
|
+
this.UpdateGroupData=function()
|
|
147355
|
+
{
|
|
147356
|
+
var index=0;
|
|
147357
|
+
for(index=0; index<this.IndexData.Data.length && index<this.AryGroup.length; ++index)
|
|
147358
|
+
{
|
|
147359
|
+
var item=this.IndexData.Data[index];
|
|
147360
|
+
var cell=this.AryGroup[index];
|
|
147361
|
+
cell.Span.innerText=item.Group.Name;
|
|
147362
|
+
cell.Span.dataset.groupid=item.Group.ID;
|
|
147363
|
+
cell.Span.dataset.groupname=item.Group.Name;
|
|
147364
|
+
cell.Span.style.color=this.GroupNameColor;
|
|
147365
|
+
|
|
147366
|
+
if (cell.Div.style.display=="none") cell.Div.style.display="";
|
|
147367
|
+
}
|
|
147368
|
+
|
|
147369
|
+
for(; index<this.AryGroup.length; ++index)
|
|
147370
|
+
{
|
|
147371
|
+
var cell=this.AryGroup[index];
|
|
147372
|
+
cell.Div.style.display="none";
|
|
147373
|
+
}
|
|
147374
|
+
}
|
|
147375
|
+
|
|
147376
|
+
this.UpdateTableData=function(data)
|
|
147377
|
+
{
|
|
147378
|
+
var rowIndex=0;
|
|
147379
|
+
for(var j=0, index=0;rowIndex<this.AryData.length && index<data.AryIndex.length ;++rowIndex)
|
|
147380
|
+
{
|
|
147381
|
+
var row=this.AryData[rowIndex];
|
|
147382
|
+
var cellCount=0;
|
|
147383
|
+
for(j=0;j<row.AryCell.length;++j)
|
|
147384
|
+
{
|
|
147385
|
+
var cell=row.AryCell[j];
|
|
147386
|
+
if (index<data.AryIndex.length)
|
|
147387
|
+
{
|
|
147388
|
+
var indexItem=data.AryIndex[index];
|
|
147389
|
+
cell.Span.innerText=indexItem.Name;
|
|
147390
|
+
cell.Span.style.color=this.IndexNameColor;
|
|
147391
|
+
if (cell.Td.style.display=="none") cell.Td.style.display="";
|
|
147392
|
+
cell.IndexItem=indexItem;
|
|
147393
|
+
++index;
|
|
147394
|
+
++cellCount;
|
|
147395
|
+
}
|
|
147396
|
+
else
|
|
147397
|
+
{
|
|
147398
|
+
cell.Td.style.display="none";
|
|
147399
|
+
}
|
|
147400
|
+
}
|
|
147401
|
+
|
|
147402
|
+
if (cellCount>0)
|
|
147403
|
+
{
|
|
147404
|
+
if (row.Tr.style.display=="none") row.Tr.style.display="";
|
|
147405
|
+
}
|
|
147406
|
+
else
|
|
147407
|
+
{
|
|
147408
|
+
row.Tr.style.display=="none";
|
|
147409
|
+
}
|
|
147410
|
+
}
|
|
147411
|
+
|
|
147412
|
+
for(; rowIndex<this.AryData.length; ++rowIndex)
|
|
147413
|
+
{
|
|
147414
|
+
var row=this.AryData[rowIndex];
|
|
147415
|
+
row.Tr.style.display="none";
|
|
147416
|
+
}
|
|
147417
|
+
}
|
|
147418
|
+
|
|
147419
|
+
//搜索
|
|
147420
|
+
this.OnInputSearch=function(e)
|
|
147421
|
+
{
|
|
147422
|
+
var strSearh=e.target.value;
|
|
147423
|
+
var aryIndex=[];
|
|
147424
|
+
|
|
147425
|
+
var aryData=this.SeachIndex(strSearh);
|
|
147426
|
+
var setIndex=new Set();
|
|
147427
|
+
for(var i=0;i<aryData.length;++i)
|
|
147428
|
+
{
|
|
147429
|
+
var item=aryData[i];
|
|
147430
|
+
var key=`${item.ID}-${item.Type}`;
|
|
147431
|
+
setIndex.add(key);
|
|
147432
|
+
aryIndex.push(item);
|
|
147433
|
+
}
|
|
147434
|
+
|
|
147435
|
+
//内置指标
|
|
147436
|
+
var scriptData = new JSIndexScript();
|
|
147437
|
+
var result=scriptData.Search(strSearh);
|
|
147438
|
+
if (IFrameSplitOperator.IsNonEmptyArray(result))
|
|
147439
|
+
{
|
|
147440
|
+
for(var i=0;i<result.length;++i)
|
|
147441
|
+
{
|
|
147442
|
+
var id=result[i];
|
|
147443
|
+
var key=`${id}-0`;
|
|
147444
|
+
if (setIndex.has(key)) continue;
|
|
147445
|
+
|
|
147446
|
+
var item={Name:id, ID:id, Type:0 };
|
|
147447
|
+
aryIndex.push(item);
|
|
147448
|
+
}
|
|
147449
|
+
}
|
|
147450
|
+
|
|
147451
|
+
this.UpdateTableData({ AryIndex:aryIndex })
|
|
147452
|
+
}
|
|
147453
|
+
|
|
147454
|
+
this.SeachIndex=function(strSearch)
|
|
147455
|
+
{
|
|
147456
|
+
if (!this.IndexData || !IFrameSplitOperator.IsNonEmptyArray(this.IndexData.Data)) return [];
|
|
147457
|
+
|
|
147458
|
+
var aryData=[];
|
|
147459
|
+
var upperSearch=strSearch.toUpperCase();
|
|
147460
|
+
for(var i=0,j=0;i<this.IndexData.Data.length;++i)
|
|
147461
|
+
{
|
|
147462
|
+
var groupItem=this.IndexData.Data[i];
|
|
147463
|
+
for(j=0;j<groupItem.AryIndex.length;++j)
|
|
147464
|
+
{
|
|
147465
|
+
var item=groupItem.AryIndex[j];
|
|
147466
|
+
if (item.Name.indexOf(strSearch)>=0 || item.Name.indexOf(upperSearch)>=0)
|
|
147467
|
+
{
|
|
147468
|
+
aryData.push(item);
|
|
147469
|
+
}
|
|
147470
|
+
}
|
|
147471
|
+
}
|
|
147472
|
+
|
|
147473
|
+
return aryData;
|
|
147474
|
+
}
|
|
147475
|
+
|
|
147476
|
+
//配色修改
|
|
147477
|
+
this.ReloadResource=function(option)
|
|
147478
|
+
{
|
|
147479
|
+
this.TitleColor=g_JSChartResource.DialogSearchIndex.TitleColor;
|
|
147480
|
+
this.TitleBGColor=g_JSChartResource.DialogSearchIndex.TitleBGColor;
|
|
147481
|
+
this.BGColor=g_JSChartResource.DialogSearchIndex.BGColor;
|
|
147482
|
+
this.BorderColor=g_JSChartResource.DialogSearchIndex.BorderColor;
|
|
147483
|
+
this.IndexNameColor=g_JSChartResource.DialogSearchIndex.IndexNameColor;
|
|
147484
|
+
this.GroupNameColor=g_JSChartResource.DialogSearchIndex.GroupNameColor;
|
|
147485
|
+
this.InputTextColor=g_JSChartResource.DialogSearchIndex.InputTextColor;
|
|
147486
|
+
|
|
147487
|
+
if (!this.DivDialog) return;
|
|
147488
|
+
|
|
147489
|
+
this.UpdateStyle();
|
|
147490
|
+
}
|
|
147491
|
+
|
|
147492
|
+
}
|
|
147493
|
+
|
|
147494
|
+
|
|
147495
|
+
JSDialogSearchIndex.GetDefaultIndexData=function()
|
|
147496
|
+
{
|
|
147497
|
+
var data=
|
|
147498
|
+
{
|
|
147499
|
+
Name:"内置指标分类",
|
|
147500
|
+
Data:
|
|
147501
|
+
[
|
|
147502
|
+
{
|
|
147503
|
+
Group:{ ID:"超买超卖型", Name:"超买超卖型"} ,
|
|
147504
|
+
AryIndex:
|
|
147505
|
+
[
|
|
147506
|
+
{Name:"ADTM 动态买卖气指标", ID:"ADTM", Type:0 }, //Type:0=系统指标 1=自定义通达信脚本 2=api指标
|
|
147507
|
+
{Name:"BIAS 乖离率", ID:"BIAS", Type:0},
|
|
147508
|
+
{Name:"BIAS36 三六乖离", ID:"BIAS36", Type:0 },
|
|
147509
|
+
{Name:"BIAS_QL 乖离率-传统版", ID:"BIAS_QL", Type:0 },
|
|
147510
|
+
{Name:"CCI 商品路径指标",ID:"CCI", Type:0 },
|
|
147511
|
+
{Name:"FSL 分水岭",ID:"FSL", Type:0},
|
|
147512
|
+
{Name:"KDJ 随机指标",ID:"KDJ", Type:0},
|
|
147513
|
+
{Name:"MTM 动量线", ID:"MTM", Type:0},
|
|
147514
|
+
{Name:"OSC 变动速率线", ID:"OSC", Type:0},
|
|
147515
|
+
{Name:"RSI 相对强弱指标", ID:"RSI", Type:0},
|
|
147516
|
+
{Name:"ROC 变动率指标", ID:"ROC", Type:0},
|
|
147517
|
+
{Name:"WR 威廉指标", ID:"WR", Type:0}
|
|
147518
|
+
]
|
|
147519
|
+
},
|
|
147520
|
+
|
|
147521
|
+
{
|
|
147522
|
+
Group:{ ID:"趋势型", Name:"趋势型"},
|
|
147523
|
+
AryIndex:
|
|
147524
|
+
[
|
|
147525
|
+
{Name:"CHO 济坚指数", ID:"CHO", Type:0 },
|
|
147526
|
+
{Name:"DMA 平均差", ID:"DMA", Type:0 },
|
|
147527
|
+
{Name:"DMI 趋向指标", ID:"DMI", Type:0 },
|
|
147528
|
+
{Name:"EMV 简易波动指标", ID:"EMV", Type:0 },
|
|
147529
|
+
{Name:"MACD 平滑异同平均", ID:"MACD", Type:0 },
|
|
147530
|
+
{Name:"TRIX 三重指数平均线", ID:"TRIX", Type:0 },
|
|
147531
|
+
{Name:"UOS 终极指标", ID:"UOS", Type:0 },
|
|
147532
|
+
{Name:"TRIX 三重指数平均线", ID:"TRIX", Type:0 }
|
|
147533
|
+
]
|
|
147534
|
+
},
|
|
147535
|
+
|
|
147536
|
+
{
|
|
147537
|
+
Group:{ ID:"成交量型", Name:"成交量型"},
|
|
147538
|
+
AryIndex:
|
|
147539
|
+
[
|
|
147540
|
+
{Name:"HSL 换手率", ID:"HSL", Type:0},
|
|
147541
|
+
{Name:"OBV 累积能量线", ID:"OBV", Type:0},
|
|
147542
|
+
{Name:"NVI 负成交量", ID:"NVI", Type:0},
|
|
147543
|
+
{Name:"PVI 正成交量", ID:"PVI", Type:0},
|
|
147544
|
+
{Name:"VOL 成交量", ID:"VOL", Type:0}
|
|
147545
|
+
]
|
|
147546
|
+
},
|
|
147547
|
+
{
|
|
147548
|
+
Group:{ ID:"均线型", Name:"均线型"} ,
|
|
147549
|
+
AryIndex:
|
|
147550
|
+
[
|
|
147551
|
+
{Name:"MA 均线", ID:"MA", Type:0},
|
|
147552
|
+
{Name:"BBI 多空线", ID:"BBI", Type:0}
|
|
147553
|
+
]
|
|
147554
|
+
},
|
|
147555
|
+
{
|
|
147556
|
+
Group:{ ID:"路径型", Name:"路径型"} ,
|
|
147557
|
+
AryIndex:
|
|
147558
|
+
[
|
|
147559
|
+
{Name:"BOLL 布林线", ID:"BOLL", Type:0},
|
|
147560
|
+
{Name:"BOLL副图 布林线", ID:"BOLL副图", Type:0},
|
|
147561
|
+
{Name:"MIKE 麦克支撑压力", ID:"MIKE", Type:0},
|
|
147562
|
+
{Name:"ENE 轨道线", ID:"ENE", Type:0}
|
|
147563
|
+
]
|
|
147564
|
+
},
|
|
147565
|
+
{
|
|
147566
|
+
Group:{ ID:"能量型", Name:"能量型"} ,
|
|
147567
|
+
AryIndex:
|
|
147568
|
+
[
|
|
147569
|
+
{Name:"BRAR 情绪指标", ID:"BRAR", Type:0},
|
|
147570
|
+
{Name:"CYR 市场强弱", ID:"CYR", Type:0},
|
|
147571
|
+
{Name:"MASS 梅斯线", ID:"MASS", Type:0},
|
|
147572
|
+
{Name:"PSY 心理线", ID:"PSY", Type:0},
|
|
147573
|
+
{Name:"CR 带状能量线", ID:"CR", Type:0},
|
|
147574
|
+
{Name:"VR 成交量变异率", ID:"VR", Type:0},
|
|
147575
|
+
{Name:"WAD 威廉多空力度线", ID:"WAD", Type:0}
|
|
147576
|
+
]
|
|
147577
|
+
}
|
|
147578
|
+
]
|
|
147579
|
+
|
|
147580
|
+
}
|
|
147581
|
+
|
|
147582
|
+
return data;
|
|
147583
|
+
}
|
|
147584
|
+
|
|
147585
|
+
|
|
147586
|
+
|
|
147587
|
+
|
|
147046
147588
|
///////////////////////////////////////////////////////////////////////////////////
|
|
147047
147589
|
// 工作线程计算指标示例
|
|
147048
147590
|
//
|
|
@@ -147164,7 +147706,7 @@ function HQChartScriptWorker()
|
|
|
147164
147706
|
|
|
147165
147707
|
|
|
147166
147708
|
|
|
147167
|
-
var HQCHART_VERSION="1.1.
|
|
147709
|
+
var HQCHART_VERSION="1.1.14071";
|
|
147168
147710
|
|
|
147169
147711
|
function PrintHQChartVersion()
|
|
147170
147712
|
{
|