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
|
@@ -3980,7 +3980,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
3980
3980
|
|
|
3981
3981
|
//改参数div
|
|
3982
3982
|
this.ModifyIndexDialog=new ModifyIndexDialog(divElement);
|
|
3983
|
-
this.ChangeIndexDialog=new ChangeIndexDialog(divElement);
|
|
3984
3983
|
|
|
3985
3984
|
//额外的画布
|
|
3986
3985
|
this.MapExtraCanvasElement=new Map(); //key=画布名字, value={ Element:, Canvas:}
|
|
@@ -4216,7 +4215,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4216
4215
|
|
|
4217
4216
|
//创建改参数div
|
|
4218
4217
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
4219
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
4220
4218
|
|
|
4221
4219
|
var pixelRatio=GetDevicePixelRatio();
|
|
4222
4220
|
|
|
@@ -4669,7 +4667,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4669
4667
|
|
|
4670
4668
|
//创建改参数div
|
|
4671
4669
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
4672
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
4673
4670
|
|
|
4674
4671
|
//右键菜单
|
|
4675
4672
|
if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
|
|
@@ -4772,7 +4769,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4772
4769
|
if (option.NetworkFilter) chart.NetworkFilter=option.NetworkFilter;
|
|
4773
4770
|
|
|
4774
4771
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
4775
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
4776
4772
|
|
|
4777
4773
|
var pixelRatio=GetDevicePixelRatio();
|
|
4778
4774
|
|
|
@@ -5354,7 +5350,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5354
5350
|
|
|
5355
5351
|
//创建改参数div
|
|
5356
5352
|
chart.ModifyIndexDialog=this.ModifyIndexDialog;
|
|
5357
|
-
chart.ChangeIndexDialog=this.ChangeIndexDialog;
|
|
5358
5353
|
|
|
5359
5354
|
if (option.ScriptError) chart.ScriptErrorCallback=option.ScriptError;
|
|
5360
5355
|
|
|
@@ -5651,9 +5646,10 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5651
5646
|
chart.InitalFloatTooltip(option.FloatTooltip);
|
|
5652
5647
|
|
|
5653
5648
|
if (option.SelectRectDialog && option.SelectRectDialog.Enable)
|
|
5654
|
-
{
|
|
5655
5649
|
chart.InitalSelectRectDialog(option.SelectRectDialog);
|
|
5656
|
-
|
|
5650
|
+
|
|
5651
|
+
if (option.SearchIndexDialog && option.SearchIndexDialog.Enable)
|
|
5652
|
+
chart.InitalSearchIndexDialog(option.SearchIndexDialog);
|
|
5657
5653
|
|
|
5658
5654
|
//注册事件
|
|
5659
5655
|
if (option.EventCallback)
|
|
@@ -6368,6 +6364,12 @@ JSChart.GetScrollPosition=function()
|
|
|
6368
6364
|
return GetScrollPosition();
|
|
6369
6365
|
}
|
|
6370
6366
|
|
|
6367
|
+
//品种小数位数
|
|
6368
|
+
JSChart.GetfloatPrecision=function(symbol)
|
|
6369
|
+
{
|
|
6370
|
+
return GetfloatPrecision(symbol);
|
|
6371
|
+
}
|
|
6372
|
+
|
|
6371
6373
|
|
|
6372
6374
|
|
|
6373
6375
|
|
|
@@ -6566,6 +6568,7 @@ var JSCHART_EVENT_ID=
|
|
|
6566
6568
|
ON_CHANGE_KLINE_RIGHT:160, //切换复权
|
|
6567
6569
|
|
|
6568
6570
|
ON_FORMAT_KLINE_FLOAT_TOOLTIP:161, //格式化k线浮动框显示文字
|
|
6571
|
+
ON_FORMAT_KLINE_INFO_FLOAT_TOOLTIP:162, //格式化信息地雷显示文字
|
|
6569
6572
|
}
|
|
6570
6573
|
|
|
6571
6574
|
var JSCHART_OPERATOR_ID=
|
|
@@ -6970,6 +6973,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
6970
6973
|
this.DialogTooltip; //tooltip信息
|
|
6971
6974
|
this.DialogSelectRect; //区间统计
|
|
6972
6975
|
this.FloatTooltip; //浮动tooltip信息
|
|
6976
|
+
this.DialogSearchIndex; //指标搜索
|
|
6973
6977
|
|
|
6974
6978
|
|
|
6975
6979
|
this.ClearStockCache=function()
|
|
@@ -7030,6 +7034,34 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7030
7034
|
this.DialogSelectRect.Create();
|
|
7031
7035
|
}
|
|
7032
7036
|
|
|
7037
|
+
this.InitalSearchIndexDialog=function(option)
|
|
7038
|
+
{
|
|
7039
|
+
if (this.DialogSearchIndex) return;
|
|
7040
|
+
|
|
7041
|
+
this.DialogSearchIndex=new JSDialogSearchIndex();
|
|
7042
|
+
this.DialogSearchIndex.Inital(this, option);
|
|
7043
|
+
this.DialogSearchIndex.Create();
|
|
7044
|
+
}
|
|
7045
|
+
|
|
7046
|
+
this.ShowChangeIndexDialog=function(data)
|
|
7047
|
+
{
|
|
7048
|
+
if (!data) return;
|
|
7049
|
+
if (!this.DialogSearchIndex) return;
|
|
7050
|
+
|
|
7051
|
+
data.Title=`切换指标 [窗口${data.WindowIndex+1}]`;
|
|
7052
|
+
this.DialogSearchIndex.SetOpData(data);
|
|
7053
|
+
this.DialogSearchIndex.Show();
|
|
7054
|
+
}
|
|
7055
|
+
|
|
7056
|
+
this.ShowAddOverlayIndexDialog=function(data)
|
|
7057
|
+
{
|
|
7058
|
+
if (!data) return;
|
|
7059
|
+
if (!this.DialogSearchIndex) return;
|
|
7060
|
+
|
|
7061
|
+
data.Title=`添加叠加指标 [窗口${data.WindowIndex+1}]`;
|
|
7062
|
+
this.DialogSearchIndex.SetOpData(data);
|
|
7063
|
+
this.DialogSearchIndex.Show();
|
|
7064
|
+
}
|
|
7033
7065
|
|
|
7034
7066
|
|
|
7035
7067
|
this.DrawSelectRectDialog=function()
|
|
@@ -7128,6 +7160,14 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7128
7160
|
this.FloatTooltip=null;
|
|
7129
7161
|
}
|
|
7130
7162
|
|
|
7163
|
+
this.DestroySearchIndexDialog=function()
|
|
7164
|
+
{
|
|
7165
|
+
if (!this.DialogSearchIndex) return;
|
|
7166
|
+
|
|
7167
|
+
this.DialogSearchIndex.Destroy();
|
|
7168
|
+
this.DialogSearchIndex=null;
|
|
7169
|
+
}
|
|
7170
|
+
|
|
7131
7171
|
|
|
7132
7172
|
|
|
7133
7173
|
//obj={ Element:, Canvas: }
|
|
@@ -7181,6 +7221,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
7181
7221
|
this.StopAutoUpdate();
|
|
7182
7222
|
this.DestroyTooltipDialog();
|
|
7183
7223
|
this.DestroyFloatTooltip();
|
|
7224
|
+
this.DestroySearchIndexDialog();
|
|
7184
7225
|
}
|
|
7185
7226
|
|
|
7186
7227
|
this.ChartDestory=this.ChartDestroy; //老版本写错了,需要兼容下
|
|
@@ -10954,7 +10995,25 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
10954
10995
|
|
|
10955
10996
|
this.DrawFloatTooltip=function(point,toolTip)
|
|
10956
10997
|
{
|
|
10998
|
+
if (!this.FloatTooltip) return;
|
|
10999
|
+
|
|
11000
|
+
this.UpdateFloatTooltip(point, toolTip)
|
|
11001
|
+
}
|
|
11002
|
+
|
|
11003
|
+
this.UpdateFloatTooltip=function(point, toolTip)
|
|
11004
|
+
{
|
|
11005
|
+
if (!this.FloatTooltip) return;
|
|
10957
11006
|
|
|
11007
|
+
var sendData=
|
|
11008
|
+
{
|
|
11009
|
+
Tooltip:toolTip,
|
|
11010
|
+
Point:point,
|
|
11011
|
+
Symbol:this.Symbol,
|
|
11012
|
+
Name:this.Name,
|
|
11013
|
+
DataType:1,
|
|
11014
|
+
};
|
|
11015
|
+
|
|
11016
|
+
this.FloatTooltip.Update(sendData);
|
|
10958
11017
|
}
|
|
10959
11018
|
|
|
10960
11019
|
//更新实时行情到浮动tooltip
|
|
@@ -11059,6 +11118,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11059
11118
|
}
|
|
11060
11119
|
else if (toolTip.Type==2) //指标信息
|
|
11061
11120
|
{
|
|
11121
|
+
if (this.FloatTooltip)
|
|
11122
|
+
{
|
|
11123
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11124
|
+
bHideFloatToolip=false;
|
|
11125
|
+
return;
|
|
11126
|
+
}
|
|
11127
|
+
|
|
11062
11128
|
var left = x;
|
|
11063
11129
|
var top = y;
|
|
11064
11130
|
|
|
@@ -11080,6 +11146,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11080
11146
|
}
|
|
11081
11147
|
else if (toolTip.Type==3) //分时图异动信息
|
|
11082
11148
|
{
|
|
11149
|
+
if (this.FloatTooltip)
|
|
11150
|
+
{
|
|
11151
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11152
|
+
bHideFloatToolip=false;
|
|
11153
|
+
return;
|
|
11154
|
+
}
|
|
11155
|
+
|
|
11083
11156
|
var left = x;
|
|
11084
11157
|
var top = y;
|
|
11085
11158
|
|
|
@@ -11099,8 +11172,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11099
11172
|
this.Tooltip.innerHTML=format.Text;;
|
|
11100
11173
|
this.Tooltip.style.display = "block";
|
|
11101
11174
|
}
|
|
11102
|
-
else if (toolTip.Type==4) //
|
|
11175
|
+
else if (toolTip.Type==4) //ChartMultiSVGIconV2 图标信息
|
|
11103
11176
|
{
|
|
11177
|
+
if (this.FloatTooltip)
|
|
11178
|
+
{
|
|
11179
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11180
|
+
bHideFloatToolip=false;
|
|
11181
|
+
return;
|
|
11182
|
+
}
|
|
11183
|
+
|
|
11104
11184
|
var left = x;
|
|
11105
11185
|
var top = y;
|
|
11106
11186
|
|
|
@@ -11122,6 +11202,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11122
11202
|
}
|
|
11123
11203
|
else if (toolTip.Type==5)
|
|
11124
11204
|
{
|
|
11205
|
+
if (this.FloatTooltip)
|
|
11206
|
+
{
|
|
11207
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11208
|
+
bHideFloatToolip=false;
|
|
11209
|
+
return;
|
|
11210
|
+
}
|
|
11211
|
+
|
|
11125
11212
|
var left = x;
|
|
11126
11213
|
var top = y;
|
|
11127
11214
|
|
|
@@ -11144,6 +11231,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11144
11231
|
}
|
|
11145
11232
|
else if (toolTip.Type==6) //散点图
|
|
11146
11233
|
{
|
|
11234
|
+
if (this.FloatTooltip)
|
|
11235
|
+
{
|
|
11236
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11237
|
+
bHideFloatToolip=false;
|
|
11238
|
+
return;
|
|
11239
|
+
}
|
|
11240
|
+
|
|
11147
11241
|
var left = x;
|
|
11148
11242
|
var top = y;
|
|
11149
11243
|
|
|
@@ -11166,6 +11260,13 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11166
11260
|
}
|
|
11167
11261
|
else if (toolTip.Type==7) //ChartDrawSVG
|
|
11168
11262
|
{
|
|
11263
|
+
if (this.FloatTooltip)
|
|
11264
|
+
{
|
|
11265
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11266
|
+
bHideFloatToolip=false;
|
|
11267
|
+
return;
|
|
11268
|
+
}
|
|
11269
|
+
|
|
11169
11270
|
var left = x;
|
|
11170
11271
|
var top = y;
|
|
11171
11272
|
|
|
@@ -11186,6 +11287,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
11186
11287
|
this.Tooltip.innerHTML=format.Text;
|
|
11187
11288
|
this.Tooltip.style.display = "block";
|
|
11188
11289
|
}
|
|
11290
|
+
else if (toolTip.Type==8) //ChartDrawSVG 新版本
|
|
11291
|
+
{
|
|
11292
|
+
if (this.FloatTooltip)
|
|
11293
|
+
{
|
|
11294
|
+
this.DrawFloatTooltip({X:x, Y:y, YMove:20/pixelTatio}, toolTip);
|
|
11295
|
+
bHideFloatToolip=false;
|
|
11296
|
+
return;
|
|
11297
|
+
}
|
|
11298
|
+
}
|
|
11189
11299
|
|
|
11190
11300
|
|
|
11191
11301
|
if (bHideFloatToolip) this.HideFloatTooltip();
|
|
@@ -12094,6 +12204,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
|
|
|
12094
12204
|
if (this.DialogTooltip) this.DialogTooltip.ReloadResource(option);
|
|
12095
12205
|
if (this.FloatTooltip) this.FloatTooltip.ReloadResource(option);
|
|
12096
12206
|
if (this.DialogSelectRect) this.DialogSelectRect.ReloadResource(option);
|
|
12207
|
+
if (this.DialogSearchIndex) this.DialogSearchIndex.ReloadResource(option);
|
|
12097
12208
|
}
|
|
12098
12209
|
|
|
12099
12210
|
this.ReloadBorder=function(option) //根据页面缩放调整对应边框的尺长
|
|
@@ -14429,7 +14540,7 @@ function CoordinateInfo()
|
|
|
14429
14540
|
this.Font=g_JSChartResource.FrameSplitTextFont; //字体
|
|
14430
14541
|
this.LineColor=g_JSChartResource.FrameSplitPen; //线段颜色
|
|
14431
14542
|
this.LineDash=null; //当线段类型==2时 可以设置虚线样式
|
|
14432
|
-
this.LineType=1; //线段类型 -1=不画线段 2=虚线, 8,9=集合竞价坐标
|
|
14543
|
+
this.LineType=1; //线段类型 -1=不画线段 0=虚线 1,2=虚线, 3=短线 8,9=集合竞价坐标
|
|
14433
14544
|
this.LineWidth; //线段宽度
|
|
14434
14545
|
this.ExtendLine; //延长线长度[ ] { Width:长度 } [0]=左 [1]=右 实例: [null, { Width: 50}];
|
|
14435
14546
|
this.ExtendData; //扩展属性
|
|
@@ -17439,7 +17550,7 @@ function AverageWidthFrame()
|
|
|
17439
17550
|
{
|
|
17440
17551
|
if (lineType==-1) return;
|
|
17441
17552
|
|
|
17442
|
-
if (lineType==0)
|
|
17553
|
+
if (lineType==0) //直线
|
|
17443
17554
|
{
|
|
17444
17555
|
var pixelRatio=GetDevicePixelRatio();
|
|
17445
17556
|
this.Canvas.strokeStyle=color;
|
|
@@ -17485,7 +17596,7 @@ function AverageWidthFrame()
|
|
|
17485
17596
|
}
|
|
17486
17597
|
this.Canvas.stroke();
|
|
17487
17598
|
}
|
|
17488
|
-
else
|
|
17599
|
+
else if (lineType==1 || lineType==2) //虚线
|
|
17489
17600
|
{
|
|
17490
17601
|
this.DrawDotLine(left,right,y, color, option);
|
|
17491
17602
|
}
|
|
@@ -17727,7 +17838,6 @@ function MinuteFrame()
|
|
|
17727
17838
|
this.OverlayIndex=g_JSChartResource.MinuteToolbar.OverlayIndex; //是否显示叠加指标
|
|
17728
17839
|
|
|
17729
17840
|
this.ModifyIndexEvent; //改参数 点击事件
|
|
17730
|
-
this.ChangeIndexEvent; //换指标 点击事件
|
|
17731
17841
|
this.ToolbarRect=null; //保存工具条的位置
|
|
17732
17842
|
this.IsShowPositionTitle=false; //是否显示持仓标题
|
|
17733
17843
|
|
|
@@ -20157,7 +20267,6 @@ function KLineFrame()
|
|
|
20157
20267
|
this.SelBorderColor=g_JSChartResource.SelFrameBorderColor;
|
|
20158
20268
|
|
|
20159
20269
|
this.ModifyIndexEvent; //改参数 点击事件
|
|
20160
|
-
this.ChangeIndexEvent; //换指标 点击事件
|
|
20161
20270
|
this.ToolbarRect=null; //保存工具条的位置
|
|
20162
20271
|
this.ReDrawToolbar=false;
|
|
20163
20272
|
|
|
@@ -43866,203 +43975,6 @@ function ChartMultiText()
|
|
|
43866
43975
|
}
|
|
43867
43976
|
}
|
|
43868
43977
|
|
|
43869
|
-
// 图标集合 支持横屏
|
|
43870
|
-
function ChartMultiSVGIcon()
|
|
43871
|
-
{
|
|
43872
|
-
this.newMethod=IChartPainting; //派生
|
|
43873
|
-
this.newMethod();
|
|
43874
|
-
delete this.newMethod;
|
|
43875
|
-
|
|
43876
|
-
this.ClassName="ChartMultiSVGIcon";
|
|
43877
|
-
this.Icon; //[ {Index:, Value:, Symbol:, Color:, Baseline:, Line:{ Color:, Dash:[虚线点], KData:"H/L", Offset:[5,10], Width:线粗细 } } ]
|
|
43878
|
-
this.IconSize={ Max: g_JSChartResource.DRAWICON.Icon.MaxSize, Min:g_JSChartResource.DRAWICON.Icon.MinSize , //图标的最大最小值
|
|
43879
|
-
Zoom:{ Type:g_JSChartResource.DRAWICON.Icon.Zoom.Type , Value:g_JSChartResource.DRAWICON.Icon.Zoom.Value } //放大倍数
|
|
43880
|
-
};
|
|
43881
|
-
this.Family;
|
|
43882
|
-
this.Color=g_JSChartResource.DefaultTextColor;
|
|
43883
|
-
this.IsHScreen=false;
|
|
43884
|
-
this.IconRect=[]; //0=序号,1=区域
|
|
43885
|
-
|
|
43886
|
-
this.Draw=function()
|
|
43887
|
-
{
|
|
43888
|
-
this.IconRect=[];
|
|
43889
|
-
if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
|
|
43890
|
-
if (this.IsShowIndexTitleOnly()) return;
|
|
43891
|
-
if (this.IsHideScriptIndex()) return;
|
|
43892
|
-
if (!this.Data || this.Data.length<=0) return;
|
|
43893
|
-
if (!this.Family || !this.Icon) return;
|
|
43894
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.Icon)) return;
|
|
43895
|
-
|
|
43896
|
-
this.IsHScreen=(this.ChartFrame.IsHScreen===true);
|
|
43897
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
43898
|
-
var offset=this.Data.DataOffset;
|
|
43899
|
-
this.DataWidth=this.ChartFrame.DataWidth;
|
|
43900
|
-
this.DistanceWidth=this.ChartFrame.DistanceWidth;
|
|
43901
|
-
|
|
43902
|
-
var border=this.GetBorder();
|
|
43903
|
-
if (this.IsHScreen)
|
|
43904
|
-
{
|
|
43905
|
-
var left=border.TopEx;
|
|
43906
|
-
var right=border.BottomEx;
|
|
43907
|
-
}
|
|
43908
|
-
else
|
|
43909
|
-
{
|
|
43910
|
-
var left=border.LeftEx;
|
|
43911
|
-
var right=border.RightEx;
|
|
43912
|
-
}
|
|
43913
|
-
|
|
43914
|
-
var fontSize=this.GetDynamicIconSize(this.DataWidth,this.DistanceWidth,this.IconSize.Max,this.IconSize.Min,this.IconSize.Zoom);
|
|
43915
|
-
this.Canvas.font=fontSize+'px '+this.Family;
|
|
43916
|
-
|
|
43917
|
-
for(var i=0; i<this.Icon.length; ++i)
|
|
43918
|
-
{
|
|
43919
|
-
var item=this.Icon[i];
|
|
43920
|
-
if (!IFrameSplitOperator.IsNumber(item.Index)) continue;
|
|
43921
|
-
|
|
43922
|
-
var index=item.Index-offset;
|
|
43923
|
-
if (index>=0 && index<xPointCount)
|
|
43924
|
-
{
|
|
43925
|
-
var x=this.ChartFrame.GetXFromIndex(index);
|
|
43926
|
-
var y=this.ChartFrame.GetYFromData(item.Value);
|
|
43927
|
-
|
|
43928
|
-
if (item.Color) this.Canvas.fillStyle = item.Color;
|
|
43929
|
-
else this.Canvas.fillStyle = this.Color;
|
|
43930
|
-
|
|
43931
|
-
var textWidth=this.Canvas.measureText(item.Symbol).width;
|
|
43932
|
-
this.Canvas.textAlign='center';
|
|
43933
|
-
var rtIcon=new Rect(x-fontSize/2,y-fontSize/2,fontSize,fontSize);
|
|
43934
|
-
if (x+textWidth/2>=right)
|
|
43935
|
-
{
|
|
43936
|
-
this.Canvas.textAlign='right';
|
|
43937
|
-
x+=this.DataWidth/2;
|
|
43938
|
-
rtIcon.X=x-fontSize;
|
|
43939
|
-
}
|
|
43940
|
-
else if (x-textWidth/2<left)
|
|
43941
|
-
{
|
|
43942
|
-
this.Canvas.textAlign = 'left';
|
|
43943
|
-
x-=this.DataWidth/2;
|
|
43944
|
-
rtIcon.X=x;
|
|
43945
|
-
}
|
|
43946
|
-
|
|
43947
|
-
if (item.Baseline==1)
|
|
43948
|
-
{
|
|
43949
|
-
this.Canvas.textBaseline='top';
|
|
43950
|
-
rtIcon.Y=y;
|
|
43951
|
-
}
|
|
43952
|
-
else if (item.Baseline==2)
|
|
43953
|
-
{
|
|
43954
|
-
this.Canvas.textBaseline='bottom';
|
|
43955
|
-
rtIcon.Y=y-fontSize;
|
|
43956
|
-
}
|
|
43957
|
-
else
|
|
43958
|
-
{
|
|
43959
|
-
this.Canvas.textBaseline = 'middle';
|
|
43960
|
-
rtIcon.Y=y-fontSize/2;
|
|
43961
|
-
}
|
|
43962
|
-
|
|
43963
|
-
if (this.IsHScreen)
|
|
43964
|
-
{
|
|
43965
|
-
this.Canvas.save();
|
|
43966
|
-
this.Canvas.translate(y, x);
|
|
43967
|
-
this.Canvas.rotate(90 * Math.PI / 180);
|
|
43968
|
-
this.Canvas.fillText(item.Symbol,0,0);
|
|
43969
|
-
this.Canvas.restore();
|
|
43970
|
-
}
|
|
43971
|
-
else
|
|
43972
|
-
{
|
|
43973
|
-
if (IFrameSplitOperator.IsNumber(item.YMove)) y+=item.YMove;
|
|
43974
|
-
this.Canvas.fillText(item.Symbol, x, y);
|
|
43975
|
-
if (item.Text) this.IconRect.push({ Index:i, Rect:rtIcon , Item:item });
|
|
43976
|
-
}
|
|
43977
|
-
|
|
43978
|
-
if (item.Line)
|
|
43979
|
-
{
|
|
43980
|
-
var kItem=this.Data.Data[item.Index];
|
|
43981
|
-
var price=item.Line.KData=="H"? kItem.High:kItem.Low;
|
|
43982
|
-
var yPrice=this.ChartFrame.GetYFromData(price);
|
|
43983
|
-
var yText=y;
|
|
43984
|
-
if (Array.isArray(item.Line.Offset) && item.Line.Offset.length==2)
|
|
43985
|
-
{
|
|
43986
|
-
if (yText>yPrice) //文字在下方
|
|
43987
|
-
{
|
|
43988
|
-
yText-=item.Line.Offset[1];
|
|
43989
|
-
yPrice+=item.Line.Offset[0]
|
|
43990
|
-
}
|
|
43991
|
-
else if (yText<yPrice)
|
|
43992
|
-
{
|
|
43993
|
-
yText+=item.Line.Offset[1];
|
|
43994
|
-
yPrice-=item.Line.Offset[0]
|
|
43995
|
-
}
|
|
43996
|
-
}
|
|
43997
|
-
this.Canvas.save();
|
|
43998
|
-
if (item.Line.Dash) this.Canvas.setLineDash(item.Line.Dash); //虚线
|
|
43999
|
-
if (item.Line.Width>0) this.Canvas.lineWidth=item.Line.Width; //线宽
|
|
44000
|
-
this.Canvas.strokeStyle = item.Line.Color;
|
|
44001
|
-
this.Canvas.beginPath();
|
|
44002
|
-
if (this.IsHScreen)
|
|
44003
|
-
{
|
|
44004
|
-
this.Canvas.moveTo(yText, ToFixedPoint(x));
|
|
44005
|
-
this.Canvas.lineTo(yPrice,ToFixedPoint(x));
|
|
44006
|
-
}
|
|
44007
|
-
else
|
|
44008
|
-
{
|
|
44009
|
-
this.Canvas.moveTo(ToFixedPoint(x),yText);
|
|
44010
|
-
this.Canvas.lineTo(ToFixedPoint(x),yPrice);
|
|
44011
|
-
}
|
|
44012
|
-
|
|
44013
|
-
this.Canvas.stroke();
|
|
44014
|
-
this.Canvas.restore();
|
|
44015
|
-
}
|
|
44016
|
-
}
|
|
44017
|
-
}
|
|
44018
|
-
}
|
|
44019
|
-
|
|
44020
|
-
this.GetTooltipData=function(x,y,tooltip)
|
|
44021
|
-
{
|
|
44022
|
-
if (!IFrameSplitOperator.IsNonEmptyArray(this.IconRect)) return false;
|
|
44023
|
-
for(var i=0; i<this.IconRect.length; ++i)
|
|
44024
|
-
{
|
|
44025
|
-
var item=this.IconRect[i];
|
|
44026
|
-
if (!item.Rect) continue;
|
|
44027
|
-
var rect=item.Rect;
|
|
44028
|
-
this.Canvas.beginPath();
|
|
44029
|
-
this.Canvas.rect(rect.X,rect.Y,rect.Width,rect.Height);
|
|
44030
|
-
if (this.Canvas.isPointInPath(x,y))
|
|
44031
|
-
{
|
|
44032
|
-
JSConsole.Chart.Log('[ChartMultiSVGIcon::GetTooltipData] icon ', item);
|
|
44033
|
-
tooltip.Data=item;
|
|
44034
|
-
tooltip.ChartPaint=this;
|
|
44035
|
-
tooltip.Type=4; //指标
|
|
44036
|
-
return true;
|
|
44037
|
-
}
|
|
44038
|
-
}
|
|
44039
|
-
|
|
44040
|
-
return false;
|
|
44041
|
-
}
|
|
44042
|
-
|
|
44043
|
-
this.GetMaxMin=function()
|
|
44044
|
-
{
|
|
44045
|
-
var range={ Min:null, Max:null };
|
|
44046
|
-
var xPointCount=this.ChartFrame.XPointCount;
|
|
44047
|
-
var start=this.Data.DataOffset;
|
|
44048
|
-
var end=start+xPointCount;
|
|
44049
|
-
|
|
44050
|
-
for(var i in this.Icon)
|
|
44051
|
-
{
|
|
44052
|
-
var item=this.Icon[i];
|
|
44053
|
-
if (item.Index>=start && item.Index<end)
|
|
44054
|
-
{
|
|
44055
|
-
if (range.Max==null) range.Max=item.Value;
|
|
44056
|
-
else if (range.Max<item.Value) range.Max=item.Value;
|
|
44057
|
-
if (range.Min==null) range.Min=item.Value;
|
|
44058
|
-
else if (range.Min>item.Value) range.Min=item.Value;
|
|
44059
|
-
}
|
|
44060
|
-
}
|
|
44061
|
-
|
|
44062
|
-
return range;
|
|
44063
|
-
}
|
|
44064
|
-
}
|
|
44065
|
-
|
|
44066
43978
|
|
|
44067
43979
|
//图标集合(2.0) 支持横屏
|
|
44068
43980
|
function ChartMultiSVGIconV2()
|
|
@@ -44274,6 +44186,7 @@ function ChartMultiSVGIconV2()
|
|
|
44274
44186
|
if (IFrameSplitOperator.IsNumber(item.YMove)) y+=item.YMove;
|
|
44275
44187
|
this.Canvas.fillText(item.Symbol, x, y);
|
|
44276
44188
|
if (item.Text) this.IconRect.push({ Rect:rtIcon , Item:item, KItem:kItem });
|
|
44189
|
+
else if (IFrameSplitOperator.IsNonEmptyArray(item.AryText)) this.IconRect.push({ Rect:rtIcon , Item:item, KItem:kItem });
|
|
44277
44190
|
}
|
|
44278
44191
|
|
|
44279
44192
|
if (item.Line)
|
|
@@ -45023,6 +44936,7 @@ function ChartDrawSVG()
|
|
|
45023
44936
|
tooltip.Data={ Rect:item.Rect, Item:data, Index:item.Index };
|
|
45024
44937
|
tooltip.ChartPaint=this;
|
|
45025
44938
|
tooltip.Type=7; //drawsvg
|
|
44939
|
+
if (data.Tooltip && data.Tooltip.Ver==2.0) tooltip.Type=8; //drawsvg 新本版
|
|
45026
44940
|
return true;
|
|
45027
44941
|
}
|
|
45028
44942
|
}
|
|
@@ -73313,6 +73227,19 @@ function JSChartResource()
|
|
|
73313
73227
|
}
|
|
73314
73228
|
};
|
|
73315
73229
|
|
|
73230
|
+
//指标搜索
|
|
73231
|
+
this.DialogSearchIndex=
|
|
73232
|
+
{
|
|
73233
|
+
BGColor:'rgb(250,250,250)', //背景色
|
|
73234
|
+
BorderColor:'rgb(20,20,20)', //边框颜色
|
|
73235
|
+
TitleColor:'rgb(250,250,250)', //标题颜色
|
|
73236
|
+
TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
|
|
73237
|
+
|
|
73238
|
+
IndexNameColor:"rgb(0,0,0)", //数值名称
|
|
73239
|
+
GroupNameColor:"rgb(0,0,0)",
|
|
73240
|
+
InputTextColor:"rgb(0,0,0)"
|
|
73241
|
+
};
|
|
73242
|
+
|
|
73316
73243
|
//弹幕
|
|
73317
73244
|
this.Barrage= {
|
|
73318
73245
|
Font:16*GetDevicePixelRatio() +'px 微软雅黑', //字体
|
|
@@ -74378,6 +74305,20 @@ function JSChartResource()
|
|
|
74378
74305
|
}
|
|
74379
74306
|
}
|
|
74380
74307
|
|
|
74308
|
+
if (style.DialogSearchIndex)
|
|
74309
|
+
{
|
|
74310
|
+
var item=style.DialogSearchIndex;
|
|
74311
|
+
|
|
74312
|
+
if (item.BGColor) this.DialogSearchIndex.BGColor=item.BGColor;
|
|
74313
|
+
if (item.BorderColor) this.DialogSearchIndex.BorderColor=item.BorderColor;
|
|
74314
|
+
if (item.TitleColor) this.DialogSearchIndex.TitleColor=item.TitleColor;
|
|
74315
|
+
if (item.TitleBGColor) this.DialogSearchIndex.TitleBGColor=item.TitleBGColor;
|
|
74316
|
+
|
|
74317
|
+
if (item.IndexNameColor) this.DialogSearchIndex.IndexNameColor=item.IndexNameColor;
|
|
74318
|
+
if (item.GroupNameColor) this.DialogSearchIndex.GroupNameColor=item.GroupNameColor;
|
|
74319
|
+
if (item.InputTextColor) this.DialogSearchIndex.InputTextColor=item.InputTextColor;
|
|
74320
|
+
}
|
|
74321
|
+
|
|
74381
74322
|
if (style.MinuteInfo)
|
|
74382
74323
|
{
|
|
74383
74324
|
var item=style.MinuteInfo;
|
|
@@ -77462,7 +77403,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77462
77403
|
frame.GlobalOption=this.GlobalOption;
|
|
77463
77404
|
|
|
77464
77405
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
77465
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
77466
77406
|
|
|
77467
77407
|
frame.HorizontalMax=20;
|
|
77468
77408
|
frame.HorizontalMin=10;
|
|
@@ -77547,7 +77487,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
77547
77487
|
frame.GlobalOption=this.GlobalOption;
|
|
77548
77488
|
|
|
77549
77489
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
77550
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
77551
77490
|
|
|
77552
77491
|
frame.HorizontalMax=20;
|
|
77553
77492
|
frame.HorizontalMin=10;
|
|
@@ -83545,9 +83484,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
83545
83484
|
else if (button.ID==JSCHART_BUTTON_ID.CHANGE_INDEX)
|
|
83546
83485
|
{
|
|
83547
83486
|
var frame=button.Frame;
|
|
83487
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:1 };
|
|
83488
|
+
this.ShowChangeIndexDialog(sendData);
|
|
83489
|
+
/*
|
|
83548
83490
|
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:false };
|
|
83549
83491
|
if (frame.ChangeIndexEvent)
|
|
83550
83492
|
frame.ChangeIndexEvent(e);
|
|
83493
|
+
*/
|
|
83551
83494
|
}
|
|
83552
83495
|
else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
|
|
83553
83496
|
{
|
|
@@ -83559,9 +83502,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
83559
83502
|
else if (button.ID==JSCHART_BUTTON_ID.OVERLAY_INDEX)
|
|
83560
83503
|
{
|
|
83561
83504
|
var frame=button.Frame;
|
|
83505
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:2 };
|
|
83506
|
+
this.ShowAddOverlayIndexDialog(sendData);
|
|
83507
|
+
/*
|
|
83562
83508
|
e.data={ Chart:this, Identify:frame.Identify, IsOverlay:true };
|
|
83563
83509
|
if (frame.ChangeIndexEvent)
|
|
83564
83510
|
frame.ChangeIndexEvent(e);
|
|
83511
|
+
*/
|
|
83565
83512
|
}
|
|
83566
83513
|
else if (button.ID==JSCHART_BUTTON_ID.MAX_MIN_WINDOW)
|
|
83567
83514
|
{
|
|
@@ -83812,29 +83759,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
83812
83759
|
this.DialogSelectRect.Update(sendData);
|
|
83813
83760
|
}
|
|
83814
83761
|
|
|
83815
|
-
this.DrawFloatTooltip=function(point,toolTip)
|
|
83816
|
-
{
|
|
83817
|
-
if (!this.FloatTooltip) return;
|
|
83818
|
-
|
|
83819
|
-
this.UpdateFloatTooltip(point, toolTip)
|
|
83820
|
-
}
|
|
83821
|
-
|
|
83822
|
-
this.UpdateFloatTooltip=function(point, toolTip)
|
|
83823
|
-
{
|
|
83824
|
-
if (!this.FloatTooltip) return;
|
|
83825
|
-
|
|
83826
|
-
var sendData=
|
|
83827
|
-
{
|
|
83828
|
-
Tooltip:toolTip,
|
|
83829
|
-
Point:point,
|
|
83830
|
-
Symbol:this.Symbol,
|
|
83831
|
-
Name:this.Name,
|
|
83832
|
-
DataType:1,
|
|
83833
|
-
};
|
|
83834
|
-
|
|
83835
|
-
this.FloatTooltip.Update(sendData);
|
|
83836
|
-
}
|
|
83837
|
-
|
|
83838
83762
|
this.UpdateHQFloatTooltip=function(kData)
|
|
83839
83763
|
{
|
|
83840
83764
|
if (!this.FloatTooltip) return;
|
|
@@ -84397,9 +84321,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84397
84321
|
else if (button.ID==JSCHART_BUTTON_ID.CHANGE_INDEX)
|
|
84398
84322
|
{
|
|
84399
84323
|
var frame=button.Frame;
|
|
84400
|
-
|
|
84401
|
-
|
|
84402
|
-
frame.ChangeIndexEvent(e);
|
|
84324
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:1 };
|
|
84325
|
+
this.ShowChangeIndexDialog(sendData);
|
|
84403
84326
|
}
|
|
84404
84327
|
else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
|
|
84405
84328
|
{
|
|
@@ -84411,9 +84334,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
84411
84334
|
else if (button.ID==JSCHART_BUTTON_ID.OVERLAY_INDEX)
|
|
84412
84335
|
{
|
|
84413
84336
|
var frame=button.Frame;
|
|
84414
|
-
|
|
84415
|
-
|
|
84416
|
-
frame.ChangeIndexEvent(e);
|
|
84337
|
+
var sendData={ e:e, WindowIndex:frame.Identify, OpType:2 };
|
|
84338
|
+
this.ShowAddOverlayIndexDialog(sendData);
|
|
84417
84339
|
}
|
|
84418
84340
|
else if (button.ID==JSCHART_BUTTON_ID.MAX_MIN_WINDOW)
|
|
84419
84341
|
{
|
|
@@ -86175,7 +86097,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86175
86097
|
if (i>=2)
|
|
86176
86098
|
{
|
|
86177
86099
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
86178
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
86179
86100
|
}
|
|
86180
86101
|
|
|
86181
86102
|
var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
|
|
@@ -86267,7 +86188,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
|
|
|
86267
86188
|
if (id>=2)
|
|
86268
86189
|
{
|
|
86269
86190
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
86270
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
86271
86191
|
}
|
|
86272
86192
|
|
|
86273
86193
|
var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
|
|
@@ -91842,7 +91762,6 @@ function KLineChartHScreenContainer(uielement)
|
|
|
91842
91762
|
frame.RightSpaceCount=this.RightSpaceCount; //右边
|
|
91843
91763
|
|
|
91844
91764
|
if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
|
|
91845
|
-
if (this.ChangeIndexDialog) frame.ChangeIndexEvent=this.ChangeIndexDialog.DoModal;
|
|
91846
91765
|
|
|
91847
91766
|
frame.HorizontalMax=20;
|
|
91848
91767
|
frame.HorizontalMin=10;
|
|
@@ -94672,266 +94591,6 @@ function ModifyIndexDialog(divElement)
|
|
|
94672
94591
|
}
|
|
94673
94592
|
}
|
|
94674
94593
|
|
|
94675
|
-
//换指标
|
|
94676
|
-
function ChangeIndexDialog(divElement)
|
|
94677
|
-
{
|
|
94678
|
-
this.newMethod=IDivDialog; //派生
|
|
94679
|
-
this.newMethod(divElement);
|
|
94680
|
-
delete this.newMethod;
|
|
94681
|
-
|
|
94682
|
-
this.DivElement=divElement; //父节点
|
|
94683
|
-
//this.IndexTreeApiUrl="../commonindextree.json"; //数据下载地址
|
|
94684
|
-
//this.OverlayIndexTreeApiUrl="../commonindextree.json"; //叠加指标列表数据下载地址
|
|
94685
|
-
this.IsOverlayIndex=false;
|
|
94686
|
-
|
|
94687
|
-
this.Create=function()
|
|
94688
|
-
{
|
|
94689
|
-
var div=document.createElement('div');
|
|
94690
|
-
div.className='jchart-changeindex-box';
|
|
94691
|
-
div.id=this.ID=Guid();
|
|
94692
|
-
div.innerHTML=
|
|
94693
|
-
'<div class="target-panel">\n' +
|
|
94694
|
-
' <div class="target-header">\n' +
|
|
94695
|
-
' <span>换指标</span>\n' +
|
|
94696
|
-
' <strong class="close-tar icon iconfont icon-close"></strong>\n' +
|
|
94697
|
-
' </div>\n' +
|
|
94698
|
-
' <div class="target-content">\n' +
|
|
94699
|
-
' <div class="target-left">\n' +
|
|
94700
|
-
' <input type="text">\n' +
|
|
94701
|
-
' <ul></ul>\n' +
|
|
94702
|
-
' </div>\n' +
|
|
94703
|
-
' <div class="target-right">\n' +
|
|
94704
|
-
' <ul></ul>\n' +
|
|
94705
|
-
' </div>\n' +
|
|
94706
|
-
' </div>\n' +
|
|
94707
|
-
' </div>';
|
|
94708
|
-
|
|
94709
|
-
this.DivElement.appendChild(div);
|
|
94710
|
-
}
|
|
94711
|
-
|
|
94712
|
-
//指标菜单内容
|
|
94713
|
-
this.GetMenuData=function()
|
|
94714
|
-
{
|
|
94715
|
-
var data={
|
|
94716
|
-
"name":"页面通用版指标树",
|
|
94717
|
-
"list":
|
|
94718
|
-
[
|
|
94719
|
-
{
|
|
94720
|
-
"node":"超买超卖型",
|
|
94721
|
-
"list":
|
|
94722
|
-
[
|
|
94723
|
-
{"name":"ADTM 动态买卖气指标", "id":"ADTM"},
|
|
94724
|
-
{"name":"BIAS 乖离率", "id":"BIAS"},
|
|
94725
|
-
{"name":"BIAS36 三六乖离", "id":"BIAS36"},
|
|
94726
|
-
{"name":"BIAS_QL 乖离率-传统版", "id":"BIAS_QL"},
|
|
94727
|
-
{"name":"CCI 商品路径指标", "id":"CCI"},
|
|
94728
|
-
{"name":"FSL 分水岭", "id":"FSL"},
|
|
94729
|
-
{"name":"KDJ 随机指标", "id":"KDJ"},
|
|
94730
|
-
{"name":"MTM 动量线", "id":"MTM"},
|
|
94731
|
-
{"name":"OSC 变动速率线", "id":"OSC"},
|
|
94732
|
-
{"name":"RSI 相对强弱指标", "id":"RSI"},
|
|
94733
|
-
{"name":"ROC 变动率指标", "id":"ROC"},
|
|
94734
|
-
{"name":"WR 威廉指标", "id":"WR"}
|
|
94735
|
-
]
|
|
94736
|
-
},
|
|
94737
|
-
{
|
|
94738
|
-
"node":"趋势型",
|
|
94739
|
-
"list":
|
|
94740
|
-
[
|
|
94741
|
-
{"name":"CHO 济坚指数", "id":"CHO"},
|
|
94742
|
-
{"name":"DMA 平均差", "id":"DMA"},
|
|
94743
|
-
{"name":"DMI 趋向指标", "id":"DMI"},
|
|
94744
|
-
{"name":"EMV 简易波动指标", "id":"EMV"},
|
|
94745
|
-
{"name":"MACD 平滑异同平均", "id":"MACD"},
|
|
94746
|
-
{"name":"TRIX 三重指数平均线", "id":"TRIX"},
|
|
94747
|
-
{"name":"UOS 终极指标", "id":"UOS"},
|
|
94748
|
-
{"name":"TRIX 三重指数平均线", "id":"TRIX"}
|
|
94749
|
-
]
|
|
94750
|
-
},
|
|
94751
|
-
{
|
|
94752
|
-
"node":"成交量型",
|
|
94753
|
-
"list":
|
|
94754
|
-
[
|
|
94755
|
-
{"name":"HSL 换手率", "id":"HSL"},
|
|
94756
|
-
{"name":"OBV 累积能量线", "id":"OBV"},
|
|
94757
|
-
{"name":"NVI 负成交量", "id":"NVI"},
|
|
94758
|
-
{"name":"PVI 正成交量", "id":"PVI"},
|
|
94759
|
-
{"name":"VOL 成交量", "id":"VOL"}
|
|
94760
|
-
]
|
|
94761
|
-
},
|
|
94762
|
-
{
|
|
94763
|
-
"node":"均线型",
|
|
94764
|
-
"list":
|
|
94765
|
-
[
|
|
94766
|
-
{"name":"MA 均线", "id":"均线"},
|
|
94767
|
-
{"name":"BBI 多空线", "id":"BBI"}
|
|
94768
|
-
]
|
|
94769
|
-
},
|
|
94770
|
-
{
|
|
94771
|
-
"node":"路径型",
|
|
94772
|
-
"list":
|
|
94773
|
-
[
|
|
94774
|
-
{"name":"BOLL 布林线", "id":"BOLL"},
|
|
94775
|
-
{"name":"BOLL副图 布林线", "id":"BOLL副图"},
|
|
94776
|
-
{"name":"MIKE 麦克支撑压力", "id":"MIKE"},
|
|
94777
|
-
{"name":"ENE 轨道线", "id":"ENE"}
|
|
94778
|
-
]
|
|
94779
|
-
},
|
|
94780
|
-
{
|
|
94781
|
-
"node":"能量型",
|
|
94782
|
-
"list":
|
|
94783
|
-
[
|
|
94784
|
-
{"name":"BRAR 情绪指标", "id":"BRAR"},
|
|
94785
|
-
{"name":"CYR 市场强弱", "id":"CYR"},
|
|
94786
|
-
{"name":"MASS 梅斯线", "id":"MASS"},
|
|
94787
|
-
{"name":"PSY 心理线", "id":"PSY"},
|
|
94788
|
-
{"name":"CR 带状能量线", "id":"CR"},
|
|
94789
|
-
{"name":"VR 成交量变异率", "id":"VR"},
|
|
94790
|
-
{"name":"WAD 威廉多空力度线", "id":"WAD"}
|
|
94791
|
-
]
|
|
94792
|
-
}
|
|
94793
|
-
|
|
94794
|
-
]
|
|
94795
|
-
};
|
|
94796
|
-
|
|
94797
|
-
return data;
|
|
94798
|
-
}
|
|
94799
|
-
|
|
94800
|
-
//下载数据 如果上次下载过可以 可以不用下载
|
|
94801
|
-
this.ReqeustData=function()
|
|
94802
|
-
{
|
|
94803
|
-
if($("#" + this.ID + " .target-left ul li").length>0){
|
|
94804
|
-
return false;
|
|
94805
|
-
}
|
|
94806
|
-
|
|
94807
|
-
var res=this.GetMenuData();
|
|
94808
|
-
var item = res.list;
|
|
94809
|
-
changeIndexLeftList(item); //处理左侧list列表
|
|
94810
|
-
changeIndexRightList(item); //处理右侧内容列表
|
|
94811
|
-
|
|
94812
|
-
/*
|
|
94813
|
-
var url = this.IndexTreeApiUrl;
|
|
94814
|
-
if (this.IsOverlayIndex==true) url=this.OverlayIndexTreeApiUrl;
|
|
94815
|
-
JSNetwork.HttpRequest({
|
|
94816
|
-
url: url,
|
|
94817
|
-
type: 'get',
|
|
94818
|
-
success: function (res) {
|
|
94819
|
-
var item = res.list;
|
|
94820
|
-
changeIndexLeftList(item); //处理左侧list列表
|
|
94821
|
-
changeIndexRightList(item); //处理右侧内容列表
|
|
94822
|
-
}
|
|
94823
|
-
});
|
|
94824
|
-
*/
|
|
94825
|
-
|
|
94826
|
-
//处理左侧list列表
|
|
94827
|
-
function changeIndexLeftList(item) {
|
|
94828
|
-
$(".target-left ul").html('');
|
|
94829
|
-
$.each(item,function(i,result){
|
|
94830
|
-
var htmlList;
|
|
94831
|
-
htmlList = '<li>' + result.node + '</li>';
|
|
94832
|
-
$(".target-left ul").append(htmlList);
|
|
94833
|
-
});
|
|
94834
|
-
//默认选中第一项
|
|
94835
|
-
$(".target-left ul li:first-child").addClass("active-list");
|
|
94836
|
-
}
|
|
94837
|
-
//处理右侧内容列表
|
|
94838
|
-
function changeIndexRightList(listNum) {
|
|
94839
|
-
var contentHtml;
|
|
94840
|
-
var conData = [];
|
|
94841
|
-
$.each(listNum,function(index,result){
|
|
94842
|
-
conData.push(result.list);
|
|
94843
|
-
})
|
|
94844
|
-
//页面初始化时显示第一个列表分类下的内容
|
|
94845
|
-
$.each(conData[0],function (i, res) {
|
|
94846
|
-
contentHtml = '<li id='+res.id+'>'+ res.name +'</li>';
|
|
94847
|
-
$(".target-right ul").append(contentHtml);
|
|
94848
|
-
})
|
|
94849
|
-
//切换list
|
|
94850
|
-
$(".target-left ul").delegate("li","click",function () {
|
|
94851
|
-
$(this).addClass("active-list").siblings().removeClass("active-list");
|
|
94852
|
-
var item = $(this).index();
|
|
94853
|
-
$(".target-right ul").html("");
|
|
94854
|
-
$.each(conData[item],function (i, res) {
|
|
94855
|
-
contentHtml = '<li id='+res.id+'>'+ res.name +'</li>';
|
|
94856
|
-
$(".target-right ul").append(contentHtml);
|
|
94857
|
-
})
|
|
94858
|
-
})
|
|
94859
|
-
}
|
|
94860
|
-
}
|
|
94861
|
-
|
|
94862
|
-
this.BindClose=function(chart)
|
|
94863
|
-
{
|
|
94864
|
-
//关闭按钮
|
|
94865
|
-
$("#"+this.ID+" .close-tar").click(
|
|
94866
|
-
{
|
|
94867
|
-
Chart:chart,
|
|
94868
|
-
},
|
|
94869
|
-
function(event)
|
|
94870
|
-
{
|
|
94871
|
-
var chart=event.data.Chart;
|
|
94872
|
-
chart.ChangeIndexDialog.Hide();
|
|
94873
|
-
}
|
|
94874
|
-
);
|
|
94875
|
-
}
|
|
94876
|
-
|
|
94877
|
-
//搜索事件
|
|
94878
|
-
this.BindSearch=function(chart)
|
|
94879
|
-
{
|
|
94880
|
-
$(".target-left input").on('input',
|
|
94881
|
-
{
|
|
94882
|
-
Chart:chart
|
|
94883
|
-
},
|
|
94884
|
-
function(event)
|
|
94885
|
-
{
|
|
94886
|
-
let scriptData = new JSIndexScript();
|
|
94887
|
-
let result=scriptData.Search(event.target.value);
|
|
94888
|
-
|
|
94889
|
-
$(".target-right ul").html("");
|
|
94890
|
-
for(var i in result)
|
|
94891
|
-
{
|
|
94892
|
-
var name=result[i];
|
|
94893
|
-
var contentHtml = '<li id='+name+'>'+ name +'</li>';
|
|
94894
|
-
$(".target-right ul").append(contentHtml);
|
|
94895
|
-
}
|
|
94896
|
-
|
|
94897
|
-
}
|
|
94898
|
-
);
|
|
94899
|
-
}
|
|
94900
|
-
|
|
94901
|
-
this.DoModal=function(event)
|
|
94902
|
-
{
|
|
94903
|
-
var chart=event.data.Chart;
|
|
94904
|
-
var identify=event.data.Identify;
|
|
94905
|
-
var dialog=chart.ChangeIndexDialog;
|
|
94906
|
-
var isOverlay=event.data.IsOverlay; //是否叠加
|
|
94907
|
-
|
|
94908
|
-
if(!dialog) return;
|
|
94909
|
-
|
|
94910
|
-
if (dialog.ID==null) dialog.Create(); //第1次 需要创建div
|
|
94911
|
-
dialog.IsOverlayIndex=isOverlay;
|
|
94912
|
-
dialog.ReqeustData(); //下载数据
|
|
94913
|
-
|
|
94914
|
-
//切换窗口指标类型 每次委托事件执行之前,先用undelegate()解除之前的所有绑定
|
|
94915
|
-
changeIndeWindow();
|
|
94916
|
-
function changeIndeWindow()
|
|
94917
|
-
{
|
|
94918
|
-
$(".target-right ul").undelegate().delegate("li","click",function () {
|
|
94919
|
-
var idv = $(this).attr("id");
|
|
94920
|
-
if (isOverlay)
|
|
94921
|
-
chart.AddOverlayIndex({WindowIndex:identify,IndexName:idv});
|
|
94922
|
-
else
|
|
94923
|
-
chart.ChangeIndex(identify,idv);
|
|
94924
|
-
$(this).addClass("active-list").siblings().removeClass("active-list");
|
|
94925
|
-
});
|
|
94926
|
-
}
|
|
94927
|
-
|
|
94928
|
-
dialog.BindSearch(chart);
|
|
94929
|
-
//关闭弹窗
|
|
94930
|
-
dialog.BindClose(chart);
|
|
94931
|
-
dialog.Show();
|
|
94932
|
-
}
|
|
94933
|
-
}
|
|
94934
|
-
|
|
94935
94594
|
//等待动画窗口
|
|
94936
94595
|
function WaitDialog(divElement)
|
|
94937
94596
|
{
|
|
@@ -125506,6 +125165,17 @@ function GetBlackStyle()
|
|
|
125506
125165
|
PositionColor:"rgb(255,0,255)" //持仓
|
|
125507
125166
|
},
|
|
125508
125167
|
|
|
125168
|
+
DialogSearchIndex:
|
|
125169
|
+
{
|
|
125170
|
+
BGColor:'rgb(20,20,20)', //背景色
|
|
125171
|
+
BorderColor:'rgb(170,170,170)', //边框颜色
|
|
125172
|
+
TitleColor:'rgb(230,230,230)', //标题颜色
|
|
125173
|
+
|
|
125174
|
+
IndexNameColor:"rgb(210,210,210)",
|
|
125175
|
+
GroupNameColor:"rgb(210,210,210)",
|
|
125176
|
+
InputTextColor:"rgb(210,210,210)",
|
|
125177
|
+
},
|
|
125178
|
+
|
|
125509
125179
|
DialogPopKeyboard:
|
|
125510
125180
|
{
|
|
125511
125181
|
BGColor:'rgb(20,20,20)', //背景色
|
|
@@ -139487,7 +139157,7 @@ function ScrollBarBGChart()
|
|
|
139487
139157
|
|
|
139488
139158
|
|
|
139489
139159
|
|
|
139490
|
-
var HQCHART_VERSION="1.1.
|
|
139160
|
+
var HQCHART_VERSION="1.1.14071";
|
|
139491
139161
|
|
|
139492
139162
|
function PrintHQChartVersion()
|
|
139493
139163
|
{
|