hqchart 1.1.12928 → 1.1.12939

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.
@@ -554,7 +554,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
554
554
  }
555
555
 
556
556
  //创建子窗口的指标
557
- let scriptData = new JSIndexScript();
557
+ var scriptData = new JSIndexScript();
558
558
 
559
559
  if (option.ColorIndex) //五彩K线
560
560
  {
@@ -609,27 +609,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
609
609
  }
610
610
  else
611
611
  {
612
+ var scriptData = new JSIndexScript();
612
613
  let indexInfo = scriptData.Get(item.Index);
613
614
  if (!indexInfo) continue;
614
-
615
- if (item.Lock) indexInfo.Lock=item.Lock;
615
+ JSIndexScript.ModifyAttribute(indexInfo, item);
616
616
  indexInfo.ID=item.Index;
617
- var args=indexInfo.Args;
618
- if (item.Args) args=item.Args;
619
- if (item.IsShortTitle) indexInfo.IsShortTitle=item.IsShortTitle;
620
- if (item.TitleFont) indexInfo.TitleFont=item.TitleFont;
621
- if (IFrameSplitOperator.IsBool(item.IsSync)) indexInfo.IsSync=item.IsSync;
622
- chart.WindowIndex[i] = new ScriptIndex(indexInfo.Name, indexInfo.Script, args,indexInfo); //脚本执行
617
+
618
+ chart.WindowIndex[i] = new ScriptIndex(indexInfo.Name, indexInfo.Script, indexInfo.Args,indexInfo); //脚本执行
623
619
  if (item.StringFormat>0) chart.WindowIndex[i].StringFormat=item.StringFormat;
624
620
  if (item.FloatPrecision>=0) chart.WindowIndex[i].FloatPrecision=item.FloatPrecision;
625
-
626
- if (item.YAxis)
627
- {
628
- if (!indexInfo.YAxis) indexInfo.YAxis={ };
629
- if (IFrameSplitOperator.IsNumber(item.YAxis.FloatPrecision)) indexInfo.YAxis.FloatPrecision=item.YAxis.FloatPrecision;
630
- if (IFrameSplitOperator.IsNumber(item.YAxis.StringFormat)) indexInfo.YAxis.StringFormat=item.YAxis.StringFormat;
631
- if (IFrameSplitOperator.IsBool(item.YAxis.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=item.YAxis.EnableRemoveZero;
632
- }
633
621
  }
634
622
 
635
623
  }
@@ -1463,7 +1451,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1463
1451
  if (IFrameSplitOperator.IsNonEmptyArray(option.Windows))
1464
1452
  {
1465
1453
  //创建子窗口的指标
1466
- let scriptData = new JSIndexScript();
1454
+
1467
1455
  for(var i=0;i<option.Windows.length;++i)
1468
1456
  {
1469
1457
  var item=option.Windows[i];
@@ -1481,6 +1469,7 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
1481
1469
  }
1482
1470
  else
1483
1471
  {
1472
+ var scriptData = new JSIndexScript();
1484
1473
  let indexInfo = scriptData.Get(item.Index);
1485
1474
  if (!indexInfo) continue;
1486
1475
 
@@ -8117,20 +8106,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8117
8106
  this.RemoveMinSizeWindows(); //清空隐藏的指标
8118
8107
  var index=this.AddNewSubFrame(option);
8119
8108
 
8120
- if (option)
8121
- {
8122
- if (option.FloatPrecision>=0) indexInfo.FloatPrecision=option.FloatPrecision;
8123
- if (option.StringFormat>0) indexInfo.StringFormat=option.StringFormat;
8124
- if (option.Args) indexInfo.Args=option.Args;
8125
- if (option.Lock) indexInfo.Lock=option.Lock;
8126
- if (option.YAxis)
8127
- {
8128
- indexInfo.YAxis={ };
8129
- if (IFrameSplitOperator.IsNumber(option.YAxis.FloatPrecision)) indexInfo.YAxis.FloatPrecision=option.YAxis.FloatPrecision;
8130
- if (IFrameSplitOperator.IsNumber(option.YAxis.StringFormat)) indexInfo.YAxis.StringFormat=option.YAxis.StringFormat;
8131
- if (IFrameSplitOperator.IsBool(option.YAxis.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=option.YAxis.EnableRemoveZero;
8132
- }
8133
- }
8109
+ JSIndexScript.ModifyAttribute(indexInfo, option);
8134
8110
 
8135
8111
  this.WindowIndex[index] = new ScriptIndex(indexInfo.Name, indexInfo.Script, indexInfo.Args,indexInfo); //脚本执行
8136
8112
  if (this.ClassName=="MinuteChartContainer" || this.ClassName=="MinuteChartHScreenContainer")
@@ -8280,6 +8256,45 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
8280
8256
  return paint.ClearPoint();
8281
8257
  }
8282
8258
 
8259
+ //删除指定窗口的所有叠加指标
8260
+ this.DeleteWindowsOverlayIndex=function(windowIndex)
8261
+ {
8262
+ if (!IFrameSplitOperator.IsNumber(windowIndex)) return;
8263
+ if (windowIndex<0 || windowIndex>=this.Frame.SubFrame.length) return;
8264
+
8265
+ var subFrame=this.Frame.SubFrame[windowIndex];
8266
+ if (!IFrameSplitOperator.IsNonEmptyArray(subFrame.OverlayIndex)) return;
8267
+
8268
+ var aryIndexID=[];
8269
+ for(var i=0; i<subFrame.OverlayIndex.length; ++i)
8270
+ {
8271
+ var overlayItem=subFrame.OverlayIndex[i];
8272
+ aryIndexID.push(overlayItem.Identify);
8273
+
8274
+ for(var j=0;j<overlayItem.ChartPaint.length;++j) //图形销毁事件
8275
+ {
8276
+ var overlayChart=overlayItem.ChartPaint[j];
8277
+ if (overlayChart && overlayChart.OnDestroy) overlayChart.OnDestroy();
8278
+ }
8279
+
8280
+ overlayItem.ChartPaint=[];
8281
+ }
8282
+
8283
+ subFrame.OverlayIndex=[];
8284
+
8285
+ var titlePaint=this.TitlePaint[windowIndex+1];
8286
+ for(var i=0;i<aryIndexID.length;++i)
8287
+ {
8288
+ var identify=aryIndexID[i];
8289
+
8290
+ if (titlePaint.OverlayIndex.has(identify))
8291
+ titlePaint.OverlayIndex.delete(identify);
8292
+
8293
+ if (titlePaint.OverlayDynamicTitle.has(identify))
8294
+ titlePaint.OverlayDynamicTitle.delete(identify);
8295
+ }
8296
+ }
8297
+
8283
8298
  //删除叠加指标, 没有重绘
8284
8299
  this.DeleteOverlayIndex=function(identify, windowIndex)
8285
8300
  {
@@ -17416,7 +17431,7 @@ function HQTradeFrame()
17416
17431
  if (IFrameSplitOperator.IsNumber(this.OverlayBlankWidth)) overlayItem.Frame.BlankWidth=this.OverlayBlankWidth;
17417
17432
 
17418
17433
  overlayItem.Frame.Draw();
17419
- rightOffset+=overlayItem.RightWidth.Width;
17434
+ if (overlayItem.RightWidth) rightOffset+=overlayItem.RightWidth.Width;
17420
17435
  if (overlayItem.Frame.IsShow) ++index;
17421
17436
  }
17422
17437
  }
@@ -43130,6 +43145,8 @@ function IFrameSplitOperator()
43130
43145
  {
43131
43146
 
43132
43147
  }
43148
+
43149
+ this.SetOption=function(option) { }
43133
43150
  }
43134
43151
 
43135
43152
  //字符串格式化 千分位分割
@@ -44396,7 +44413,7 @@ function FrameSplitY()
44396
44413
  this.DefaultSplitType=0;
44397
44414
  this.Custom=[]; //[{Type:0}]; 定制刻度
44398
44415
  this.DefaultYMaxMin; //{ Max:null, Min:null }; //指定最大,最小, Y轴范围必须比最大值大, 比最小值小
44399
- this.EnableRemoveZero=true;
44416
+ this.EnableRemoveZero=g_JSChartResource.Frame.EnableRemoveZero;
44400
44417
  this.LineType=null; //线段样式
44401
44418
  this.IgnoreYValue = null; //在这个数组里的数字不显示在刻度上
44402
44419
  this.FixedYMaxMin; //{ Max, Min} 固定Y轴最大最小值
@@ -44421,6 +44438,22 @@ function FrameSplitY()
44421
44438
  return true;
44422
44439
  }
44423
44440
 
44441
+
44442
+ this.Reset=function() //重置
44443
+ {
44444
+ this.EnableRemoveZero=g_JSChartResource.Frame.EnableRemoveZero;
44445
+ this.StringFormat=g_JSChartResource.Frame.StringFormat;
44446
+ }
44447
+
44448
+ this.SetOption=function(option)
44449
+ {
44450
+ if (!option) return;
44451
+
44452
+ if (IFrameSplitOperator.IsNumber(option.FloatPrecision)) this.FloatPrecision=option.FloatPrecision;
44453
+ if (IFrameSplitOperator.IsNumber(option.StringFormat)) this.StringFormat=option.StringFormat;
44454
+ if (IFrameSplitOperator.IsBool(option.EnableRemoveZero)) this.EnableRemoveZero=option.EnableRemoveZero;
44455
+ }
44456
+
44424
44457
  this.GetFloatPrecision=function(value,floatPrecision)
44425
44458
  {
44426
44459
  if (value>this.FLOATPRECISION_RANGE[0]) return floatPrecision;
@@ -61832,7 +61865,9 @@ function JSChartResource()
61832
61865
  this.Frame={
61833
61866
  XBottomOffset:2*GetDevicePixelRatio(), //X轴文字向下偏移
61834
61867
  YTopOffset:2*GetDevicePixelRatio(), //Y轴顶部文字向下偏移
61835
- YTextPadding:[2,2]
61868
+ YTextPadding:[2,2],
61869
+ EnableRemoveZero:true, //移除小数点后面的0
61870
+ StringFormat:0
61836
61871
  };
61837
61872
  this.ToolbarButtonStyle=0;
61838
61873
 
@@ -67861,18 +67896,9 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
67861
67896
  {
67862
67897
  if (windowIndex == 0) windowIndex = 1; //幅图指标,不能再主图显示
67863
67898
  }
67864
- let indexData = indexInfo;
67865
- if (option)
67866
- {
67867
- if (option.FloatPrecision>=0) indexData.FloatPrecision=option.FloatPrecision;
67868
- if (option.StringFormat>0) indexData.StringFormat=option.StringFormat;
67869
- if (option.Args) indexData.Args=option.Args;
67870
- if (option.TitleFont) indexData.TitleFont=option.TitleFont;
67871
- if (option.IsShortTitle) indexData.IsShortTitle=option.IsShortTitle;
67872
- if (option.Lock) indexData.Lock=option.Lock;
67873
- }
67874
-
67875
- return this.ChangeScriptIndex(windowIndex, indexData,option);
67899
+
67900
+ JSIndexScript.ModifyAttribute(indexInfo, option)
67901
+ return this.ChangeScriptIndex(windowIndex, indexInfo, option);
67876
67902
  }
67877
67903
 
67878
67904
  //主图指标
@@ -68018,18 +68044,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68018
68044
  }
68019
68045
  else if (indexInfo)
68020
68046
  {
68021
- if (obj.Args) indexInfo.Args=obj.Args; //外部可以设置参数
68022
- if (IFrameSplitOperator.IsNumber(obj.FloatPrecision)) indexInfo.FloatPrecision=obj.FloatPrecision;
68023
- if (IFrameSplitOperator.IsNumber(obj.StringFormat)) indexInfo.StringFormat=obj.StringFormat;
68024
- if (IFrameSplitOperator.IsBool(obj.IsSync)) indexInfo.IsSync=obj.IsSync;
68025
- if (obj.YAxis)
68026
- {
68027
- if (!indexInfo.YAxis) indexInfo.YAxis={ };
68028
- if (IFrameSplitOperator.IsNumber(obj.YAxis.FloatPrecision)) indexInfo.YAxis.FloatPrecision=obj.YAxis.FloatPrecision;
68029
- if (IFrameSplitOperator.IsNumber(obj.YAxis.StringFormat)) indexInfo.YAxis.StringFormat=obj.YAxis.StringFormat;
68030
- if (IFrameSplitOperator.IsBool(obj.YAxis.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=obj.YAxis.EnableRemoveZero;
68031
- }
68032
-
68047
+ JSIndexScript.ModifyAttribute(indexInfo, obj);
68033
68048
  var scriptIndex=new OverlayScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
68034
68049
  scriptIndex.OverlayIndex={ IsOverlay:true, Identify:overlayFrame.Identify, WindowIndex:windowIndex, Frame:overlayFrame }; //叠加指标信息
68035
68050
  overlayFrame.Script=scriptIndex;
@@ -68313,14 +68328,15 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68313
68328
  if (count<=0) return;
68314
68329
  var currentLength=this.Frame.SubFrame.length;
68315
68330
 
68316
- var period=null, right=null;
68331
+ var period=null, right=null, symbol=null;
68332
+ if (option.Symbol) symbol=option.Symbol;
68317
68333
  if (option.KLine)
68318
68334
  {
68319
68335
  if (IFrameSplitOperator.IsNumber(option.KLine.Period) && option.KLine.Period!=this.Period) period=option.KLine.Period; //周期
68320
68336
  if (IFrameSplitOperator.IsNumber(option.KLine.Right) && option.KLine.Right!=this.Right) right=option.KLine.Right; //复权
68321
68337
  }
68322
68338
 
68323
- var bRefreshData= (period!=null || right!=null);
68339
+ var bRefreshData= (period!=null || right!=null || symbol!=null);
68324
68340
 
68325
68341
  //清空所有的指标图型
68326
68342
  for(var i=0;i<currentLength;++i)
@@ -68348,6 +68364,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68348
68364
 
68349
68365
  this.Frame.SubFrame.splice(count,currentLength-count);
68350
68366
  this.WindowIndex.splice(count,currentLength-count);
68367
+ this.TitlePaint.splice(count+1,currentLength-count);
68351
68368
  }
68352
68369
  else
68353
68370
  {
@@ -68364,8 +68381,7 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68364
68381
  this.TitlePaint[i+1]=titlePaint;
68365
68382
  }
68366
68383
  }
68367
-
68368
- var systemScript = new JSIndexScript();
68384
+
68369
68385
  for(var i=0;i<count;++i)
68370
68386
  {
68371
68387
  var windowIndex=i;
@@ -68375,7 +68391,10 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68375
68391
  var titleIndex=windowIndex+1;
68376
68392
  this.TitlePaint[titleIndex].Data=[];
68377
68393
  this.TitlePaint[titleIndex].Title=null;
68394
+ var frame=this.Frame.SubFrame[i];
68378
68395
 
68396
+ this.DeleteWindowsOverlayIndex(i); //清空叠加指标
68397
+
68379
68398
  if (item.Script) //自定义指标脚本
68380
68399
  {
68381
68400
  this.WindowIndex[i]=new ScriptIndex(item.Name,item.Script,item.Args,item); //脚本执行
@@ -68396,28 +68415,17 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68396
68415
  }
68397
68416
  else
68398
68417
  {
68418
+ var systemScript = new JSIndexScript();
68399
68419
  var indexInfo = systemScript.Get(indexID);
68400
68420
  if (indexInfo)
68401
68421
  {
68402
- var args=indexInfo.Args;
68403
- if (option.Windows[i].Args) args=option.Windows[i].Args;
68404
- if (item.TitleFont) indexInfo.TitleFont=item.TitleFont;
68405
- if (item.IsShortTitle) indexInfo.IsShortTitle=item.IsShortTitle;
68406
- if (IFrameSplitOperator.IsBool(item.IsSync)) indexInfo.IsSync=item.IsSync;
68407
-
68408
- if (item.YAxis)
68409
- {
68410
- if (!indexInfo.YAxis) indexInfo.YAxis={ };
68411
- if (IFrameSplitOperator.IsNumber(item.YAxis.FloatPrecision)) indexInfo.YAxis.FloatPrecision=item.YAxis.FloatPrecision;
68412
- if (IFrameSplitOperator.IsNumber(item.YAxis.StringFormat)) indexInfo.YAxis.StringFormat=item.YAxis.StringFormat;
68413
- }
68414
-
68415
- this.WindowIndex[i]=new ScriptIndex(indexInfo.Name,indexInfo.Script,args,indexInfo); //脚本执行
68422
+ JSIndexScript.ModifyAttribute(indexInfo,item);
68423
+ this.WindowIndex[i]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
68416
68424
  }
68417
68425
  }
68418
68426
  }
68419
68427
 
68420
- this.SetSubFrameAttribute(this.Frame.SubFrame[i], item, frameItem);
68428
+ this.SetSubFrameAttribute(frame, item, frameItem);
68421
68429
  }
68422
68430
 
68423
68431
  //最后一个显示X轴坐标
@@ -68428,6 +68436,23 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68428
68436
  else item.XSplitOperator.ShowText=false;
68429
68437
  }
68430
68438
 
68439
+ //叠加指标
68440
+ var aryOverlayIndex=[];
68441
+ if (IFrameSplitOperator.IsNonEmptyArray(option.OverlayIndex))
68442
+ {
68443
+ for(var i=0;i<option.OverlayIndex.length;++i)
68444
+ {
68445
+ var item=option.OverlayIndex[i];
68446
+ if (item.Index) item.IndexName=item.Index;
68447
+ if (item.Windows>=0) item.WindowIndex=item.Windows;
68448
+
68449
+ var overlay=this.CreateOverlayWindowsIndex(item);
68450
+ if (!overlay) continue;
68451
+
68452
+ aryOverlayIndex.push(overlay);
68453
+ }
68454
+ }
68455
+
68431
68456
  if (!bRefreshData)
68432
68457
  {
68433
68458
  var bindData=this.ChartPaint[0].Data;
@@ -68436,6 +68461,12 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68436
68461
  this.BindIndexData(i,bindData);
68437
68462
  }
68438
68463
 
68464
+ for(var i=0;i<aryOverlayIndex.length;++i)
68465
+ {
68466
+ var item=aryOverlayIndex[i];
68467
+ this.BindOverlayIndexData(item,item.WindowIndex,bindData);
68468
+ }
68469
+
68439
68470
  this.UpdataDataoffset(); //更新数据偏移
68440
68471
  this.Frame.SetSizeChage(true);
68441
68472
  this.ResetFrameXYSplit();
@@ -68444,9 +68475,13 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68444
68475
  }
68445
68476
  else
68446
68477
  {
68447
- this.Frame.SetSizeChage(true);
68448
- if (period!=null) this.ChangePeriod(period, option);
68449
- else if (right!=null) this.ChangeRight(right);
68478
+ if (!symbol) symbol=this.Symbol;
68479
+
68480
+ var optionData={ KLine:{} };
68481
+ if (IFrameSplitOperator.IsNumber(period)) optionData.KLine.Period=period;
68482
+ if (IFrameSplitOperator.IsNumber(right)) optionData.KLine.Right=right;
68483
+
68484
+ this.ChangeSymbol(symbol, optionData);
68450
68485
  }
68451
68486
  }
68452
68487
 
@@ -68891,11 +68926,11 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68891
68926
 
68892
68927
  if (option)
68893
68928
  {
68894
- if (option.Windows && Array.isArray(option.Windows) && option.Windows.length>0)
68929
+ if (IFrameSplitOperator.IsNonEmptyArray(option.Windows))
68895
68930
  {
68896
68931
  var windows=option.Windows;
68897
- var systemScript = new JSIndexScript();
68898
- for(var i in windows)
68932
+
68933
+ for(var i=0; i<windows.length; ++i)
68899
68934
  {
68900
68935
  if (i>=this.WindowIndex.length) break; //暂时不支持 动态增加/减少
68901
68936
  var item=windows[i];
@@ -68913,11 +68948,11 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
68913
68948
  else
68914
68949
  {
68915
68950
  var indexID=item.Index;
68951
+ var systemScript = new JSIndexScript();
68916
68952
  var indexInfo = systemScript.Get(indexID);
68917
68953
  if (indexInfo)
68918
68954
  {
68919
- var args=indexInfo.Args;
68920
- if (item.Args) indexInfo.Args=item.Args;
68955
+ JSIndexScript.ModifyAttribute(indexInfo,item);
68921
68956
  indexInfo.ID=indexID;
68922
68957
  this.WindowIndex[i]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
68923
68958
  }
@@ -73666,25 +73701,9 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
73666
73701
  if (windowIndex<2) windowIndex=2;
73667
73702
  if (windowIndex>=this.Frame.SubFrame.length) windowIndex=2;
73668
73703
 
73669
- let indexData =
73670
- {
73671
- Name:indexInfo.Name, Script:indexInfo.Script, Args: indexInfo.Args, ID:indexName ,
73672
- //扩展属性 可以是空
73673
- KLineType:indexInfo.KLineType, YSpecificMaxMin:indexInfo.YSpecificMaxMin, YSplitScale:indexInfo.YSplitScale,
73674
- FloatPrecision:indexInfo.FloatPrecision, Condition:indexInfo.Condition,StringFormat:indexInfo.StringFormat,
73675
- OutName:indexInfo.OutName
73676
- };
73704
+ JSIndexScript.ModifyAttribute(indexInfo, option)
73677
73705
 
73678
- if (option)
73679
- {
73680
- if (option.FloatPrecision>=0) indexData.FloatPrecision=option.FloatPrecision;
73681
- if (option.StringFormat>0) indexData.StringFormat=option.StringFormat;
73682
- if (option.Args) indexData.Args=option.Args;
73683
- if (IFrameSplitOperator.IsNumber(option.YSplitType)) indexData.YSplitType=option.YSplitType;
73684
- if (option.Lock) indexData.Lock=option.Lock;
73685
- }
73686
-
73687
- return this.ChangeScriptIndex(windowIndex, indexData,option);
73706
+ return this.ChangeScriptIndex(windowIndex, indexInfo, option);
73688
73707
  }
73689
73708
 
73690
73709
  //设置指标窗口个数
@@ -73815,7 +73834,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
73815
73834
  }
73816
73835
  }
73817
73836
 
73818
- var systemScript = new JSIndexScript();
73837
+
73819
73838
 
73820
73839
  for(var i=0;i<count;++i)
73821
73840
  {
@@ -73850,22 +73869,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
73850
73869
  }
73851
73870
  else
73852
73871
  {
73872
+ var systemScript = new JSIndexScript();
73853
73873
  var indexInfo = systemScript.Get(indexID);
73854
73874
  if (indexInfo)
73855
73875
  {
73856
- var args=indexInfo.Args;
73857
- if (item.Args) args=item.Args;
73858
- let indexData =
73859
- {
73860
- Name:indexInfo.Name, Script:indexInfo.Script, Args: args, ID:indexID ,
73861
- //扩展属性 可以是空
73862
- KLineType:indexInfo.KLineType, YSpecificMaxMin:indexInfo.YSpecificMaxMin, YSplitScale:indexInfo.YSplitScale,
73863
- FloatPrecision:indexInfo.FloatPrecision, Condition:indexInfo.Condition,
73864
- OutName:indexInfo.OutName
73865
- };
73866
- if (item.TitleFont) indexData.TitleFont=item.TitleFont;
73867
-
73868
- this.WindowIndex[windowIndex]=new ScriptIndex(indexData.Name,indexData.Script,indexData.Args,indexData); //脚本执行
73876
+ JSIndexScript.ModifyAttribute(indexInfo,item);
73877
+ this.WindowIndex[windowIndex]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
73869
73878
  }
73870
73879
  }
73871
73880
  }
@@ -74063,7 +74072,7 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
74063
74072
 
74064
74073
  if (IFrameSplitOperator.IsNonEmptyArray(option.Windows)) //切换指标
74065
74074
  {
74066
- var systemScript = new JSIndexScript();
74075
+
74067
74076
  for(var i=0; i<option.Windows.length; ++i)
74068
74077
  {
74069
74078
  var index=2+i;
@@ -74083,12 +74092,12 @@ function MinuteChartContainer(uielement,offscreenElement,cacheElement)
74083
74092
  }
74084
74093
  else
74085
74094
  {
74095
+ var systemScript = new JSIndexScript();
74086
74096
  var indexID=item.Index;
74087
74097
  var indexInfo = systemScript.Get(indexID);
74088
74098
  if (indexInfo)
74089
74099
  {
74090
- var args=indexInfo.Args;
74091
- if (item.Args) indexInfo.Args=item.Args;
74100
+ JSIndexScript.ModifyAttribute(indexInfo,item);
74092
74101
  indexInfo.ID=indexID;
74093
74102
  this.WindowIndex[index]=new ScriptIndex(indexInfo.Name,indexInfo.Script,indexInfo.Args,indexInfo); //脚本执行
74094
74103
  }