hqchart 1.1.14084 → 1.1.14093

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.
@@ -4022,9 +4022,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4022
4022
  this.CacheCanvasElement=null;
4023
4023
  if (bCacheCanvas) this.CacheCanvasElement=document.createElement("canvas");
4024
4024
 
4025
- //改参数div
4026
- this.ModifyIndexDialog=new ModifyIndexDialog(divElement);
4027
-
4028
4025
  //额外的画布
4029
4026
  this.MapExtraCanvasElement=new Map(); //key=画布名字, value={ Element:, Canvas:}
4030
4027
 
@@ -4257,9 +4254,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4257
4254
  if (option.EventCallback) this.SetEventCallback(chart, option.EventCallback);
4258
4255
  if (option.NetworkFilter) chart.NetworkFilter=option.NetworkFilter;
4259
4256
 
4260
- //创建改参数div
4261
- chart.ModifyIndexDialog=this.ModifyIndexDialog;
4262
-
4263
4257
  var pixelRatio=GetDevicePixelRatio();
4264
4258
 
4265
4259
  //右键菜单
@@ -4709,9 +4703,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4709
4703
  {
4710
4704
  var chart=new CustomKLineChartContainer(this.CanvasElement);
4711
4705
 
4712
- //创建改参数div
4713
- chart.ModifyIndexDialog=this.ModifyIndexDialog;
4714
-
4715
4706
  //右键菜单
4716
4707
  if (IFrameSplitOperator.IsBool(option.IsShowRightMenu)) chart.IsShowRightMenu=option.IsShowRightMenu;
4717
4708
 
@@ -4812,8 +4803,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4812
4803
  if (option.EventCallback) this.SetEventCallback(chart, option.EventCallback);
4813
4804
  if (option.NetworkFilter) chart.NetworkFilter=option.NetworkFilter;
4814
4805
 
4815
- chart.ModifyIndexDialog=this.ModifyIndexDialog;
4816
-
4817
4806
  var pixelRatio=GetDevicePixelRatio();
4818
4807
 
4819
4808
  var windowsCount=2;
@@ -5392,9 +5381,6 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5392
5381
  if (option.NetworkFilter) chart.NetworkFilter=option.NetworkFilter;
5393
5382
  if (option.IsApiPeriod==true) chart.IsApiPeriod=option.IsApiPeriod;
5394
5383
 
5395
- //创建改参数div
5396
- chart.ModifyIndexDialog=this.ModifyIndexDialog;
5397
-
5398
5384
  if (option.ScriptError) chart.ScriptErrorCallback=option.ScriptError;
5399
5385
 
5400
5386
  if (option.KLine) //k线图的属性设置
@@ -5692,6 +5678,9 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5692
5678
  if (option.SelectRectDialog && option.SelectRectDialog.Enable)
5693
5679
  chart.InitalSelectRectDialog(option.SelectRectDialog);
5694
5680
 
5681
+ if (option.ModifyIndexParamDialog && option.ModifyIndexParamDialog.Enable)
5682
+ chart.InitalModifyIndexParamDialog(option.ModifyIndexParamDialog);
5683
+
5695
5684
  if (option.SearchIndexDialog && option.SearchIndexDialog.Enable)
5696
5685
  chart.InitalSearchIndexDialog(option.SearchIndexDialog);
5697
5686
 
@@ -6790,6 +6779,9 @@ var JSCHART_MENU_ID=
6790
6779
 
6791
6780
  CMD_DIALOG_TOOLTIP_ATTRIBUTE:65, //修改K线信息框属性 Ary:[{ Enable:, Style:}, ]
6792
6781
  CMD_KLINE_TOOLTIP_ATTRIBUTE:66, //修改K线提示框属性 Ary:[{ Enable:true/false, EnableKeyDown:true/false}]
6782
+
6783
+ CMD_MODIFY_INDEX_PARAM:67, //指标删除修改 [windowIndex, ]
6784
+ CMD_MODIFY_OVERLAY_INDEX_PARAM:68, //叠加指标修改 [windowIndex, ID ]
6793
6785
  }
6794
6786
 
6795
6787
 
@@ -7018,6 +7010,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7018
7010
  this.DialogSelectRect; //区间统计
7019
7011
  this.FloatTooltip; //浮动tooltip信息
7020
7012
  this.DialogSearchIndex; //指标搜索
7013
+ this.DialogModifyIndexParam; //指标参数修改
7021
7014
 
7022
7015
 
7023
7016
  this.ClearStockCache=function()
@@ -7087,6 +7080,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7087
7080
  this.DialogSearchIndex.Create();
7088
7081
  }
7089
7082
 
7083
+ this.InitalModifyIndexParamDialog=function(option)
7084
+ {
7085
+ if (this.DialogModifyIndexParam) return;
7086
+
7087
+ this.DialogModifyIndexParam=new JSDialogModifyIndexParam();
7088
+ this.DialogModifyIndexParam.Inital(this, option);
7089
+ this.DialogModifyIndexParam.Create();
7090
+ }
7091
+
7090
7092
  this.ShowChangeIndexDialog=function(data)
7091
7093
  {
7092
7094
  if (!data) return;
@@ -7106,6 +7108,46 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7106
7108
  this.DialogSearchIndex.SetOpData(data);
7107
7109
  this.DialogSearchIndex.Show();
7108
7110
  }
7111
+
7112
+ //添加指标窗口
7113
+ this.ShowAddIndexWindowDialog=function(option)
7114
+ {
7115
+ if (!this.DialogSearchIndex) return;
7116
+ var data=option;
7117
+ if (!data) data={ };
7118
+
7119
+ data.OpType=3;
7120
+
7121
+ data.Title=`增加指标窗口`;
7122
+ this.DialogSearchIndex.SetOpData(data);
7123
+ this.DialogSearchIndex.Show();
7124
+ }
7125
+
7126
+ this.ShowModifyIndexParamDialog=function(data)
7127
+ {
7128
+ if (!this.DialogModifyIndexParam) return;
7129
+
7130
+ if (data.Type==1)
7131
+ {
7132
+ var indexScript=this.WindowIndex[data.WindowIndex];
7133
+ if (!indexScript) return;
7134
+
7135
+ data.IndexScript=indexScript;
7136
+ data.Title=`[${indexScript.Name}]参数修改 窗口[${data.WindowIndex+1}]`;
7137
+ }
7138
+ else if (data.Type==2)
7139
+ {
7140
+ var overlayIndex=this.GetOverlayIndexByIdentify(data.Identify);
7141
+ if (!overlayIndex || !overlayIndex.OverlayItem.Script) return;
7142
+ var indexScript=overlayIndex.OverlayItem.Script;
7143
+
7144
+ data.IndexScript=indexScript;
7145
+ data.Title=`[${indexScript.Name}]参数修改 叠加窗口[${data.WindowIndex+1}]`;
7146
+ }
7147
+
7148
+ this.DialogModifyIndexParam.SetIndexData(data);
7149
+ this.DialogModifyIndexParam.Show();
7150
+ }
7109
7151
 
7110
7152
 
7111
7153
  this.DrawSelectRectDialog=function()
@@ -13981,6 +14023,17 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
13981
14023
  if (IFrameSplitOperator.IsBool(option.Enable)) this.KLineTooltipConfig.Enable=option.Enable;
13982
14024
  if (IFrameSplitOperator.IsBool(option.EnableKeyDown)) this.KLineTooltipConfig.EnableKeyDown=option.EnableKeyDown;
13983
14025
  break;
14026
+ case JSCHART_MENU_ID.CMD_MODIFY_INDEX_PARAM:
14027
+ if (param==null) return false;
14028
+ var sendData={ e:null, WindowIndex:param, Type:1 }
14029
+ this.ShowModifyIndexParamDialog(sendData);
14030
+ break;
14031
+ case JSCHART_MENU_ID.CMD_MODIFY_OVERLAY_INDEX_PARAM:
14032
+ if (param==null) return false;
14033
+ if (!aryArgs[1]) return false;
14034
+ var sendData={ e:null, WindowIndex:param, Type:2, Identify:aryArgs[1] };
14035
+ this.ShowModifyIndexParamDialog(sendData);
14036
+ break;
13984
14037
  }
13985
14038
  }
13986
14039
 
@@ -13994,6 +14047,12 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
13994
14047
  return data;
13995
14048
  }
13996
14049
 
14050
+ this.GetModifyIndexMenuData=function(windowIndex)
14051
+ {
14052
+ var data= { Name:"参数修改", Data:{ ID: JSCHART_MENU_ID.CMD_MODIFY_INDEX_PARAM, Args:[windowIndex] } };
14053
+ return data;
14054
+ }
14055
+
13997
14056
  this.GetShowOverlayIndexMenuData=function(indexGuid, showType)
13998
14057
  {
13999
14058
  var overlay=this.GetOverlayIndexByIdentify(indexGuid);
@@ -14005,6 +14064,15 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
14005
14064
  return data;
14006
14065
  }
14007
14066
 
14067
+ this.GetModifyOverlayIndexMenuData=function(indexGuid)
14068
+ {
14069
+ var overlay=this.GetOverlayIndexByIdentify(indexGuid);
14070
+ if (!overlay) return null;
14071
+
14072
+ var data= { Name:"参数修改", Data:{ ID: JSCHART_MENU_ID.CMD_MODIFY_OVERLAY_INDEX_PARAM, Args:[overlay.WindowIndex,indexGuid] } };
14073
+ return data;
14074
+ }
14075
+
14008
14076
  this.GetShowOverlayIndexYAxisMenuData=function(indexGuid, showType)
14009
14077
  {
14010
14078
  var overlay=this.GetOverlayIndexByIdentify(indexGuid);
@@ -17881,7 +17949,6 @@ function MinuteFrame()
17881
17949
  this.ExportData=g_JSChartResource.MinuteToolbar.ExportData; //是否显示'导出数据'菜单
17882
17950
  this.OverlayIndex=g_JSChartResource.MinuteToolbar.OverlayIndex; //是否显示叠加指标
17883
17951
 
17884
- this.ModifyIndexEvent; //改参数 点击事件
17885
17952
  this.ToolbarRect=null; //保存工具条的位置
17886
17953
  this.IsShowPositionTitle=false; //是否显示持仓标题
17887
17954
 
@@ -20310,7 +20377,6 @@ function KLineFrame()
20310
20377
 
20311
20378
  this.SelBorderColor=g_JSChartResource.SelFrameBorderColor;
20312
20379
 
20313
- this.ModifyIndexEvent; //改参数 点击事件
20314
20380
  this.ToolbarRect=null; //保存工具条的位置
20315
20381
  this.ReDrawToolbar=false;
20316
20382
 
@@ -38030,6 +38096,13 @@ function ChartStickLine()
38030
38096
  return (this.BarType==1 || this.BarType==-1);
38031
38097
  }
38032
38098
 
38099
+ this.CalculateBarHeight=function(y,y2)
38100
+ {
38101
+ var barHeight=Math.abs(y-y2);
38102
+ if (barHeight<=0) barHeight=1;
38103
+ return barHeight;
38104
+ }
38105
+
38033
38106
  this.Draw=function()
38034
38107
  {
38035
38108
  if (!this.IsShow || this.ChartFrame.IsMinSize || !this.IsVisible) return;
@@ -38169,7 +38242,7 @@ function ChartStickLine()
38169
38242
  }
38170
38243
  else
38171
38244
  {
38172
- this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(Math.min(y,y2)),ToFixedRect(width),ToFixedRect(Math.abs(y-y2)));
38245
+ this.Canvas.fillRect(ToFixedRect(left),ToFixedRect(Math.min(y,y2)),ToFixedRect(width),ToFixedRect(this.CalculateBarHeight(y,y2)));
38173
38246
  }
38174
38247
  }
38175
38248
  }
@@ -38196,9 +38269,14 @@ function ChartStickLine()
38196
38269
  else
38197
38270
  {
38198
38271
  if (isHScreen)
38272
+ {
38199
38273
  this.Canvas.fillRect(ToFixedRect(Math.min(y,y2)),ToFixedRect(xOffset),ToFixedRect(Math.abs(y-y2)),ToFixedRect(dataWidth));
38274
+ }
38200
38275
  else
38201
- this.Canvas.fillRect(ToFixedRect(xOffset),ToFixedRect(Math.min(y,y2)),ToFixedRect(dataWidth),ToFixedRect(Math.abs(y-y2)));
38276
+ {
38277
+ this.Canvas.fillRect(ToFixedRect(xOffset),ToFixedRect(Math.min(y,y2)),ToFixedRect(dataWidth),ToFixedRect(this.CalculateBarHeight(y,y2)));
38278
+ }
38279
+
38202
38280
  }
38203
38281
  }
38204
38282
  else
@@ -38214,8 +38292,9 @@ function ChartStickLine()
38214
38292
  {
38215
38293
  var xFix=parseInt(x.toString())+0.5;
38216
38294
  this.Canvas.beginPath();
38217
- this.Canvas.moveTo(xFix,y);
38218
- this.Canvas.lineTo(xFix,y2);
38295
+ this.Canvas.moveTo(xFix,y);
38296
+ if (Math.abs(y-y2)>0) this.Canvas.lineTo(xFix,y2);
38297
+ else this.Canvas.lineTo(xFix,y+1); //太窄了,就画一个像素的宽度
38219
38298
  this.Canvas.stroke();
38220
38299
  }
38221
38300
  }
@@ -73284,6 +73363,17 @@ function JSChartResource()
73284
73363
  InputTextColor:"rgb(0,0,0)"
73285
73364
  };
73286
73365
 
73366
+ this.DialogModifyIndexParam=
73367
+ {
73368
+ BGColor:'rgb(250,250,250)', //背景色
73369
+ BorderColor:'rgb(20,20,20)', //边框颜色
73370
+ TitleColor:'rgb(250,250,250)', //标题颜色
73371
+ TitleBGColor:"rgb(200, 66, 69)", //标题背景颜色
73372
+
73373
+ ParamNameColor:"rgb(0,0,0)", //数值名称
73374
+ InputTextColor:"rgb(0,0,0)"
73375
+ };
73376
+
73287
73377
  //弹幕
73288
73378
  this.Barrage= {
73289
73379
  Font:16*GetDevicePixelRatio() +'px 微软雅黑', //字体
@@ -77446,8 +77536,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
77446
77536
  frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
77447
77537
  frame.GlobalOption=this.GlobalOption;
77448
77538
 
77449
- if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
77450
-
77451
77539
  frame.HorizontalMax=20;
77452
77540
  frame.HorizontalMin=10;
77453
77541
 
@@ -77530,8 +77618,6 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
77530
77618
  frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); };
77531
77619
  frame.GlobalOption=this.GlobalOption;
77532
77620
 
77533
- if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
77534
-
77535
77621
  frame.HorizontalMax=20;
77536
77622
  frame.HorizontalMin=10;
77537
77623
  frame.YSplitOperator=new FrameSplitY();
@@ -83516,9 +83602,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
83516
83602
  {
83517
83603
  var id=button.IndexID;
83518
83604
  var frame=button.Frame;
83519
- e.data={ Chart:this, Identify:id, IsOverlay:true };
83520
- if (frame.ModifyIndexEvent)
83521
- frame.ModifyIndexEvent(e);
83605
+ var sendData={ e:e, WindowIndex:frame.Identify, Type:2, Identify:id };
83606
+ this.ShowModifyIndexParamDialog(sendData);
83522
83607
  }
83523
83608
  else if (button.ID==JSCHART_BUTTON_ID.CLOSE_INDEX_WINDOW)
83524
83609
  {
@@ -83539,9 +83624,8 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
83539
83624
  else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
83540
83625
  {
83541
83626
  var frame=button.Frame;
83542
- e.data={ Chart:this, Identify:frame.Identify, IsOverlay:false };
83543
- if (frame.ModifyIndexEvent)
83544
- frame.ModifyIndexEvent(e);
83627
+ var sendData={ e:e, WindowIndex:frame.Identify, Type:1 }
83628
+ this.ShowModifyIndexParamDialog(sendData);
83545
83629
  }
83546
83630
  else if (button.ID==JSCHART_BUTTON_ID.OVERLAY_INDEX)
83547
83631
  {
@@ -84353,9 +84437,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
84353
84437
  {
84354
84438
  var id=button.IndexID;
84355
84439
  var frame=button.Frame;
84356
- e.data={ Chart:this, Identify:id, IsOverlay:true };
84357
- if (frame.ModifyIndexEvent)
84358
- frame.ModifyIndexEvent(e);
84440
+ var sendData={ e:e, WindowIndex:frame.Identify, Type:2, Identify:id };
84441
+ this.ShowModifyIndexParamDialog(sendData);
84442
+
84359
84443
  }
84360
84444
  else if (button.ID==JSCHART_BUTTON_ID.CLOSE_INDEX_WINDOW)
84361
84445
  {
@@ -84371,9 +84455,8 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
84371
84455
  else if (button.ID==JSCHART_BUTTON_ID.MODIFY_INDEX_PARAM)
84372
84456
  {
84373
84457
  var frame=button.Frame;
84374
- e.data={ Chart:this, Identify:frame.Identify, IsOverlay:false };
84375
- if (frame.ModifyIndexEvent)
84376
- frame.ModifyIndexEvent(e);
84458
+ var sendData={ e:e, WindowIndex:frame.Identify, Type:1 }
84459
+ this.ShowModifyIndexParamDialog(sendData);
84377
84460
  }
84378
84461
  else if (button.ID==JSCHART_BUTTON_ID.OVERLAY_INDEX)
84379
84462
  {
@@ -86140,7 +86223,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
86140
86223
 
86141
86224
  if (i>=2)
86142
86225
  {
86143
- if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
86226
+
86144
86227
  }
86145
86228
 
86146
86229
  var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
@@ -86227,12 +86310,6 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
86227
86310
  frame.GlobalOption=this.GlobalOption;
86228
86311
  frame.HQChart=this;
86229
86312
  frame.GetEventCallback=(id)=> { return this.GetEventCallback(id); }
86230
-
86231
-
86232
- if (id>=2)
86233
- {
86234
- if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
86235
- }
86236
86313
 
86237
86314
  var DEFAULT_HORIZONTAL=[9,8,7,6,5,4,3,2,1];
86238
86315
  frame.HorizontalMax=DEFAULT_HORIZONTAL[0];
@@ -91805,8 +91882,6 @@ function KLineChartHScreenContainer(uielement)
91805
91882
  frame.Identify=i; //窗口序号
91806
91883
  frame.RightSpaceCount=this.RightSpaceCount; //右边
91807
91884
 
91808
- if (this.ModifyIndexDialog) frame.ModifyIndexEvent=this.ModifyIndexDialog.DoModal; //绑定菜单事件
91809
-
91810
91885
  frame.HorizontalMax=20;
91811
91886
  frame.HorizontalMin=10;
91812
91887
 
@@ -94411,230 +94486,6 @@ function IDivDialog(divElement)
94411
94486
  }
94412
94487
  }
94413
94488
 
94414
-
94415
- //修改指标
94416
- function ModifyIndexDialog(divElement)
94417
- {
94418
- this.newMethod=IDivDialog; //派生
94419
- this.newMethod(divElement);
94420
- delete this.newMethod;
94421
-
94422
- this.Title={ ID:Guid() }; //标题
94423
- this.ParamList={ID:Guid() }; //参数列表 class='parameter-content'
94424
- this.ParamData=[]; //{ ID:参数ID, Value:参数值}
94425
- this.Identify;
94426
- this.HQChart;
94427
- this.IsOverlay=false; //是否是叠加指标
94428
-
94429
- this.IndexScript;
94430
-
94431
- //创建
94432
- this.Create=function()
94433
- {
94434
- this.ID=Guid();
94435
-
94436
- var div=document.createElement('div');
94437
- div.className='jchart-modifyindex-box';
94438
- div.id=this.ID;
94439
- div.innerHTML=
94440
- "<div class='parameter'>\
94441
- <div class='parameter-header'>\
94442
- <span></span>\
94443
- <strong id='close' class='icon iconfont icon-close'></strong>\
94444
- </div>\
94445
- <div class='parameter-content'><input/>MA</div>\
94446
- <div class='parameter-footer'>\
94447
- <button class='submit' >确定</button>\
94448
- <button class='cancel' >取消</button>\
94449
- </div>\
94450
- </div>";
94451
-
94452
- this.DivElement.appendChild(div);
94453
-
94454
- //确定按钮
94455
- $("#"+this.ID+" .submit").click(
94456
- {
94457
- divBox:this,
94458
- },
94459
- function(event)
94460
- {
94461
- event.data.divBox.Hide();
94462
- });
94463
-
94464
- //给一个id 后面查找方便
94465
- var titleElement=div.getElementsByTagName('span')[0];
94466
- titleElement.id=this.Title.ID;
94467
-
94468
- var paramListElement=div.getElementsByClassName('parameter-content')[0];
94469
- paramListElement.id=this.ParamList.ID;
94470
- }
94471
-
94472
- //设置标题
94473
- this.SetTitle=function(title)
94474
- {
94475
- $("#"+this.Title.ID).html(title);
94476
- }
94477
-
94478
- //清空参数
94479
- this.ClearParamList=function()
94480
- {
94481
- $("#"+this.ParamList.ID).empty();
94482
- this.ParamData=[];
94483
- }
94484
-
94485
- this.BindParam=function()
94486
- {
94487
- for(var i=0; i<this.IndexScript.Arguments.length; ++i)
94488
- {
94489
- var item=this.IndexScript.Arguments[i];
94490
- if (item.Name==null || isNaN(item.Value)) break;
94491
-
94492
- var guid=Guid();
94493
- var param = '<input class="row-line" id="'+guid+'" value="'+item.Value+'" type="number" step="1"/>'+ item.Name +'<br>';
94494
- $("#"+this.ParamList.ID).append(param);
94495
-
94496
- this.ParamData.push({ID:guid,Value:item.Value});
94497
- }
94498
-
94499
- //绑定参数修改事件
94500
- var self=this;
94501
- for(var i=0; i<this.ParamData.length; ++i)
94502
- {
94503
- var item=this.ParamData[i];
94504
- $("#"+item.ID).mouseup(
94505
- {
94506
- ParamIndex:i //参数序号
94507
- },
94508
- function(event)
94509
- {
94510
- var value = parseInt($(this).val()); //获取当前操作的input属性值,转化为整型
94511
- if (!IFrameSplitOperator.IsNumber(value))
94512
- {
94513
- alert("参数不能为空");
94514
- return;
94515
- }
94516
- var chart=self.HQChart;
94517
- var identify=self.Identify;
94518
- var paramIndex=event.data.ParamIndex;
94519
- var script=self.IndexScript;
94520
- var isOverlay=self.IsOverlay;
94521
-
94522
- script.Arguments[paramIndex].Value = value; //为参数属性重新赋值
94523
- if (isOverlay) chart.UpdateOverlayIndex(identify);
94524
- else chart.UpdateWindowIndex(identify); //调用更新窗口指标函数,参数用来定位窗口
94525
- }
94526
- )
94527
-
94528
- $("#"+item.ID).keyup(
94529
- {
94530
- ParamIndex:i //参数序号
94531
- },
94532
- function(event)
94533
- {
94534
- var value = parseInt($(this).val()); //获取当前操作的input属性值,转化为整型
94535
- if (!IFrameSplitOperator.IsNumber(value))
94536
- {
94537
- alert("参数不能为空");
94538
- return;
94539
- }
94540
- var chart=self.HQChart;
94541
- var identify=self.Identify;
94542
- var paramIndex=event.data.ParamIndex;
94543
- var script=self.IndexScript;
94544
- var isOverlay=self.IsOverlay;
94545
-
94546
- script.Arguments[paramIndex].Value = value; //为参数属性重新赋值
94547
- if (isOverlay) chart.UpdateOverlayIndex(identify);
94548
- else chart.UpdateWindowIndex(identify); //调用更新窗口指标函数,参数用来定位窗口
94549
- }
94550
- )
94551
- }
94552
- }
94553
-
94554
- //绑定取消事件
94555
- this.BindCancel=function()
94556
- {
94557
- //取消按钮事件
94558
- var self=this;
94559
- var test=$("#"+this.ID+" .cancel");
94560
- $("#"+this.ID+" .cancel").unbind("click").click(
94561
- function(event)
94562
- {
94563
- var chart=self.HQChart;
94564
- var identify=self.Identify;
94565
- self.RestoreParam();
94566
- var isOverlay=self.IsOverlay;
94567
- if (isOverlay) chart.UpdateOverlayIndex(identify);
94568
- else chart.UpdateWindowIndex(identify);
94569
- self.IndexScript=null;
94570
- self.Hide();
94571
- }
94572
- );
94573
-
94574
- //关闭和取消是一样的
94575
- $("#"+this.ID+" #close").unbind("click").click(
94576
- function(event)
94577
- {
94578
- var chart=self.HQChart;
94579
- var identify=self.Identify;
94580
- var isOverlay=self.IsOverlay;
94581
- self.RestoreParam();
94582
- if (isOverlay) chart.UpdateOverlayIndex(identify);
94583
- else chart.UpdateWindowIndex(identify);
94584
- self.IndexScript=null;
94585
- self.Hide();
94586
- }
94587
- );
94588
- }
94589
-
94590
- //还原参数
94591
- this.RestoreParam=function()
94592
- {
94593
- if (!this.IndexScript) return;
94594
-
94595
- for(var i=0; i<this.ParamData.length; ++i)
94596
- {
94597
- var item=this.ParamData[i];
94598
- this.IndexScript.Arguments[i].Value=item.Value;
94599
- }
94600
- }
94601
-
94602
- //显示
94603
- this.DoModal=function(event)
94604
- {
94605
- var chart=event.data.Chart;
94606
- var identify=event.data.Identify;
94607
- var dialog=chart.ModifyIndexDialog;
94608
- var isOverlay=event.data.IsOverlay===true;
94609
-
94610
- if(!dialog) return;
94611
-
94612
- if (dialog.ID==null) dialog.Create(); //第1次 需要创建div
94613
- dialog.Identify=identify;
94614
- dialog.HQChart=chart;
94615
- dialog.IsOverlay=isOverlay
94616
-
94617
- if (isOverlay)
94618
- {
94619
- var overlayIndex=chart.GetOverlayIndexByIdentify(identify);
94620
- if (!overlayIndex || !overlayIndex.OverlayItem.Script) return;
94621
- dialog.IndexScript=overlayIndex.OverlayItem.Script;
94622
- dialog.SetTitle(dialog.IndexScript.Name+" 叠加指标参数设置"); //设置标题
94623
- }
94624
- else
94625
- {
94626
- dialog.IndexScript=chart.WindowIndex[identify];
94627
- dialog.SetTitle(dialog.IndexScript.Name+" 指标参数设置"); //设置标题
94628
- }
94629
-
94630
- dialog.ClearParamList(); //清空参数
94631
- dialog.BindParam(chart,identify); //绑定参数
94632
- dialog.BindCancel(); //绑定取消和关闭事件
94633
-
94634
- dialog.Show();//显示, 在css里调整居中
94635
- }
94636
- }
94637
-
94638
94489
  //等待动画窗口
94639
94490
  function WaitDialog(divElement)
94640
94491
  {
@@ -147110,7 +146961,7 @@ function JSDialogSelectRect()
147110
146961
 
147111
146962
  jones_2000@163.com
147112
146963
 
147113
- 内置指标搜索对话框
146964
+ 内置指标搜索对话框 修改指标参数对话框
147114
146965
  */
147115
146966
 
147116
146967
 
@@ -147124,7 +146975,7 @@ function JSDialogSearchIndex()
147124
146975
 
147125
146976
  this.HQChart=null;
147126
146977
 
147127
- //{ WindowIndex:窗口索引, OpType:1=切换主图指标 2=添加叠加指标, Title: };
146978
+ //{ WindowIndex:窗口索引, OpType:1=切换主图指标 2=添加叠加指标 3=新增指标窗口, Title: };
147128
146979
  this.OpData=null;
147129
146980
 
147130
146981
  this.TitleColor=g_JSChartResource.DialogSearchIndex.TitleColor;
@@ -147150,6 +147001,7 @@ function JSDialogSearchIndex()
147150
147001
  {
147151
147002
  if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
147152
147003
  if (option.IndexData) this.IndexData=option.IndexData;
147004
+ if (IFrameSplitOperator.IsNumber(option.MaxRowCount)) this.MaxRowCount=option.MaxRowCount;
147153
147005
  }
147154
147006
  }
147155
147007
 
@@ -147159,7 +147011,8 @@ function JSDialogSearchIndex()
147159
147011
  this.AryGroup=[];
147160
147012
  this.IndexData=null;
147161
147013
  this.InputDom=null;
147162
-
147014
+ this.HQChart=null;
147015
+
147163
147016
  if (this.DivDialog)
147164
147017
  {
147165
147018
  document.body.removeChild(this.DivDialog);
@@ -147426,6 +147279,24 @@ function JSDialogSearchIndex()
147426
147279
  this.HQChart.AddOverlayIndex(obj);
147427
147280
  }
147428
147281
  }
147282
+ else if (this.OpData.OpType==3) //新增加指标窗口
147283
+ {
147284
+ var indexItem=cellItem.IndexItem;
147285
+ if (indexItem.Type==0) //系统指标
147286
+ {
147287
+ this.HQChart.AddIndexWindow(indexItem.ID, this.OpData);
147288
+ }
147289
+ else if (indexItem.Type==1) //自定义脚本指标
147290
+ {
147291
+ var indexData={ ID:indexItem.ID, Name:indexItem.Name, Script:indexItem.Script, Args:indexItem.Args };
147292
+ this.HQChart.AddScriptIndexWindow(indexData, this.OpData);
147293
+ }
147294
+ else if (indexItem.Type==2) //api指标
147295
+ {
147296
+ var indexData={ API: { ID:indexItem.ID, Name:indexItem.Name, Args:indexItem.Args, Url:'local'} };
147297
+ this.HQChart.AddAPIIndexWindow(indexData, this.OpData);
147298
+ }
147299
+ }
147429
147300
 
147430
147301
  }
147431
147302
 
@@ -147698,7 +147569,7 @@ JSDialogSearchIndex.GetDefaultIndexData=function()
147698
147569
  ]
147699
147570
  },
147700
147571
 
147701
- /*
147572
+
147702
147573
  {
147703
147574
  Group:{ ID:"自定义", Name:"自定义"} ,
147704
147575
  AryIndex:
@@ -147707,7 +147578,7 @@ JSDialogSearchIndex.GetDefaultIndexData=function()
147707
147578
  { Name:"高低均价(自定义脚本)", ID:"HIGH_LOW_AV", Type:1, Args:null , Script:"均价:(H+L)/2;高:H;低:L;", Args:[ { Name:'N', Value:20}, { Name:'M', Value:6}]},
147708
147579
  ]
147709
147580
  }
147710
- */
147581
+
147711
147582
  ]
147712
147583
 
147713
147584
  }
@@ -147717,6 +147588,410 @@ JSDialogSearchIndex.GetDefaultIndexData=function()
147717
147588
 
147718
147589
 
147719
147590
 
147591
+ function JSDialogModifyIndexParam()
147592
+ {
147593
+ this.DivDialog=null;
147594
+ this.DragTitle=null;
147595
+ this.TitleBox=null; //{ DivTitle, DivName, DivName }
147596
+ this.Style=0; //样式 预留
147597
+
147598
+ this.TitleColor=g_JSChartResource.DialogModifyIndexParam.TitleColor;
147599
+ this.TitleBGColor=g_JSChartResource.DialogModifyIndexParam.TitleBGColor;
147600
+ this.BGColor=g_JSChartResource.DialogModifyIndexParam.BGColor;
147601
+ this.BorderColor=g_JSChartResource.DialogModifyIndexParam.BorderColor;
147602
+ this.ParamNameColor=g_JSChartResource.DialogModifyIndexParam.ParamNameColor;
147603
+ this.InputTextColor=g_JSChartResource.DialogModifyIndexParam.InputTextColor;
147604
+
147605
+ this.MaxRowCount=30; //行
147606
+
147607
+ this.HQChart=null;
147608
+
147609
+ this.AryData=[];
147610
+ this.IndexData=null; //指标数据 { WindowsIndex:, Type:1=主图 2=叠加, Identify, IndexScript: }
147611
+ this.Arguments=[]; //参数备份
147612
+
147613
+ this.Inital=function(hqchart, option)
147614
+ {
147615
+ this.HQChart=hqchart;
147616
+ if (option)
147617
+ {
147618
+ if (IFrameSplitOperator.IsNumber(option.Style)) this.Style=option.Style;
147619
+ if (IFrameSplitOperator.IsNumber(option.MaxRowCount)) this.MaxRowCount=option.MaxRowCount;
147620
+ }
147621
+ }
147622
+
147623
+
147624
+ this.Destroy=function()
147625
+ {
147626
+ this.AryData=[];
147627
+ this.HQChart=null;
147628
+
147629
+ if (this.DivDialog)
147630
+ {
147631
+ document.body.removeChild(this.DivDialog);
147632
+ this.DivDialog=null;
147633
+ }
147634
+ }
147635
+
147636
+ this.Show=function(x,y)
147637
+ {
147638
+ if (!this.DivDialog) return;
147639
+ //if (!this.HQChart) return;
147640
+
147641
+ this.UpdateParam();
147642
+
147643
+ if (this.IndexData && this.IndexData.Title) this.TitleBox.DivName.innerText=this.IndexData.Title;
147644
+
147645
+ if (!IFrameSplitOperator.IsNumber(x) || !IFrameSplitOperator.IsNumber(y)) //默认居中显示
147646
+ {
147647
+ var rtClient=this.HQChart.UIElement.getBoundingClientRect();
147648
+ x=rtClient.left+(rtClient.right-rtClient.left-this.DivDialog.offsetWidth)/2;
147649
+ y=rtClient.top+(rtClient.bottom-rtClient.top-this.DivDialog.offsetHeight)/2;
147650
+ }
147651
+
147652
+ this.DivDialog.style.visibility='visible';
147653
+ this.DivDialog.style.top = y + "px";
147654
+ this.DivDialog.style.left = x + "px";
147655
+ }
147656
+
147657
+ this.OnClickColseButton=function(e)
147658
+ {
147659
+ this.RestoreParam(); //还原参数
147660
+ this.Close(e);
147661
+ }
147662
+
147663
+ this.OnClickRestoreButton=function(e)
147664
+ {
147665
+ var aryText=this.Arguments;
147666
+ if (!aryText) aryText=[];
147667
+ this.UpdateParamTable(aryText);
147668
+ this.RestoreParam();
147669
+ }
147670
+
147671
+ this.OnClickOkButton=function(e)
147672
+ {
147673
+ this.Close(e);
147674
+ }
147675
+
147676
+ this.Close=function(e)
147677
+ {
147678
+ this.IndexData=null;
147679
+ this.Arguments=[];
147680
+ if (!this.DivDialog) return;
147681
+
147682
+ this.DivDialog.style.visibility='hidden';
147683
+ }
147684
+
147685
+ this.SetIndexData=function(data)
147686
+ {
147687
+ this.IndexData=data;
147688
+ this.BackupParam();
147689
+ }
147690
+
147691
+ this.OnMouseDownTitle=function(e)
147692
+ {
147693
+ if (!this.DivDialog) return;
147694
+
147695
+ var dragData={ X:e.clientX, Y:e.clientY };
147696
+ dragData.YOffset=e.clientX - this.DivDialog.offsetLeft;
147697
+ dragData.XOffset=e.clientY - this.DivDialog.offsetTop;
147698
+ this.DragTitle=dragData;
147699
+
147700
+ document.onmousemove=(e)=>{ this.DocOnMouseMoveTitle(e); }
147701
+ document.onmouseup=(e)=>{ this.DocOnMouseUpTitle(e); }
147702
+ }
147703
+
147704
+ this.DocOnMouseMoveTitle=function(e)
147705
+ {
147706
+ if (!this.DragTitle) return;
147707
+
147708
+ var left = e.clientX - this.DragTitle.YOffset;
147709
+ var top = e.clientY - this.DragTitle.XOffset;
147710
+
147711
+ var right=left+this.DivDialog.offsetWidth;
147712
+ var bottom=top+ this.DivDialog.offsetHeight;
147713
+
147714
+ if ((right+5)>=window.innerWidth) left=window.innerWidth-this.DivDialog.offsetWidth-5;
147715
+ if ((bottom+5)>=window.innerHeight) top=window.innerHeight-this.DivDialog.offsetHeight-5;
147716
+
147717
+ this.DivDialog.style.left = left + 'px';
147718
+ this.DivDialog.style.top = top + 'px';
147719
+
147720
+ if(e.preventDefault) e.preventDefault();
147721
+ }
147722
+
147723
+ this.DocOnMouseUpTitle=function(e)
147724
+ {
147725
+ this.DragTitle=null;
147726
+ this.onmousemove = null;
147727
+ this.onmouseup = null;
147728
+ }
147729
+
147730
+ this.Create=function()
147731
+ {
147732
+ var divDom=document.createElement("div");
147733
+ divDom.className='UMyChart_ModifyIndexParam_Dialog_Div';
147734
+
147735
+ //对话框标题栏
147736
+ var divTitle=document.createElement("div");
147737
+ divTitle.className='UMyChart_ModifyIndexParam_Title_Div';
147738
+ divTitle.onmousedown=(e)=>{ this.OnMouseDownTitle(e);}
147739
+ divDom.appendChild(divTitle);
147740
+
147741
+ var divName=document.createElement("div");
147742
+ divName.className='UMyChart_ModifyIndexParam_Name_Div';
147743
+ divName.innerText="指标参数修改";
147744
+ divTitle.appendChild(divName);
147745
+
147746
+ var divClose=document.createElement("div");
147747
+ divClose.className='UMyChart_ModifyIndexParam_Close_Div';
147748
+ divClose.innerText="x";
147749
+ divClose.onmousedown=(e)=>{ this.OnClickColseButton(e); }
147750
+ divTitle.appendChild(divClose);
147751
+
147752
+ //整个框子
147753
+ var divFrame=document.createElement("div");
147754
+ divFrame.className="UMyChart_ModifyIndexParam_Frome_Div";
147755
+ divDom.appendChild(divFrame);
147756
+
147757
+ //表格
147758
+ var divTable=document.createElement("div");
147759
+ divTable.className='UMyChart_ModifyIndexParam_Table_Div';
147760
+ divFrame.appendChild(divTable);
147761
+
147762
+ var table=document.createElement("table");
147763
+ table.className="UMyChart_ModifyIndexParam_Table";
147764
+ divTable.appendChild(table);
147765
+
147766
+ /*
147767
+ var thead=document.createElement("thead");
147768
+ table.appendChild(thead);
147769
+
147770
+ var trDom=document.createElement("tr");
147771
+ trDom.className='UMyChart_ModifyIndexParam_head_Tr';
147772
+ thead.appendChild(trDom);
147773
+
147774
+ var thDom=document.createElement("th");
147775
+ thDom.className="UMyChart_ModifyIndexParam_Th";
147776
+ thDom.innerText="变量";
147777
+ trDom.appendChild(thDom);
147778
+
147779
+ var thDom=document.createElement("th");
147780
+ thDom.className="UMyChart_ModifyIndexParam_Th";
147781
+ thDom.innerText="数值";
147782
+ trDom.appendChild(thDom);
147783
+
147784
+ var thDom=document.createElement("th");
147785
+ thDom.className="UMyChart_ModifyIndexParam_Th";
147786
+ thDom.innerText="说明";
147787
+ trDom.appendChild(thDom);
147788
+ */
147789
+
147790
+
147791
+ var tbody=document.createElement("tbody");
147792
+ tbody.className="UMyChart_ModifyIndexParam_Tbody";
147793
+ table.appendChild(tbody);
147794
+
147795
+ this.AryData=[];
147796
+ for(var i=0;i<this.MaxRowCount;++i)
147797
+ {
147798
+ var rowItem=this.CreateRowDOM(i, tbody)
147799
+
147800
+ this.AryData.push(rowItem);
147801
+ }
147802
+
147803
+ var divButton=document.createElement("div");
147804
+ divButton.className='UMyChart_ModifyIndexParam_Button_Div';
147805
+ divFrame.appendChild(divButton);
147806
+
147807
+ var btnRestore=document.createElement("button");
147808
+ //btnRestore.className="UMyChart_ModifyIndexParam_button";
147809
+ btnRestore.innerText="恢复默认";
147810
+ btnRestore.addEventListener("mousedown", (e)=>{ this.OnClickRestoreButton(e); });
147811
+ divButton.appendChild(btnRestore);
147812
+
147813
+ var btnOk=document.createElement("button");
147814
+ //btnOk.className="UMyChart_ModifyIndexParam_button";
147815
+ btnOk.innerText="确认";
147816
+ btnOk.addEventListener("mousedown", (e)=>{ this.OnClickOkButton(e); })
147817
+ divButton.appendChild(btnOk);
147818
+
147819
+ document.body.appendChild(divDom);
147820
+
147821
+ this.DivName=divName;
147822
+ this.DivDialog=divDom;
147823
+ this.TitleBox={ DivTitle:divTitle, DivName:divName, DivColor:divClose };
147824
+
147825
+ this.UpdateStyle();
147826
+ }
147827
+
147828
+ this.CreateRowDOM=function(index, tbody)
147829
+ {
147830
+ var rowItem={ Tr:null, TdName:null, SpanName:null, TdValue:null, Input:null, ParamItem:null };
147831
+
147832
+ var trDom=document.createElement("tr");
147833
+ trDom.className='UMyChart_ModifyIndexParam_Tr';
147834
+ tbody.appendChild(trDom);
147835
+ rowItem.Tr=trDom;
147836
+
147837
+ var tdDom=document.createElement("td");
147838
+ tdDom.className="UMyChart_ModifyIndexParam_Name_Td"; //指标名称
147839
+ trDom.appendChild(tdDom);
147840
+ rowItem.TdName=tdDom;
147841
+
147842
+ var spanDom=document.createElement("span");
147843
+ spanDom.className='UMyChart_ModifyIndexParam_Name_Span';
147844
+ spanDom.innerText='参数';
147845
+ tdDom.appendChild(spanDom);
147846
+ rowItem.SpanName=spanDom;
147847
+
147848
+ var tdDom=document.createElement("td");
147849
+ tdDom.className="UMyChart_ModifyIndexParam_Value_Td"; //指标名称
147850
+ trDom.appendChild(tdDom);
147851
+ rowItem.TdValue=tdDom;
147852
+
147853
+ var input=document.createElement("input");
147854
+ input.className='UMyChart_ModifyIndexParam_Input';
147855
+ input.type="number";
147856
+ input.step=1;
147857
+ input.addEventListener("mouseup", (e)=>{ this.OnParamMouseUp(e)});
147858
+ input.addEventListener("keyup", (e)=>{ this.OnParamKeyUp(e)})
147859
+ tdDom.appendChild(input);
147860
+ rowItem.Input=input;
147861
+
147862
+ return rowItem;
147863
+ }
147864
+
147865
+ this.UpdateStyle=function()
147866
+ {
147867
+ if (!this.DivDialog) return;
147868
+
147869
+ if (this.BGColor) this.DivDialog.style['background-color']=this.BGColor;
147870
+ if (this.BorderColor) this.DivDialog.style['border-color']=this.BorderColor;
147871
+
147872
+ if (this.TitleBGColor) this.TitleBox.DivTitle.style['background-color']=this.TitleBGColor;
147873
+ if (this.TitleColor) this.TitleBox.DivName.style['color']=this.TitleColor;
147874
+ };
147875
+
147876
+ this.UpdateParamTable=function(aryText)
147877
+ {
147878
+ var index=0;
147879
+ for(index=0; index<aryText.length && index<this.AryData.length; ++index)
147880
+ {
147881
+ var item=aryText[index];
147882
+ var row=this.AryData[index];
147883
+ row.SpanName.innerText=`${item.Name}: `;
147884
+ row.SpanName.style.color=this.ParamNameColor;
147885
+
147886
+ row.Input.value=item.Value;
147887
+ row.Input.style.color=this.InputTextColor;
147888
+ row.Input.dataset.paramid=item.Index;
147889
+
147890
+ if (row.Tr.style.display=="none") row.Tr.style.display="";
147891
+ }
147892
+
147893
+ for(; index<this.AryData.length; ++index)
147894
+ {
147895
+ var row=this.AryData[index];
147896
+ row.Tr.style.display="none";
147897
+ row.Input.dataset.paramid=-1;
147898
+ }
147899
+ }
147900
+
147901
+ this.UpdateParam=function()
147902
+ {
147903
+ var aryText=[];
147904
+ var indexScript=this.IndexData.IndexScript;
147905
+ if (indexScript && IFrameSplitOperator.IsNonEmptyArray(indexScript.Arguments))
147906
+ {
147907
+ for(var i=0;i<indexScript.Arguments.length;++i)
147908
+ {
147909
+ var item=indexScript.Arguments[i];
147910
+ aryText.push({ Name:item.Name, Value:item.Value, Index:i });
147911
+ }
147912
+ }
147913
+
147914
+ this.UpdateParamTable(aryText);
147915
+ }
147916
+
147917
+ this.RestoreParam=function()
147918
+ {
147919
+ if (!this.IndexData || !this.IndexData.IndexScript) return;
147920
+ var indexScript=this.IndexData.IndexScript;
147921
+
147922
+ if (!IFrameSplitOperator.IsNonEmptyArray(indexScript.Arguments)) return;
147923
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.Arguments)) return;
147924
+
147925
+ var bUpdate=false;
147926
+ for(var i=0;i<this.Arguments.length;++i)
147927
+ {
147928
+ var oldItem=this.Arguments[i];
147929
+ var item=indexScript.Arguments[i];
147930
+ if (oldItem.Value!=item.Value)
147931
+ {
147932
+ item.Value=oldItem.Value;
147933
+ bUpdate=true;
147934
+ }
147935
+ }
147936
+
147937
+ if (!bUpdate) return;
147938
+
147939
+ if (this.IndexData.Type==1) this.HQChart.UpdateWindowIndex(this.IndexData.WindowIndex);
147940
+ else if (this.IndexData.Type==2) this.HQChart.UpdateOverlayIndex(this.IndexData.Identify);
147941
+ }
147942
+
147943
+ this.BackupParam=function()
147944
+ {
147945
+ this.Arguments=[];
147946
+
147947
+ if (!this.IndexData || !this.IndexData.IndexScript) return;
147948
+ var indexScript=this.IndexData.IndexScript;
147949
+ if (IFrameSplitOperator.IsNonEmptyArray(indexScript.Arguments))
147950
+ {
147951
+ for(var i=0;i<indexScript.Arguments.length;++i)
147952
+ {
147953
+ var item=indexScript.Arguments[i];
147954
+ this.Arguments.push({Name:item.Name, Value:item.Value, Index:i});
147955
+ }
147956
+ }
147957
+ }
147958
+
147959
+ this.OnParamMouseUp=function(e)
147960
+ {
147961
+ var input=e.target;
147962
+ var value=input.value;
147963
+ var id=input.dataset.paramid;
147964
+
147965
+ this.ModifyParam(id, parseInt(value));
147966
+ }
147967
+
147968
+ this.OnParamKeyUp=function(e)
147969
+ {
147970
+ var input=e.target;
147971
+ var value=input.value;
147972
+ var id=input.dataset.paramid;
147973
+
147974
+ this.ModifyParam(id, parseInt(value));
147975
+ }
147976
+
147977
+ this.ModifyParam=function(id, value)
147978
+ {
147979
+ if (!this.IndexData || !this.IndexData.IndexScript) return;
147980
+
147981
+ var indexScript=this.IndexData.IndexScript;
147982
+ var item=indexScript.Arguments[id];
147983
+ if (!item) return;
147984
+ if (item.Value==value) return;
147985
+
147986
+ item.Value=value;
147987
+
147988
+ if (this.IndexData.Type==1) this.HQChart.UpdateWindowIndex(this.IndexData.WindowIndex);
147989
+ else if (this.IndexData.Type==2) this.HQChart.UpdateOverlayIndex(this.IndexData.Identify);
147990
+ }
147991
+ }
147992
+
147993
+
147994
+
147720
147995
 
147721
147996
  ///////////////////////////////////////////////////////////////////////////////////
147722
147997
  // 工作线程计算指标示例
@@ -147839,7 +148114,7 @@ function HQChartScriptWorker()
147839
148114
 
147840
148115
 
147841
148116
 
147842
- var HQCHART_VERSION="1.1.14083";
148117
+ var HQCHART_VERSION="1.1.14092";
147843
148118
 
147844
148119
  function PrintHQChartVersion()
147845
148120
  {