hqchart 1.1.12973 → 1.1.12986

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.
@@ -82,7 +82,7 @@ JSNetwork.HttpRequest=function(obj) //对请求进行封装
82
82
  Condition: 限制条件 { Symbol:'Index'/'Stock'(只支持指数/股票),Period:[](支持的周期), Include:[](指定支持的股票,代码全部大写包括后缀, Message:"提示信息")}
83
83
  OutName:动态输出变量名字 [{Name:原始变量名, DynamicName:动态名字格式}] 如 {Name:"MA1", DynamicName:"MA{M1}"};
84
84
  SplitType: Y轴分割类型,
85
- YAxis:{ FloatPrecision:小数位数, StringFormat:, EnableRemoveZero } //Y轴刻度输出格式
85
+ YAxis:{ FloatPrecision:小数位数, StringFormat:, EnableRemoveZero, ExcludeValue:不参数Y轴的计算 } //Y轴刻度输出格式
86
86
  */
87
87
 
88
88
  //周期条件枚举
@@ -245,6 +245,7 @@ JSIndexScript.ModifyAttribute=function(indexInfo, attribute)
245
245
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) indexInfo.YAxis.FloatPrecision=item.FloatPrecision;
246
246
  if (IFrameSplitOperator.IsNumber(item.StringFormat)) indexInfo.YAxis.StringFormat=item.StringFormat;
247
247
  if (IFrameSplitOperator.IsBool(item.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=item.EnableRemoveZero;
248
+ if (IFrameSplitOperator.IsBool(item.ExcludeValue)) indexInfo.YAxis.ExcludeValue=attribute.ExcludeValue; //不参数Y轴的计算
248
249
  }
249
250
  }
250
251
 
@@ -4454,9 +4455,16 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4454
4455
 
4455
4456
  if (option.KLine)
4456
4457
  {
4457
- if (option.KLine.ShowKLine == false) chart.ChartPaint[0].IsShow = false;
4458
- if (option.KLine.InfoPosition>0) chart.ChartPaint[0].InfoPosition=option.KLine.InfoPosition;
4459
- if (option.KLine.IsShowMaxMinPrice == false) chart.ChartPaint[0].IsShowMaxMinPrice=option.KLine.IsShowMaxMinPrice;
4458
+ var item=option.KLine;
4459
+ var klineChart=chart.ChartPaint[0];
4460
+ if (option.KLine.ShowKLine == false) klineChart.IsShow = false;
4461
+ if (option.KLine.InfoPosition>0) klineChart.InfoPosition=option.KLine.InfoPosition;
4462
+ if (IFrameSplitOperator.IsBool(item.IsShowMaxMinPrice)) klineChart.IsShowMaxMinPrice=item.IsShowMaxMinPrice;
4463
+ if (item.PriceGap)
4464
+ {
4465
+ if (IFrameSplitOperator.IsBool(item.PriceGap.Enable)) klineChart.PriceGap.Enable=item.PriceGap.Enable;
4466
+ if (IFrameSplitOperator.IsNumber(item.PriceGap.Count)) klineChart.PriceGap.Count=item.PriceGap.Count;
4467
+ }
4460
4468
  }
4461
4469
 
4462
4470
  if(option.KLineTitle)
@@ -6035,6 +6043,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
6035
6043
  return this.JSChartContainer.ExportData(option);
6036
6044
  }
6037
6045
  }
6046
+
6047
+ this.ChangePriceGap=function(option)
6048
+ {
6049
+ if(this.JSChartContainer && typeof(this.JSChartContainer.ChangePriceGap)=='function')
6050
+ {
6051
+ JSConsole.Chart.Log('[JSChart:ChangePriceGap] ');
6052
+ return this.JSChartContainer.ChangePriceGap(option);
6053
+ }
6054
+ }
6038
6055
  }
6039
6056
 
6040
6057
  JSChart.LastVersion=null; //最新的版本号
@@ -10796,6 +10813,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10796
10813
  if (chart.IsShow==false) continue; //隐藏的图形不计算
10797
10814
  if (chart.NotSupportMessage) continue;
10798
10815
  if (!chart.ChartFrame) continue;
10816
+ if (chart.IsExcludeYValue===true) continue;
10799
10817
 
10800
10818
  var range=chart.GetMaxMin();
10801
10819
  if (range==null || range.Max==null || range.Min==null) continue;
@@ -25570,6 +25588,7 @@ function IChartPainting()
25570
25588
  this.PtInChart; //function(x,y) { }
25571
25589
 
25572
25590
  this.IsFullRangeMaxMin=false; //this.GetMaxMin() true=计算全部的最大最小值 false=计算可视范围的最大最小值
25591
+ this.IsExcludeYValue=false; //不参与Y轴计算
25573
25592
 
25574
25593
  this.Draw=function()
25575
25594
  {
@@ -26466,6 +26485,15 @@ function ChartKLine()
26466
26485
  this.AryOrderFlowBorder=[]; //订单流边框 临时变量
26467
26486
 
26468
26487
  this.ChartHeatMap; //=new ChartHeatMap();
26488
+
26489
+ //未回补的价格缺口
26490
+ this.PriceGap={ Enable:false, Count:1 };
26491
+ this.PriceGapStyple=
26492
+ {
26493
+ Line:{ Color:g_JSChartResource.PriceGapStyple.Line.Color },
26494
+ Text:{ Color:g_JSChartResource.PriceGapStyple.Text.Color, Font: g_JSChartResource.PriceGapStyple.Text.Font }
26495
+ };
26496
+ this.AryPriceGapCache=[]; //缺口数据 { }
26469
26497
 
26470
26498
  this.ReloadResource=function(resource)
26471
26499
  {
@@ -26566,6 +26594,7 @@ function ChartKLine()
26566
26594
  eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_COLOR);
26567
26595
  }
26568
26596
 
26597
+ var preKItemInfo=null;
26569
26598
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
26570
26599
  {
26571
26600
  var data=this.Data.Data[i];
@@ -26582,6 +26611,8 @@ function ChartKLine()
26582
26611
  var yClose=this.GetYFromData(data.Close,false);
26583
26612
  this.DrawKRange.End=i;
26584
26613
 
26614
+ var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
26615
+
26585
26616
  if (ptMax.Value==null || ptMax.Value<data.High) //求最大值
26586
26617
  {
26587
26618
  ptMax.X=x;
@@ -26700,6 +26731,17 @@ function ChartKLine()
26700
26731
  var infoItem={Xleft:left,XRight:right, YMax:yHigh, XCenter:x, YMin:yLow, DayData:data, Index:j};
26701
26732
  this.DrawInfo(infoItem);
26702
26733
  }
26734
+
26735
+ if (this.PriceGap.Enable && preKItemInfo)
26736
+ {
26737
+ this.CheckPriceGrap(data);
26738
+
26739
+ var value=this.IsPriceGrap(kItemInfo,preKItemInfo);
26740
+ if (value>0)
26741
+ this.AryPriceGapCache.push({ Data:[preKItemInfo, kItemInfo], Type:value });
26742
+ }
26743
+
26744
+ preKItemInfo=kItemInfo;
26703
26745
  }
26704
26746
 
26705
26747
  this.PtMax=ptMax;
@@ -26836,6 +26878,7 @@ function ChartKLine()
26836
26878
  this.ShowRange.ShowCount=xPointCount;
26837
26879
  this.DrawKRange.Start=this.Data.DataOffset;
26838
26880
 
26881
+ var preKItemInfo=null;
26839
26882
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
26840
26883
  {
26841
26884
  var data=this.Data.Data[i];
@@ -26873,6 +26916,24 @@ function ChartKLine()
26873
26916
  {
26874
26917
  ptLast={ X:x, Y:yClose, XLeft:left, XRight:right, KItem:data, ChartRight:chartright };
26875
26918
  }
26919
+
26920
+ if (this.PriceGap.Enable )
26921
+ {
26922
+ var yLow=this.GetYFromData(data.Low, false);
26923
+ var yHigh=this.GetYFromData(data.High, false);
26924
+ var yOpen=this.GetYFromData(data.Open, false);
26925
+
26926
+ var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
26927
+
26928
+ if (preKItemInfo)
26929
+ {
26930
+ this.CheckPriceGrap(data);
26931
+ var value=this.IsPriceGrap(kItemInfo,preKItemInfo);
26932
+ if (value>0) this.AryPriceGapCache.push({ Data:[preKItemInfo, kItemInfo], Type:value });
26933
+ }
26934
+
26935
+ preKItemInfo=kItemInfo;
26936
+ }
26876
26937
  }
26877
26938
 
26878
26939
  this.DrawLastPointEvent(ptLast); //通知外部绘制最后一个点
@@ -26946,6 +27007,7 @@ function ChartKLine()
26946
27007
  this.ShowRange.ShowCount=xPointCount;
26947
27008
  this.DrawKRange.Start=this.Data.DataOffset;
26948
27009
 
27010
+ var preKItemInfo=null;
26949
27011
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
26950
27012
  {
26951
27013
  var data=this.Data.Data[i];
@@ -26970,6 +27032,24 @@ function ChartKLine()
26970
27032
  if (isHScreen) this.Canvas.lineTo(yClose,x);
26971
27033
  else this.Canvas.lineTo(x,yClose);
26972
27034
  }
27035
+
27036
+ if (this.PriceGap.Enable )
27037
+ {
27038
+ var yLow=this.GetYFromData(data.Low, false);
27039
+ var yHigh=this.GetYFromData(data.High, false);
27040
+ var yOpen=this.GetYFromData(data.Open, false);
27041
+
27042
+ var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
27043
+
27044
+ if (preKItemInfo)
27045
+ {
27046
+ this.CheckPriceGrap(data);
27047
+ var value=this.IsPriceGrap(kItemInfo,preKItemInfo);
27048
+ if (value>0) this.AryPriceGapCache.push({ Data:[preKItemInfo, kItemInfo], Type:value });
27049
+ }
27050
+
27051
+ preKItemInfo=kItemInfo;
27052
+ }
26973
27053
  }
26974
27054
 
26975
27055
  if (bFirstPoint==false) this.Canvas.stroke();
@@ -27012,6 +27092,7 @@ function ChartKLine()
27012
27092
  eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_COLOR);
27013
27093
  }
27014
27094
 
27095
+ var preKItemInfo=null;
27015
27096
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
27016
27097
  {
27017
27098
  var data=this.Data.Data[i];
@@ -27028,6 +27109,8 @@ function ChartKLine()
27028
27109
  var yClose=this.GetYFromData(data.Close, false);
27029
27110
  var y=yHigh;
27030
27111
 
27112
+ var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
27113
+
27031
27114
  this.DrawKRange.End=i;
27032
27115
  if (ptMax.Value==null || ptMax.Value<data.High) //求最大值
27033
27116
  {
@@ -27131,6 +27214,17 @@ function ChartKLine()
27131
27214
  {
27132
27215
  ptLast={ X:x, Y:yClose, XLeft:left, XRight:right, KItem:data, ChartRight:chartright };
27133
27216
  }
27217
+
27218
+ if (this.PriceGap.Enable && preKItemInfo)
27219
+ {
27220
+ this.CheckPriceGrap(data);
27221
+
27222
+ var value=this.IsPriceGrap(kItemInfo,preKItemInfo);
27223
+ if (value>0)
27224
+ this.AryPriceGapCache.push({ Data:[preKItemInfo, kItemInfo], Type:value });
27225
+ }
27226
+
27227
+ preKItemInfo=kItemInfo;
27134
27228
  }
27135
27229
 
27136
27230
  this.DrawLastPointEvent(ptLast); //通知外部绘制最后一个点
@@ -28769,6 +28863,7 @@ function ChartKLine()
28769
28863
  this.PtMax={X:null,Y:null,Value:null,Align:'left'}; //清空最大
28770
28864
  this.PtMin={X:null,Y:null,Value:null,Align:'left'}; //清空最小
28771
28865
  this.DrawKRange={ Start:null, End:null };
28866
+ this.AryPriceGapCache=[];
28772
28867
 
28773
28868
  this.ChartFrame.ChartKLine={Max:null, Min:null }; //保存K线上 显示最大最小值坐标
28774
28869
 
@@ -28809,6 +28904,7 @@ function ChartKLine()
28809
28904
  {
28810
28905
  this.DrawCloseLine();
28811
28906
  this.Canvas.restore();
28907
+ if (this.PriceGap.Enable) this.DrawPriceGap();
28812
28908
  return;
28813
28909
  }
28814
28910
  else if (this.DrawType==2)
@@ -28869,8 +28965,11 @@ function ChartKLine()
28869
28965
 
28870
28966
  if (this.TradeIcon) this.DrawTradeIcon()
28871
28967
  else this.DrawTrade();
28968
+
28872
28969
  this.Canvas.restore();
28873
28970
 
28971
+ if (this.PriceGap.Enable) this.DrawPriceGap();
28972
+
28874
28973
  if (this.IsShowMaxMinPrice) //标注最大值最小值
28875
28974
  {
28876
28975
  if (this.ChartFrame.IsHScreen===true) this.HScreenDrawMaxMinPrice(this.PtMax,this.PtMin);
@@ -30626,6 +30725,169 @@ function ChartKLine()
30626
30725
 
30627
30726
  }
30628
30727
  }
30728
+
30729
+ //////////////////////////////////////////////////////////////
30730
+ //标识缺口
30731
+ //
30732
+ /////////////////////////////////////////////////////////////
30733
+ this.DrawPriceGap=function()
30734
+ {
30735
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.AryPriceGapCache)) return;
30736
+ if (this.PriceGap.Count<=0) return;
30737
+
30738
+ var index=this.AryPriceGapCache.length-this.PriceGap.Count;
30739
+ if (index<0) index=0;
30740
+
30741
+ var isHScreen=(this.ChartFrame.IsHScreen===true);
30742
+ var border=null;
30743
+
30744
+ if (isHScreen) border=this.ChartBorder.GetHScreenBorder();
30745
+ else border=this.ChartBorder.GetBorder();
30746
+
30747
+ this.Canvas.font=this.PriceGapStyple.Text.Font;
30748
+ this.Canvas.textAlign = 'left';
30749
+ this.Canvas.textBaseline = 'bottom';
30750
+ var textHeight=this.Canvas.measureText("擎").width;
30751
+ var decNum=GetfloatPrecision(this.Symbol);
30752
+
30753
+ for(var i=index;i<this.AryPriceGapCache.length;++i)
30754
+ {
30755
+ var item=this.AryPriceGapCache[i];
30756
+ var start=item.Data[0];
30757
+ var end=item.Data[1];
30758
+ var rect=null, rtText=null, text=null;
30759
+ if (item.Type==1) //上缺口
30760
+ {
30761
+ if (isHScreen)
30762
+ {
30763
+ rect={ Left:start.Coordinate.High, Right:end.Coordinate.Low, Top:start.Coordinate.X, Bottom: border.Bottom };
30764
+ rect.Width=rect.Right-rect.Left;
30765
+ rect.Height=rect.Bottom-rect.Top;
30766
+
30767
+ rtText={ Left:start.Coordinate.High-textHeight-2, Top:start.Coordinate.Right+2, Height:textHeight };
30768
+ rtText.Bottom=rtText.Top+rtText.Height;
30769
+ }
30770
+ else
30771
+ {
30772
+ rect={ Left:start.Coordinate.X, Right:border.Right, Top:end.Coordinate.Low, Bottom:start.Coordinate.High };
30773
+ rect.Width=rect.Right-rect.Left;
30774
+ rect.Height=rect.Bottom-rect.Top;
30775
+
30776
+ rtText={ Left:start.Coordinate.Right+2, Top:rect.Bottom+2, Right:rect.Right, Height:textHeight };
30777
+ rtText.Bottom=rtText.Top+rtText.Height;
30778
+ }
30779
+
30780
+ text=`${start.Data.High.toFixed(decNum)}-${end.Data.Low.toFixed(decNum)}`;
30781
+
30782
+ }
30783
+ else if (item.Type==2) //下缺口
30784
+ {
30785
+ if (isHScreen)
30786
+ {
30787
+ rect={ Left:start.Coordinate.Low, Right:end.Coordinate.High, Top:start.Coordinate.X, Bottom: border.Bottom };
30788
+ rect.Width=rect.Right-rect.Left;
30789
+ rect.Height=rect.Bottom-rect.Top;
30790
+
30791
+ rtText={ Left:start.Coordinate.Low+2, Top:start.Coordinate.Right+2, Height:textHeight };
30792
+ rtText.Bottom=rtText.Top+rtText.Height;
30793
+ }
30794
+ else
30795
+ {
30796
+ rect={ Left:start.Coordinate.X, Right:border.Right, Top:start.Coordinate.Low, Bottom:end.Coordinate.High };
30797
+ rect.Width=rect.Right-rect.Left;
30798
+ rect.Height=rect.Bottom-rect.Top;
30799
+
30800
+ rtText={ Left:start.Coordinate.Right+2, Bottom:rect.Top, Right:rect.Right, Height:textHeight };
30801
+ rtText.Top=rtText.Bottom-rtText.Height;
30802
+ }
30803
+
30804
+ text=`${start.Data.Low.toFixed(decNum)}-${end.Data.High.toFixed(decNum)}`;
30805
+ }
30806
+ else
30807
+ {
30808
+ continue;
30809
+ }
30810
+
30811
+ if (!rect) return;
30812
+
30813
+ this.Canvas.fillStyle=this.PriceGapStyple.Line.Color;
30814
+ this.Canvas.fillRect(rect.Left, rect.Top,rect.Width, rect.Height);
30815
+
30816
+ if (rtText)
30817
+ {
30818
+ var textWidth=this.Canvas.measureText(text).width;
30819
+ rtText.Width=textWidth;
30820
+ rtText.Right=rtText.Left+rtText.Width;
30821
+
30822
+ this.Canvas.fillStyle=this.PriceGapStyple.Text.Color;
30823
+
30824
+ if (isHScreen)
30825
+ {
30826
+ this.Canvas.save();
30827
+ this.Canvas.translate(rtText.Left, rtText.Top);
30828
+ this.Canvas.rotate(90 * Math.PI / 180);
30829
+ this.Canvas.fillText(text,0,0);
30830
+ this.Canvas.restore();
30831
+ }
30832
+ else
30833
+ {
30834
+ if (rtText.Right>rect.Right)
30835
+ {
30836
+ rtText.Right=rect.Right;
30837
+ rtText.Left=rtText.Right-rtText.Width;
30838
+ }
30839
+
30840
+ this.Canvas.fillStyle=this.PriceGapStyple.Text.Color;
30841
+ this.Canvas.fillText(text,rtText.Left,rtText.Bottom);
30842
+ }
30843
+
30844
+ //this.Canvas.fillStyle="rgb(250,250,250)"
30845
+ //this.Canvas.fillRect(rtText.Left, rtText.Top, rtText.Width, rtText.Height);
30846
+
30847
+
30848
+ }
30849
+ }
30850
+
30851
+ }
30852
+
30853
+ //是否有缺口
30854
+ this.IsPriceGrap=function(item, preItem)
30855
+ {
30856
+ if (!preItem || !item) return 0;
30857
+
30858
+ if (preItem.Data.Low>item.Data.High) return 2; //下缺口
30859
+
30860
+ if (preItem.Data.High<item.Data.Low) return 1; //上缺口
30861
+
30862
+ return -1;
30863
+ }
30864
+
30865
+ this.CheckPriceGrap=function(kItem)
30866
+ {
30867
+ for(var i=0;i<this.AryPriceGapCache.length;++i)
30868
+ {
30869
+ var item=this.AryPriceGapCache[i];
30870
+ var start=item.Data[0];
30871
+ if (item.Type==1) //上缺口
30872
+ {
30873
+ if (kItem.Low<=start.Data.High)
30874
+ {
30875
+ this.AryPriceGapCache.splice(i,1);
30876
+ --i;
30877
+ continue;
30878
+ }
30879
+ }
30880
+ else if (item.Type==2) //下缺口
30881
+ {
30882
+ if (kItem.High>=start.Data.Low)
30883
+ {
30884
+ this.AryPriceGapCache.splice(i,1);
30885
+ --i;
30886
+ continue;
30887
+ }
30888
+ }
30889
+ }
30890
+ }
30629
30891
 
30630
30892
  }
30631
30893
 
@@ -33935,6 +34197,7 @@ function ChartPointDot()
33935
34197
  var xPointCount=this.ChartFrame.XPointCount;
33936
34198
 
33937
34199
  this.Canvas.save();
34200
+ this.ClipClient(bHScreen);
33938
34201
  this.Canvas.fillStyle=this.Color;
33939
34202
  var colorDot;
33940
34203
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
@@ -33943,7 +34206,7 @@ function ChartPointDot()
33943
34206
  if (value==null) continue;
33944
34207
 
33945
34208
  var x=this.ChartFrame.GetXFromIndex(j);
33946
- var y=this.ChartFrame.GetYFromData(value);
34209
+ var y=this.ChartFrame.GetYFromData(value, false);
33947
34210
 
33948
34211
  if (x>chartright) break;
33949
34212
 
@@ -40089,7 +40352,7 @@ function ChartMultiText()
40089
40352
  for(var k=0;k<textItem.Data.length;++k)
40090
40353
  {
40091
40354
  var item=textItem.Data[k];
40092
-
40355
+ var y=top;
40093
40356
  if (item.Value=="TOP") y=top;
40094
40357
  else if (item.Value=="BOTTOM") y=bottom;
40095
40358
  else y=this.ChartFrame.GetYFromData(item.Value);
@@ -66089,6 +66352,12 @@ function JSChartResource()
66089
66352
  LineDash:[2,2]
66090
66353
  };
66091
66354
 
66355
+ this.PriceGapStyple=
66356
+ {
66357
+ Line:{ Color:"rgb(186,186,186)" },
66358
+ Text:{ Color:"rgb(105,105,105)", Font:`${12*GetDevicePixelRatio()}px 微软雅黑`}
66359
+ };
66360
+
66092
66361
  //订单流配置
66093
66362
  this.OrderFlow=
66094
66363
  {
@@ -67047,6 +67316,17 @@ function JSChartResource()
67047
67316
  if (item.LineDash) this.VirtualKLine.LineDash=item.LineDash;
67048
67317
  }
67049
67318
 
67319
+ if (style.PriceGapStyple)
67320
+ {
67321
+ var item=style.PriceGapStyple;
67322
+ if (item.Line && item.Line.Color) this.PriceGapStyple.Line.Color=item.Line.Color;
67323
+ if (item.Text)
67324
+ {
67325
+ if (item.Text.Color) this.PriceGapStyple.Text.Color=item.Text.Color;
67326
+ if (item.Text.Font) this.PriceGapStyple.Text.Font=item.Text.Font;
67327
+ }
67328
+ }
67329
+
67050
67330
  if (style.Index)
67051
67331
  {
67052
67332
  if (style.Index.LineColor) this.Index.LineColor = style.Index.LineColor;
@@ -75291,6 +75571,18 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
75291
75571
 
75292
75572
  this.ScrollBar.Reset({Draw:true});
75293
75573
  }
75574
+
75575
+ this.ChangePriceGap=function(obj)
75576
+ {
75577
+ if (!obj) return;
75578
+ var klineChart=this.ChartPaint[0];
75579
+ if (!klineChart) return;
75580
+
75581
+ if (IFrameSplitOperator.IsNumber(obj.Count)) klineChart.PriceGap.Count=obj.Count;
75582
+ if (IFrameSplitOperator.IsBool(obj.Enable)) klineChart.PriceGap.Enable=obj.Enable;
75583
+
75584
+ this.Draw();
75585
+ }
75294
75586
  }
75295
75587
 
75296
75588
  //API 返回数据 转化为array[]
@@ -87840,6 +88132,46 @@ function KLineRightMenu(divElement)
87840
88132
  return data;
87841
88133
  }
87842
88134
 
88135
+ //缺口提示
88136
+ this.GetPriceGap=function(chart)
88137
+ {
88138
+ var klineChart=chart.ChartPaint[0];
88139
+ var priceGap=klineChart.PriceGap;
88140
+ var data=
88141
+ [
88142
+ {
88143
+ text: "显示1个缺口",
88144
+ click: function () { chart.ChangePriceGap({ Enable:true, Count:1 }); }
88145
+ },
88146
+ {
88147
+ text: "显示2个缺口",
88148
+ click: function () { chart.ChangePriceGap({ Enable:true, Count:2 }); }
88149
+ },
88150
+ {
88151
+ text: "显示3个缺口",
88152
+ click: function () { chart.ChangePriceGap({ Enable:true, Count:3 }); }
88153
+ },
88154
+ {
88155
+ text: "隐藏缺口",
88156
+ click: function () { chart.ChangePriceGap({ Enable:false }); }
88157
+ }
88158
+ ];
88159
+
88160
+ if (!priceGap.Enable || priceGap.Count<=0)
88161
+ {
88162
+ data[data.length-1].selected=true; //选中
88163
+ }
88164
+ else if (priceGap.Enable && priceGap.Count>0)
88165
+ {
88166
+ var index=priceGap.Count;
88167
+ if (index>data.length-2) index=data.length-2;
88168
+ data[index].selected=true; //选中
88169
+ }
88170
+
88171
+ return data;
88172
+ }
88173
+
88174
+
87843
88175
  this.GetKLineInfo=function(chart)
87844
88176
  {
87845
88177
  var setInfo=new Set();
@@ -87918,6 +88250,10 @@ function KLineRightMenu(divElement)
87918
88250
  text:'信息地雷',
87919
88251
  children: this.GetKLineInfo(chart)
87920
88252
  },
88253
+ {
88254
+ text:'缺口提示',
88255
+ children: this.GetPriceGap(chart)
88256
+ },
87921
88257
  {
87922
88258
  text: "叠加品种",
87923
88259
  children: this.GetOverlay(chart)
@@ -110868,7 +111204,7 @@ function JSExplainer(ast,option)
110868
111204
  ['VOLR',"量比"], ['VOLINSTK',"持仓量"], ["OPI","持仓量"], ["ZSTJJ","均价"], ["QHJSJ","结算价"], ["SETTLE", "结算价"],
110869
111205
 
110870
111206
  //日期类
110871
- ['DATE',"日期"],['YEAR',"年份"],['MONTH',"月份"],['PERIOD', "周期"],['WEEK',"星期"],["TIME","时间"],
111207
+ ['DATE',"日期"],['YEAR',"年份"],['MONTH',"月份"],["DAY","日"],['PERIOD', "周期"],['WEEK',"星期"],["TIME","时间"],
110872
111208
 
110873
111209
  //大盘数据
110874
111210
  ['INDEXA',"大盘成交额"],['INDEXC',"大盘收盘价"],['INDEXH',"大盘最高价"],['INDEXL',"大盘最低价"],['INDEXO',"大盘开盘价"],['INDEXV',"大盘成交量"],
@@ -112366,6 +112702,7 @@ function ScriptIndex(name,script,args,option)
112366
112702
  if (IFrameSplitOperator.IsNumber(option.YAxis.FloatPrecision)) this.YAxis.FloatPrecision=option.YAxis.FloatPrecision;
112367
112703
  if (IFrameSplitOperator.IsNumber(option.YAxis.StringFormat)) this.YAxis.StringFormat=option.YAxis.StringFormat;
112368
112704
  if (IFrameSplitOperator.IsBool(option.YAxis.EnableRemoveZero)) this.YAxis.EnableRemoveZero=option.YAxis.EnableRemoveZero;
112705
+ if (IFrameSplitOperator.IsBool(option.YAxis.ExcludeValue)) this.YAxis.ExcludeValue=option.YAxis.ExcludeValue; //不参数Y轴的计算
112369
112706
 
112370
112707
  }
112371
112708
 
@@ -112630,6 +112967,11 @@ function ScriptIndex(name,script,args,option)
112630
112967
 
112631
112968
  if (this.ID) chart.IndexID=this.ID;
112632
112969
 
112970
+ if (this.YAxis)
112971
+ {
112972
+ if (IFrameSplitOperator.IsBool(this.YAxis.ExcludeValue)) chart.IsExcludeYValue=this.YAxis.ExcludeValue;
112973
+ }
112974
+
112633
112975
  chart.Script=this; //指标内容绑定上去
112634
112976
  }
112635
112977
 
@@ -113020,6 +113362,7 @@ function ScriptIndex(name,script,args,option)
113020
113362
  pointDot.Data.Data=varItem.Data;
113021
113363
  hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(pointDot.Data,varItem.Name,pointDot.Color);
113022
113364
 
113365
+ this.SetChartIndexName(pointDot);
113023
113366
  hqChart.ChartPaint.push(pointDot);
113024
113367
  }
113025
113368
 
@@ -118549,6 +118892,12 @@ function GetBlackStyle()
118549
118892
  Color:'rgb(119,136,153)',
118550
118893
  LineDash:[2,2]
118551
118894
  },
118895
+
118896
+ PriceGapStyple:
118897
+ {
118898
+ Line:{ Color:"rgb(128,128,128)" },
118899
+ Text:{ Color:"rgb(219,220,220)", Font:`${12*GetDevicePixelRatio()}px 微软雅黑` }
118900
+ },
118552
118901
 
118553
118902
  Index:
118554
118903
  {
@@ -129330,7 +129679,7 @@ function HQChartScriptWorker()
129330
129679
 
129331
129680
 
129332
129681
 
129333
- var HQCHART_VERSION="1.1.12972";
129682
+ var HQCHART_VERSION="1.1.12985";
129334
129683
 
129335
129684
  function PrintHQChartVersion()
129336
129685
  {