hqchart 1.1.14670 → 1.1.14683

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.
@@ -7608,7 +7608,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
7608
7608
 
7609
7609
  this.DestroyDialogModifyIndexParam=function()
7610
7610
  {
7611
- if (this.DialogModifyIndexParam) return;
7611
+ if (!this.DialogModifyIndexParam) return;
7612
7612
 
7613
7613
  this.DialogModifyIndexParam.Destroy();
7614
7614
  this.DialogModifyIndexParam=null;
@@ -15942,7 +15942,7 @@ function CoordinateInfo()
15942
15942
  //不在当前屏范围 (可定义刻度使用)
15943
15943
  //this.OutRange={ BGColor:"", TextColor:, BorderColor: TopYOffset:, BottomYOffset: }
15944
15944
  //Y轴文字偏移
15945
- //this.YOffset=[{ Offset:5}, { Offset:10}] //目前只对框子外的刻度文字生效
15945
+ //this.YOffset=[{ Offset:5}, { Offset:10} ] //目前只对框子外的刻度文字生效 0=外左 1=外右 2=内左 3=内右
15946
15946
  }
15947
15947
 
15948
15948
 
@@ -17652,10 +17652,18 @@ function AverageWidthFrame()
17652
17652
  this.Canvas.textBaseline = "middle";
17653
17653
  }
17654
17654
 
17655
- var textObj={ X:left, Y:yText, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[0]}} ;
17655
+ var yOffset=0;
17656
+ if (IFrameSplitOperator.IsNonEmptyArray(item.YOffset)) //文字Y轴偏移
17657
+ {
17658
+ var offsetItem=item.YOffset[2];
17659
+ if (offsetItem && IFrameSplitOperator.IsNumber(offsetItem.Offset))
17660
+ yOffset=offsetItem.Offset;
17661
+ }
17662
+
17663
+ var textObj={ X:left, Y:yText+yOffset, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[0]}} ;
17656
17664
  if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
17657
17665
  {
17658
- this.Canvas.fillText(item.Message[2], left + 1*pixelTatio, yText);
17666
+ this.Canvas.fillText(item.Message[2], left + 1*pixelTatio, yText+yOffset);
17659
17667
  if (yInsideText==null || yInsideText>yText)
17660
17668
  {
17661
17669
  this.YInsideOffset=this.Canvas.measureText(item.Message[2]).width+4*GetDevicePixelRatio();
@@ -17684,10 +17692,19 @@ function AverageWidthFrame()
17684
17692
  {
17685
17693
  this.Canvas.textBaseline = "middle";
17686
17694
  }
17695
+
17696
+ var yOffset=0;
17697
+ if (IFrameSplitOperator.IsNonEmptyArray(item.YOffset)) //文字Y轴偏移
17698
+ {
17699
+ var offsetItem=item.YOffset[3];
17700
+ if (offsetItem && IFrameSplitOperator.IsNumber(offsetItem.Offset))
17701
+ yOffset=offsetItem.Offset;
17702
+ }
17703
+
17687
17704
  var textWidth = this.Canvas.measureText(item.Message[3]).width;
17688
- var textObj={ X:right-textWidth, Y:yText, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
17705
+ var textObj={ X:right-textWidth, Y:yText+yOffset, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
17689
17706
  if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
17690
- this.Canvas.fillText(item.Message[3], right - 1*pixelTatio, yText);
17707
+ this.Canvas.fillText(item.Message[3], right - 1*pixelTatio, yText+yOffset);
17691
17708
  }
17692
17709
  yPrev = y;
17693
17710
  }
@@ -17750,10 +17767,18 @@ function AverageWidthFrame()
17750
17767
  else this.Canvas.textBaseline = "middle";
17751
17768
  }
17752
17769
 
17753
- var textObj={ X:left, Y:yText, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[0]}} ;
17770
+ var yOffset=0;
17771
+ if (IFrameSplitOperator.IsNonEmptyArray(item.YOffset)) //文字Y轴偏移
17772
+ {
17773
+ var offsetItem=item.YOffset[0];
17774
+ if (offsetItem && IFrameSplitOperator.IsNumber(offsetItem.Offset))
17775
+ yOffset=offsetItem.Offset;
17776
+ }
17777
+
17778
+ var textObj={ X:left, Y:yText+yOffset, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[0]}} ;
17754
17779
  if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
17755
17780
  {
17756
- this.Canvas.fillText(item.Message[0], left + 1*pixelTatio, yText);
17781
+ this.Canvas.fillText(item.Message[0], left + 1*pixelTatio, yText+yOffset);
17757
17782
  if (yInsideText==null || yInsideText>yText)
17758
17783
  {
17759
17784
  this.YInsideOffset=this.Canvas.measureText(item.Message[0]).width+4*GetDevicePixelRatio();
@@ -17788,10 +17813,18 @@ function AverageWidthFrame()
17788
17813
  if (Array.isArray(item.Message[1])) var text=item.Message[1][0];
17789
17814
  else var text=item.Message[1];
17790
17815
 
17816
+ var yOffset=0;
17817
+ if (IFrameSplitOperator.IsNonEmptyArray(item.YOffset)) //文字Y轴偏移
17818
+ {
17819
+ var offsetItem=item.YOffset[1];
17820
+ if (offsetItem && IFrameSplitOperator.IsNumber(offsetItem.Offset))
17821
+ yOffset=offsetItem.Offset;
17822
+ }
17823
+
17791
17824
  var textWidth = this.Canvas.measureText(text).width;
17792
- var textObj={ X:right-textWidth, Y:yText, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
17825
+ var textObj={ X:right-textWidth, Y:yText+yOffset, Text:{ BaseLine:this.Canvas.textBaseline, TextAlign: this.Canvas.textAlign, Font:this.Canvas.font, Value:item.Message[1]}} ;
17793
17826
  if (!this.IsOverlayMaxMin || !this.IsOverlayMaxMin(textObj))
17794
- this.Canvas.fillText(text, right - 1*pixelTatio, yText);
17827
+ this.Canvas.fillText(text, right - 1*pixelTatio, yText+yOffset);
17795
17828
  }
17796
17829
  yPrev = y;
17797
17830
  }
@@ -29796,7 +29829,7 @@ function IChartPainting()
29796
29829
  if (isHScreen==true)
29797
29830
  {
29798
29831
  var left=this.ChartBorder.GetLeftEx();
29799
- var right=this.ChartBorder.GetRightEx();
29832
+ var right=this.ChartBorder.GetRightEx()+1;
29800
29833
  var top=this.ChartBorder.GetTop();
29801
29834
  var bottom=this.ChartBorder.GetBottom();
29802
29835
  }
@@ -29804,7 +29837,7 @@ function IChartPainting()
29804
29837
  {
29805
29838
  var left=this.ChartBorder.GetLeft();
29806
29839
  var right=this.ChartBorder.GetRight();
29807
- var top=this.ChartBorder.GetTopEx();
29840
+ var top=this.ChartBorder.GetTopEx()-1;
29808
29841
  var bottom=this.ChartBorder.GetBottomEx();
29809
29842
  }
29810
29843
 
@@ -30739,7 +30772,8 @@ function ChartKLine()
30739
30772
  this.DaySummaryConfig=
30740
30773
  {
30741
30774
  Font: g_JSChartResource.DaySummaryKLine.Font,
30742
- TextColor: g_JSChartResource.DaySummaryKLine.TextColor
30775
+ TextColor: g_JSChartResource.DaySummaryKLine.TextColor,
30776
+ LeftMargin:g_JSChartResource.DaySummaryKLine.LeftMargin,
30743
30777
  }
30744
30778
 
30745
30779
  this.AddToDaySummary=function(kItem)
@@ -30821,7 +30855,8 @@ function ChartKLine()
30821
30855
  this.DaySummaryConfig=
30822
30856
  {
30823
30857
  Font: g_JSChartResource.DaySummaryKLine.Font,
30824
- TextColor: g_JSChartResource.DaySummaryKLine.TextColor
30858
+ TextColor: g_JSChartResource.DaySummaryKLine.TextColor,
30859
+ LeftMargin:g_JSChartResource.DaySummaryKLine.LeftMargin,
30825
30860
  }
30826
30861
 
30827
30862
  }
@@ -30925,6 +30960,7 @@ function ChartKLine()
30925
30960
  var yOpen=this.GetYFromData(data.Open,false);
30926
30961
  var yClose=this.GetYFromData(data.Close,false);
30927
30962
  this.DrawKRange.End=i;
30963
+ this.AddToDaySummary(data);
30928
30964
 
30929
30965
  var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yOpen, Left:left, Right:right }};
30930
30966
 
@@ -31208,6 +31244,7 @@ function ChartKLine()
31208
31244
  var x=left+(right-left)/2;
31209
31245
  var yClose=this.GetYFromData(data.Close,false);
31210
31246
  this.DrawKRange.End=i;
31247
+ this.AddToDaySummary(data);
31211
31248
 
31212
31249
  if (data.IsVirtual && this.PredictionConfig.Enable) //预测数据|虚拟数据
31213
31250
  {
@@ -31351,6 +31388,7 @@ function ChartKLine()
31351
31388
  var x=left+(right-left)/2;
31352
31389
  var yClose=this.GetYFromData(data.Close,false);
31353
31390
  this.DrawKRange.End=i;
31391
+ this.AddToDaySummary(data);
31354
31392
 
31355
31393
  if (data.IsVirtual && this.PredictionConfig.Enable) //预测数据|虚拟数据
31356
31394
  {
@@ -31455,7 +31493,7 @@ function ChartKLine()
31455
31493
  this.ShowRange.End=i;
31456
31494
  if (!data || data.Open==null || data.High==null || data.Low==null || data.Close==null) continue;
31457
31495
 
31458
- this.AddToDaySummary(data);
31496
+
31459
31497
 
31460
31498
  var left=xOffset;
31461
31499
  var right=xOffset+dataWidth;
@@ -31469,6 +31507,7 @@ function ChartKLine()
31469
31507
 
31470
31508
  var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yOpen, Left:left, Right:right }};
31471
31509
 
31510
+ this.AddToDaySummary(data);
31472
31511
  this.DrawKRange.End=i;
31473
31512
  if (ptMax.Value==null || ptMax.Value<data.High) //求最大值
31474
31513
  {
@@ -35775,7 +35814,7 @@ function ChartKLine()
35775
35814
  this.Canvas.textBaseline = 'bottom';
35776
35815
 
35777
35816
  var border=this.ChartBorder.GetBorder();
35778
- var xText=border.Left+1;
35817
+ var xText=border.Left+this.DaySummaryConfig.LeftMargin;
35779
35818
  var yText=border.Bottom;
35780
35819
 
35781
35820
  var textSize=GetTextSize(this.Canvas,text);
@@ -39077,6 +39116,32 @@ function ChartIndexTitle()
39077
39116
  delete this.newMethod;
39078
39117
 
39079
39118
  this.ClassName='ChartIndexTitle'; //类名
39119
+ this.AryTitle=[]; //{ Date, Time, AryText:[ ] }
39120
+ this.MapCache=null; //key=date/date-time value={ Data:[] }
39121
+
39122
+ this.BuildCacheData=function()
39123
+ {
39124
+ var mapData=new Map();
39125
+ this.MapCache=mapData;
39126
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.AryTitle)) return;
39127
+
39128
+ for(var i=0;i<this.AryTitle.length;++i)
39129
+ {
39130
+ var item=this.AryTitle[i];
39131
+ var key=this.BuildKey(item);
39132
+
39133
+ mapData.set(key,{ Data:item });
39134
+ }
39135
+ }
39136
+
39137
+ this.GetItem=function(kItem)
39138
+ {
39139
+ if (!this.MapCache || this.MapCache.size<=0) return null;
39140
+ var key=this.BuildKey(kItem);
39141
+ if (!this.MapCache.has(key)) return null;
39142
+
39143
+ return this.MapCache.get(key);
39144
+ }
39080
39145
 
39081
39146
  this.Draw=function()
39082
39147
  {
@@ -59969,44 +60034,39 @@ function ChartCorssCursor()
59969
60034
  var textSize={ Width:textWidth+4, Height:this.TextHeight, Text:[] };
59970
60035
  var buttonData={Y:y, YValue:yValue, FrameID:yValueExtend.FrameID };
59971
60036
 
59972
- if (this.Frame.ChartBorder.Left>=30) //左边
60037
+ var margin=this.LeftConfig.Margin;
60038
+ var textOffset=this.LeftConfig.TextOffset;
60039
+ var rtBG=null;
60040
+ if (this.Frame.ChartBorder.Left>=30 && this.ShowTextMode.Left==1) //左边
59973
60041
  {
59974
- var margin=this.LeftConfig.Margin;
59975
- var textOffset=this.LeftConfig.TextOffset;
59976
-
59977
- var rtBG=null;
59978
- if (this.ShowTextMode.Left==1)
59979
- {
59980
- var rtBG={ Right:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
59981
- rtBG.Left=rtBG.Right-rtBG.Width;
59982
- rtBG.Top=rtBG.YCenter-rtBG.Height/2;
59983
- rtBG.Bottom=rtBG.Top+rtBG.Height;
60042
+ var rtBG={ Right:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
60043
+ rtBG.Left=rtBG.Right-rtBG.Width;
60044
+ rtBG.Top=rtBG.YCenter-rtBG.Height/2;
60045
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
59984
60046
 
59985
- if (rtBG.Left<0)
59986
- {
59987
- rtBG.Left=0;
59988
- rtBG.Right=rtBG.Left+rtBG.Width;
59989
- }
59990
- }
59991
- else if (this.ShowTextMode.Left==2) //在框架内显示
60047
+ if (rtBG.Left<0)
59992
60048
  {
59993
- var rtBG={ Left:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
60049
+ rtBG.Left=0;
59994
60050
  rtBG.Right=rtBG.Left+rtBG.Width;
59995
- rtBG.Top=rtBG.YCenter-rtBG.Height/2;
59996
- rtBG.Bottom=rtBG.Top+rtBG.Height;
59997
- }
59998
-
59999
- if (rtBG)
60000
- {
60001
- this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
60002
- this.Canvas.textAlign="left";
60003
- this.Canvas.textBaseline="bottom";
60004
- this.Canvas.fillStyle=this.TextColor;
60005
- this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
60006
60051
  }
60052
+
60053
+ }
60054
+ else if (this.ShowTextMode.Left==2) //在框架内显示
60055
+ {
60056
+ var rtBG={ Left:left, Width:textWidth+margin.Left+margin.Right, YCenter:y, Height:textHeight+margin.Top+margin.Bottom };
60057
+ rtBG.Right=rtBG.Left+rtBG.Width;
60058
+ rtBG.Top=rtBG.YCenter-rtBG.Height/2;
60059
+ rtBG.Bottom=rtBG.Top+rtBG.Height;
60007
60060
  }
60008
60061
 
60009
-
60062
+ if (rtBG)
60063
+ {
60064
+ this.DrawTextBGRect(rtBG.Left,rtBG.Top,rtBG.Width,rtBG.Height);
60065
+ this.Canvas.textAlign="left";
60066
+ this.Canvas.textBaseline="bottom";
60067
+ this.Canvas.fillStyle=this.TextColor;
60068
+ this.Canvas.fillText(text,rtBG.Left+textOffset.X, rtBG.Bottom+textOffset.Y);
60069
+ }
60010
60070
 
60011
60071
  var complexText=
60012
60072
  {
@@ -60196,7 +60256,7 @@ function ChartCorssCursor()
60196
60256
  this.Canvas.textBaseline="bottom";
60197
60257
  this.Canvas.fillStyle=this.TextColor;
60198
60258
  this.Canvas.fillText(text,rtBG.Left+textOffset.X,rtBG.Bottom+textOffset.Y,textWidth);
60199
- }
60259
+ }
60200
60260
  }
60201
60261
 
60202
60262
  //子坐标Y轴
@@ -64171,33 +64231,40 @@ function DynamicChartTitlePainting()
64171
64231
  return aryText;
64172
64232
  }
64173
64233
 
64174
- this.FormatIndexTitle=function(value, dataInfo)
64234
+ this.FormatIndexTitle=function(kItem, dataInfo)
64175
64235
  {
64176
- if (!value) return null;
64236
+ var result=null;
64237
+ var aryText=[];
64238
+ if (dataInfo.Name)
64239
+ {
64240
+ aryText.push({ Text:dataInfo.Name, Color:dataInfo.Color});
64241
+ result={ Text:null, ArrayText:aryText };
64242
+ }
64177
64243
 
64178
- if (IFrameSplitOperator.IsString(value)) return { Text:value, ArrayText:null };
64244
+ if (!kItem) return result;
64245
+ if (!dataInfo.Chart) return result;
64246
+
64247
+ var titleItem=dataInfo.Chart.GetItem(kItem);
64248
+ if (!titleItem || !titleItem.Data) return result;
64249
+ if (!IFrameSplitOperator.IsNonEmptyArray(titleItem.Data.AryText)) return result;
64179
64250
 
64180
- if (IFrameSplitOperator.IsNonEmptyArray(value))
64251
+ if (!result) result={ Text:null, ArrayText:aryText };
64252
+
64253
+ for(var i=0;i<titleItem.Data.AryText.length;++i)
64181
64254
  {
64182
- var aryText=[];
64183
- for(var i=0;i<value.length;++i)
64184
- {
64185
- var item=value[i];
64186
- if (!item) continue;
64187
-
64188
- var textItem={ Name:null, Text:null };
64189
- if (item.Name) textItem.Name=item.Name;
64190
- if (item.Text) textItem.Text=item.Text;
64191
- if (item.Color) textItem.Color=item.Color;
64192
- if (IFrameSplitOperator.IsNumber(item.LeftSpace)) textItem.LeftSpace=item.LeftSpace;
64255
+ var item=titleItem.Data.AryText[i];
64256
+ if (!item) continue;
64193
64257
 
64194
- aryText.push(textItem);
64195
- }
64258
+ var textItem={ Name:null, Text:null };
64259
+ if (item.Name) textItem.Name=item.Name;
64260
+ if (item.Text) textItem.Text=item.Text;
64261
+ if (item.Color) textItem.Color=item.Color;
64262
+ if (IFrameSplitOperator.IsNumber(item.LeftSpace)) textItem.LeftSpace=item.LeftSpace;
64196
64263
 
64197
- return { Text:null, ArrayText:aryText }
64264
+ aryText.push(textItem);
64198
64265
  }
64199
64266
 
64200
- return null;
64267
+ return result;
64201
64268
  }
64202
64269
 
64203
64270
  this.GetColor=function(price,yClose)
@@ -77918,7 +77985,8 @@ function JSChartResource()
77918
77985
  this.DaySummaryKLine=
77919
77986
  {
77920
77987
  Font:`${12*GetDevicePixelRatio()}px 微软雅黑`,
77921
- TextColor:"rgb(105,105,105)"
77988
+ TextColor:"rgb(105,105,105)",
77989
+ LeftMargin:2*GetDevicePixelRatio(),
77922
77990
  }
77923
77991
 
77924
77992
  //订单流配置
@@ -79378,6 +79446,7 @@ function JSChartResource()
79378
79446
  var dest=this.DaySummaryKLine;
79379
79447
  if (item.Font) dest.Font=item.Font;
79380
79448
  if (item.TextColor) dest.TextColor=item.TextColor;
79449
+ if (IFrameSplitOperator.IsNumber(item.LeftMargin)) dest.LeftMargin=item.LeftMargin;
79381
79450
  }
79382
79451
 
79383
79452
  if (style.Index)
@@ -125732,13 +125801,16 @@ function ScriptIndex(name,script,args,option)
125732
125801
  chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
125733
125802
  chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
125734
125803
  chart.Identify=this.Guid;
125804
+ chart.Data=hqChart.GetKData(); //绑定K线
125735
125805
  if (varItem.Color) chart.Color=this.GetColor(varItem.Color);
125736
125806
  else chart.Color=this.GetDefaultColor(id);
125737
- chart.Data.Data=varItem.Data;
125807
+ chart.AryTitle=varItem.Draw.DrawData.AryTitle;
125808
+ chart.BuildCacheData();
125738
125809
 
125739
125810
  var titleIndex=windowIndex+1;
125740
125811
  var titleData=new DynamicTitleData(chart.Data,varItem.Name,chart.Color);
125741
125812
  titleData.DataType="ChartIndexTitle";
125813
+ titleData.Chart=chart;
125742
125814
  hqChart.TitlePaint[titleIndex].Data[id]=titleData;
125743
125815
 
125744
125816
  this.SetChartIndexName(chart);
@@ -127556,6 +127628,9 @@ function ScriptIndex(name,script,args,option)
127556
127628
  case "DRAWSVG":
127557
127629
  this.CreateChartDrawSVG(hqChart,windowIndex,item,i);
127558
127630
  break;
127631
+ case "DRAWTITLE":
127632
+ this.CreateTitle(hqChart,windowIndex,item,i);
127633
+ break;
127559
127634
  case "MULTI_HTMLDOM":
127560
127635
  this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
127561
127636
  break;
@@ -127649,11 +127724,7 @@ function ScriptIndex(name,script,args,option)
127649
127724
  {
127650
127725
  this.CreateArea(hqChart,windowIndex,item,i);
127651
127726
  }
127652
- else if (item.Type==10) //标题
127653
- {
127654
- this.CreateTitle(hqChart,windowIndex,item,i);
127655
- }
127656
-
127727
+
127657
127728
  var titlePaint=hqChart.TitlePaint[windowIndex+1];
127658
127729
  if (titlePaint && titlePaint.Data && i<titlePaint.Data.length) //设置标题数值 小数位数和格式
127659
127730
  {
@@ -127930,6 +128001,9 @@ function OverlayScriptIndex(name,script,args,option)
127930
128001
  case "DRAWSVG":
127931
128002
  this.CreateChartDrawSVG(hqChart,windowIndex,item,i);
127932
128003
  break;
128004
+ case "DRAWTITLE":
128005
+ this.CreateTitle(hqChart,windowIndex,item,i);
128006
+ break;
127933
128007
  case "MULTI_HTMLDOM":
127934
128008
  this.CreateMulitHtmlDom(hqChart,windowIndex,item,i);
127935
128009
  break;
@@ -128003,11 +128077,6 @@ function OverlayScriptIndex(name,script,args,option)
128003
128077
  {
128004
128078
  this.CreateLine(hqChart,windowIndex,item,i, item.Type);
128005
128079
  }
128006
- else if (item.Type==10)
128007
- {
128008
- this.CreateTitle(hqChart,windowIndex,item,i);
128009
- }
128010
-
128011
128080
 
128012
128081
 
128013
128082
  var titleData=titleInfo.Data[i];
@@ -128592,22 +128661,25 @@ function OverlayScriptIndex(name,script,args,option)
128592
128661
  {
128593
128662
  var overlayIndex=this.OverlayIndex;
128594
128663
  var frame=overlayIndex.Frame;
128595
- let chart=new ChartIndexTitle();
128664
+ var chart=new ChartIndexTitle();
128596
128665
  chart.Canvas=hqChart.Canvas;
128597
128666
 
128598
128667
  chart.Name=varItem.Name;
128599
128668
  chart.ChartBorder=frame.Frame.ChartBorder;
128600
128669
  chart.ChartFrame=frame.Frame;
128601
128670
  chart.Identify=overlayIndex.Identify;
128602
-
128671
+ chart.Data=hqChart.GetKData(); //绑定K线
128672
+
128603
128673
  if (varItem.Color) chart.Color=this.GetColor(varItem.Color);
128604
128674
  else chart.Color=this.GetDefaultColor(id);
128605
- chart.Data.Data=varItem.Data;
128675
+ chart.AryTitle=varItem.Draw.DrawData.AryTitle;
128676
+ chart.BuildCacheData();
128606
128677
 
128607
128678
  var titleIndex=windowIndex+1;
128608
128679
  var titlePaint=hqChart.TitlePaint[titleIndex];
128609
128680
  var titleData=new DynamicTitleData(chart.Data,chart.Name,chart.Color);
128610
128681
  titleData.DataType="ChartIndexTitle";
128682
+ titleData.Chart=chart;
128611
128683
  titlePaint.OverlayIndex.get(overlayIndex.Identify).Data[id]=titleData;
128612
128684
 
128613
128685
  this.SetChartIndexName(chart);
@@ -130223,6 +130295,18 @@ function APIScriptIndex(name,script,args,option, isOverlay)
130223
130295
 
130224
130296
  result.push(outVarItem);
130225
130297
  }
130298
+ else if (draw.DrawType=="DRAWTITLE")
130299
+ {
130300
+ drawItem.Name=draw.Name;
130301
+ drawItem.Type=draw.Type;
130302
+
130303
+ drawItem.DrawType=draw.DrawType;
130304
+ drawItem.DrawData=draw.DrawData;
130305
+
130306
+ outVarItem.Draw=drawItem;
130307
+
130308
+ result.push(outVarItem);
130309
+ }
130226
130310
  else if (draw.DrawType=="MULTI_HTMLDOM") //外部自己创建dom
130227
130311
  {
130228
130312
  drawItem.Text=draw.Text;
@@ -130781,6 +130865,18 @@ function APIScriptIndex(name,script,args,option, isOverlay)
130781
130865
 
130782
130866
  result.push(outVarItem);
130783
130867
  }
130868
+ else if (draw.DrawType=="DRAWTITLE")
130869
+ {
130870
+ drawItem.Name=draw.Name;
130871
+ drawItem.Type=draw.Type;
130872
+
130873
+ drawItem.DrawType=draw.DrawType;
130874
+ drawItem.DrawData=draw.DrawData;
130875
+
130876
+ outVarItem.Draw=drawItem;
130877
+
130878
+ result.push(outVarItem);
130879
+ }
130784
130880
  else
130785
130881
  {
130786
130882
  var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
@@ -157899,7 +157995,7 @@ function HQChartScriptWorker()
157899
157995
 
157900
157996
 
157901
157997
 
157902
- var HQCHART_VERSION="1.1.14669";
157998
+ var HQCHART_VERSION="1.1.14682";
157903
157999
 
157904
158000
  function PrintHQChartVersion()
157905
158001
  {