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.
@@ -38,7 +38,7 @@ var JSConsole=
38
38
  Condition: 限制条件 { Symbol:'Index'/'Stock'(只支持指数/股票),Period:[](支持的周期), Include:[](指定支持的股票,代码全部大写包括后缀, Message:"提示信息")}
39
39
  OutName:动态输出变量名字 [{Name:原始变量名, DynamicName:动态名字格式}] 如 {Name:"MA1", DynamicName:"MA{M1}"};
40
40
  SplitType: Y轴分割类型,
41
- YAxis:{ FloatPrecision:小数位数, StringFormat:, EnableRemoveZero } //Y轴刻度输出格式
41
+ YAxis:{ FloatPrecision:小数位数, StringFormat:, EnableRemoveZero, ExcludeValue:不参数Y轴的计算 } //Y轴刻度输出格式
42
42
  */
43
43
 
44
44
  //周期条件枚举
@@ -201,6 +201,7 @@ JSIndexScript.ModifyAttribute=function(indexInfo, attribute)
201
201
  if (IFrameSplitOperator.IsNumber(item.FloatPrecision)) indexInfo.YAxis.FloatPrecision=item.FloatPrecision;
202
202
  if (IFrameSplitOperator.IsNumber(item.StringFormat)) indexInfo.YAxis.StringFormat=item.StringFormat;
203
203
  if (IFrameSplitOperator.IsBool(item.EnableRemoveZero)) indexInfo.YAxis.EnableRemoveZero=item.EnableRemoveZero;
204
+ if (IFrameSplitOperator.IsBool(item.ExcludeValue)) indexInfo.YAxis.ExcludeValue=attribute.ExcludeValue; //不参数Y轴的计算
204
205
  }
205
206
  }
206
207
 
@@ -4410,9 +4411,16 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
4410
4411
 
4411
4412
  if (option.KLine)
4412
4413
  {
4413
- if (option.KLine.ShowKLine == false) chart.ChartPaint[0].IsShow = false;
4414
- if (option.KLine.InfoPosition>0) chart.ChartPaint[0].InfoPosition=option.KLine.InfoPosition;
4415
- if (option.KLine.IsShowMaxMinPrice == false) chart.ChartPaint[0].IsShowMaxMinPrice=option.KLine.IsShowMaxMinPrice;
4414
+ var item=option.KLine;
4415
+ var klineChart=chart.ChartPaint[0];
4416
+ if (option.KLine.ShowKLine == false) klineChart.IsShow = false;
4417
+ if (option.KLine.InfoPosition>0) klineChart.InfoPosition=option.KLine.InfoPosition;
4418
+ if (IFrameSplitOperator.IsBool(item.IsShowMaxMinPrice)) klineChart.IsShowMaxMinPrice=item.IsShowMaxMinPrice;
4419
+ if (item.PriceGap)
4420
+ {
4421
+ if (IFrameSplitOperator.IsBool(item.PriceGap.Enable)) klineChart.PriceGap.Enable=item.PriceGap.Enable;
4422
+ if (IFrameSplitOperator.IsNumber(item.PriceGap.Count)) klineChart.PriceGap.Count=item.PriceGap.Count;
4423
+ }
4416
4424
  }
4417
4425
 
4418
4426
  if(option.KLineTitle)
@@ -5991,6 +5999,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
5991
5999
  return this.JSChartContainer.ExportData(option);
5992
6000
  }
5993
6001
  }
6002
+
6003
+ this.ChangePriceGap=function(option)
6004
+ {
6005
+ if(this.JSChartContainer && typeof(this.JSChartContainer.ChangePriceGap)=='function')
6006
+ {
6007
+ JSConsole.Chart.Log('[JSChart:ChangePriceGap] ');
6008
+ return this.JSChartContainer.ChangePriceGap(option);
6009
+ }
6010
+ }
5994
6011
  }
5995
6012
 
5996
6013
  JSChart.LastVersion=null; //最新的版本号
@@ -10752,6 +10769,7 @@ function JSChartContainer(uielement, OffscreenElement, cacheElement)
10752
10769
  if (chart.IsShow==false) continue; //隐藏的图形不计算
10753
10770
  if (chart.NotSupportMessage) continue;
10754
10771
  if (!chart.ChartFrame) continue;
10772
+ if (chart.IsExcludeYValue===true) continue;
10755
10773
 
10756
10774
  var range=chart.GetMaxMin();
10757
10775
  if (range==null || range.Max==null || range.Min==null) continue;
@@ -25526,6 +25544,7 @@ function IChartPainting()
25526
25544
  this.PtInChart; //function(x,y) { }
25527
25545
 
25528
25546
  this.IsFullRangeMaxMin=false; //this.GetMaxMin() true=计算全部的最大最小值 false=计算可视范围的最大最小值
25547
+ this.IsExcludeYValue=false; //不参与Y轴计算
25529
25548
 
25530
25549
  this.Draw=function()
25531
25550
  {
@@ -26422,6 +26441,15 @@ function ChartKLine()
26422
26441
  this.AryOrderFlowBorder=[]; //订单流边框 临时变量
26423
26442
 
26424
26443
  this.ChartHeatMap; //=new ChartHeatMap();
26444
+
26445
+ //未回补的价格缺口
26446
+ this.PriceGap={ Enable:false, Count:1 };
26447
+ this.PriceGapStyple=
26448
+ {
26449
+ Line:{ Color:g_JSChartResource.PriceGapStyple.Line.Color },
26450
+ Text:{ Color:g_JSChartResource.PriceGapStyple.Text.Color, Font: g_JSChartResource.PriceGapStyple.Text.Font }
26451
+ };
26452
+ this.AryPriceGapCache=[]; //缺口数据 { }
26425
26453
 
26426
26454
  this.ReloadResource=function(resource)
26427
26455
  {
@@ -26522,6 +26550,7 @@ function ChartKLine()
26522
26550
  eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_COLOR);
26523
26551
  }
26524
26552
 
26553
+ var preKItemInfo=null;
26525
26554
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
26526
26555
  {
26527
26556
  var data=this.Data.Data[i];
@@ -26538,6 +26567,8 @@ function ChartKLine()
26538
26567
  var yClose=this.GetYFromData(data.Close,false);
26539
26568
  this.DrawKRange.End=i;
26540
26569
 
26570
+ var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
26571
+
26541
26572
  if (ptMax.Value==null || ptMax.Value<data.High) //求最大值
26542
26573
  {
26543
26574
  ptMax.X=x;
@@ -26656,6 +26687,17 @@ function ChartKLine()
26656
26687
  var infoItem={Xleft:left,XRight:right, YMax:yHigh, XCenter:x, YMin:yLow, DayData:data, Index:j};
26657
26688
  this.DrawInfo(infoItem);
26658
26689
  }
26690
+
26691
+ if (this.PriceGap.Enable && preKItemInfo)
26692
+ {
26693
+ this.CheckPriceGrap(data);
26694
+
26695
+ var value=this.IsPriceGrap(kItemInfo,preKItemInfo);
26696
+ if (value>0)
26697
+ this.AryPriceGapCache.push({ Data:[preKItemInfo, kItemInfo], Type:value });
26698
+ }
26699
+
26700
+ preKItemInfo=kItemInfo;
26659
26701
  }
26660
26702
 
26661
26703
  this.PtMax=ptMax;
@@ -26792,6 +26834,7 @@ function ChartKLine()
26792
26834
  this.ShowRange.ShowCount=xPointCount;
26793
26835
  this.DrawKRange.Start=this.Data.DataOffset;
26794
26836
 
26837
+ var preKItemInfo=null;
26795
26838
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
26796
26839
  {
26797
26840
  var data=this.Data.Data[i];
@@ -26829,6 +26872,24 @@ function ChartKLine()
26829
26872
  {
26830
26873
  ptLast={ X:x, Y:yClose, XLeft:left, XRight:right, KItem:data, ChartRight:chartright };
26831
26874
  }
26875
+
26876
+ if (this.PriceGap.Enable )
26877
+ {
26878
+ var yLow=this.GetYFromData(data.Low, false);
26879
+ var yHigh=this.GetYFromData(data.High, false);
26880
+ var yOpen=this.GetYFromData(data.Open, false);
26881
+
26882
+ var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
26883
+
26884
+ if (preKItemInfo)
26885
+ {
26886
+ this.CheckPriceGrap(data);
26887
+ var value=this.IsPriceGrap(kItemInfo,preKItemInfo);
26888
+ if (value>0) this.AryPriceGapCache.push({ Data:[preKItemInfo, kItemInfo], Type:value });
26889
+ }
26890
+
26891
+ preKItemInfo=kItemInfo;
26892
+ }
26832
26893
  }
26833
26894
 
26834
26895
  this.DrawLastPointEvent(ptLast); //通知外部绘制最后一个点
@@ -26902,6 +26963,7 @@ function ChartKLine()
26902
26963
  this.ShowRange.ShowCount=xPointCount;
26903
26964
  this.DrawKRange.Start=this.Data.DataOffset;
26904
26965
 
26966
+ var preKItemInfo=null;
26905
26967
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
26906
26968
  {
26907
26969
  var data=this.Data.Data[i];
@@ -26926,6 +26988,24 @@ function ChartKLine()
26926
26988
  if (isHScreen) this.Canvas.lineTo(yClose,x);
26927
26989
  else this.Canvas.lineTo(x,yClose);
26928
26990
  }
26991
+
26992
+ if (this.PriceGap.Enable )
26993
+ {
26994
+ var yLow=this.GetYFromData(data.Low, false);
26995
+ var yHigh=this.GetYFromData(data.High, false);
26996
+ var yOpen=this.GetYFromData(data.Open, false);
26997
+
26998
+ var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
26999
+
27000
+ if (preKItemInfo)
27001
+ {
27002
+ this.CheckPriceGrap(data);
27003
+ var value=this.IsPriceGrap(kItemInfo,preKItemInfo);
27004
+ if (value>0) this.AryPriceGapCache.push({ Data:[preKItemInfo, kItemInfo], Type:value });
27005
+ }
27006
+
27007
+ preKItemInfo=kItemInfo;
27008
+ }
26929
27009
  }
26930
27010
 
26931
27011
  if (bFirstPoint==false) this.Canvas.stroke();
@@ -26968,6 +27048,7 @@ function ChartKLine()
26968
27048
  eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_COLOR);
26969
27049
  }
26970
27050
 
27051
+ var preKItemInfo=null;
26971
27052
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
26972
27053
  {
26973
27054
  var data=this.Data.Data[i];
@@ -26984,6 +27065,8 @@ function ChartKLine()
26984
27065
  var yClose=this.GetYFromData(data.Close, false);
26985
27066
  var y=yHigh;
26986
27067
 
27068
+ var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
27069
+
26987
27070
  this.DrawKRange.End=i;
26988
27071
  if (ptMax.Value==null || ptMax.Value<data.High) //求最大值
26989
27072
  {
@@ -27087,6 +27170,17 @@ function ChartKLine()
27087
27170
  {
27088
27171
  ptLast={ X:x, Y:yClose, XLeft:left, XRight:right, KItem:data, ChartRight:chartright };
27089
27172
  }
27173
+
27174
+ if (this.PriceGap.Enable && preKItemInfo)
27175
+ {
27176
+ this.CheckPriceGrap(data);
27177
+
27178
+ var value=this.IsPriceGrap(kItemInfo,preKItemInfo);
27179
+ if (value>0)
27180
+ this.AryPriceGapCache.push({ Data:[preKItemInfo, kItemInfo], Type:value });
27181
+ }
27182
+
27183
+ preKItemInfo=kItemInfo;
27090
27184
  }
27091
27185
 
27092
27186
  this.DrawLastPointEvent(ptLast); //通知外部绘制最后一个点
@@ -28725,6 +28819,7 @@ function ChartKLine()
28725
28819
  this.PtMax={X:null,Y:null,Value:null,Align:'left'}; //清空最大
28726
28820
  this.PtMin={X:null,Y:null,Value:null,Align:'left'}; //清空最小
28727
28821
  this.DrawKRange={ Start:null, End:null };
28822
+ this.AryPriceGapCache=[];
28728
28823
 
28729
28824
  this.ChartFrame.ChartKLine={Max:null, Min:null }; //保存K线上 显示最大最小值坐标
28730
28825
 
@@ -28765,6 +28860,7 @@ function ChartKLine()
28765
28860
  {
28766
28861
  this.DrawCloseLine();
28767
28862
  this.Canvas.restore();
28863
+ if (this.PriceGap.Enable) this.DrawPriceGap();
28768
28864
  return;
28769
28865
  }
28770
28866
  else if (this.DrawType==2)
@@ -28825,8 +28921,11 @@ function ChartKLine()
28825
28921
 
28826
28922
  if (this.TradeIcon) this.DrawTradeIcon()
28827
28923
  else this.DrawTrade();
28924
+
28828
28925
  this.Canvas.restore();
28829
28926
 
28927
+ if (this.PriceGap.Enable) this.DrawPriceGap();
28928
+
28830
28929
  if (this.IsShowMaxMinPrice) //标注最大值最小值
28831
28930
  {
28832
28931
  if (this.ChartFrame.IsHScreen===true) this.HScreenDrawMaxMinPrice(this.PtMax,this.PtMin);
@@ -30582,6 +30681,169 @@ function ChartKLine()
30582
30681
 
30583
30682
  }
30584
30683
  }
30684
+
30685
+ //////////////////////////////////////////////////////////////
30686
+ //标识缺口
30687
+ //
30688
+ /////////////////////////////////////////////////////////////
30689
+ this.DrawPriceGap=function()
30690
+ {
30691
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.AryPriceGapCache)) return;
30692
+ if (this.PriceGap.Count<=0) return;
30693
+
30694
+ var index=this.AryPriceGapCache.length-this.PriceGap.Count;
30695
+ if (index<0) index=0;
30696
+
30697
+ var isHScreen=(this.ChartFrame.IsHScreen===true);
30698
+ var border=null;
30699
+
30700
+ if (isHScreen) border=this.ChartBorder.GetHScreenBorder();
30701
+ else border=this.ChartBorder.GetBorder();
30702
+
30703
+ this.Canvas.font=this.PriceGapStyple.Text.Font;
30704
+ this.Canvas.textAlign = 'left';
30705
+ this.Canvas.textBaseline = 'bottom';
30706
+ var textHeight=this.Canvas.measureText("擎").width;
30707
+ var decNum=GetfloatPrecision(this.Symbol);
30708
+
30709
+ for(var i=index;i<this.AryPriceGapCache.length;++i)
30710
+ {
30711
+ var item=this.AryPriceGapCache[i];
30712
+ var start=item.Data[0];
30713
+ var end=item.Data[1];
30714
+ var rect=null, rtText=null, text=null;
30715
+ if (item.Type==1) //上缺口
30716
+ {
30717
+ if (isHScreen)
30718
+ {
30719
+ rect={ Left:start.Coordinate.High, Right:end.Coordinate.Low, Top:start.Coordinate.X, Bottom: border.Bottom };
30720
+ rect.Width=rect.Right-rect.Left;
30721
+ rect.Height=rect.Bottom-rect.Top;
30722
+
30723
+ rtText={ Left:start.Coordinate.High-textHeight-2, Top:start.Coordinate.Right+2, Height:textHeight };
30724
+ rtText.Bottom=rtText.Top+rtText.Height;
30725
+ }
30726
+ else
30727
+ {
30728
+ rect={ Left:start.Coordinate.X, Right:border.Right, Top:end.Coordinate.Low, Bottom:start.Coordinate.High };
30729
+ rect.Width=rect.Right-rect.Left;
30730
+ rect.Height=rect.Bottom-rect.Top;
30731
+
30732
+ rtText={ Left:start.Coordinate.Right+2, Top:rect.Bottom+2, Right:rect.Right, Height:textHeight };
30733
+ rtText.Bottom=rtText.Top+rtText.Height;
30734
+ }
30735
+
30736
+ text=`${start.Data.High.toFixed(decNum)}-${end.Data.Low.toFixed(decNum)}`;
30737
+
30738
+ }
30739
+ else if (item.Type==2) //下缺口
30740
+ {
30741
+ if (isHScreen)
30742
+ {
30743
+ rect={ Left:start.Coordinate.Low, Right:end.Coordinate.High, Top:start.Coordinate.X, Bottom: border.Bottom };
30744
+ rect.Width=rect.Right-rect.Left;
30745
+ rect.Height=rect.Bottom-rect.Top;
30746
+
30747
+ rtText={ Left:start.Coordinate.Low+2, Top:start.Coordinate.Right+2, Height:textHeight };
30748
+ rtText.Bottom=rtText.Top+rtText.Height;
30749
+ }
30750
+ else
30751
+ {
30752
+ rect={ Left:start.Coordinate.X, Right:border.Right, Top:start.Coordinate.Low, Bottom:end.Coordinate.High };
30753
+ rect.Width=rect.Right-rect.Left;
30754
+ rect.Height=rect.Bottom-rect.Top;
30755
+
30756
+ rtText={ Left:start.Coordinate.Right+2, Bottom:rect.Top, Right:rect.Right, Height:textHeight };
30757
+ rtText.Top=rtText.Bottom-rtText.Height;
30758
+ }
30759
+
30760
+ text=`${start.Data.Low.toFixed(decNum)}-${end.Data.High.toFixed(decNum)}`;
30761
+ }
30762
+ else
30763
+ {
30764
+ continue;
30765
+ }
30766
+
30767
+ if (!rect) return;
30768
+
30769
+ this.Canvas.fillStyle=this.PriceGapStyple.Line.Color;
30770
+ this.Canvas.fillRect(rect.Left, rect.Top,rect.Width, rect.Height);
30771
+
30772
+ if (rtText)
30773
+ {
30774
+ var textWidth=this.Canvas.measureText(text).width;
30775
+ rtText.Width=textWidth;
30776
+ rtText.Right=rtText.Left+rtText.Width;
30777
+
30778
+ this.Canvas.fillStyle=this.PriceGapStyple.Text.Color;
30779
+
30780
+ if (isHScreen)
30781
+ {
30782
+ this.Canvas.save();
30783
+ this.Canvas.translate(rtText.Left, rtText.Top);
30784
+ this.Canvas.rotate(90 * Math.PI / 180);
30785
+ this.Canvas.fillText(text,0,0);
30786
+ this.Canvas.restore();
30787
+ }
30788
+ else
30789
+ {
30790
+ if (rtText.Right>rect.Right)
30791
+ {
30792
+ rtText.Right=rect.Right;
30793
+ rtText.Left=rtText.Right-rtText.Width;
30794
+ }
30795
+
30796
+ this.Canvas.fillStyle=this.PriceGapStyple.Text.Color;
30797
+ this.Canvas.fillText(text,rtText.Left,rtText.Bottom);
30798
+ }
30799
+
30800
+ //this.Canvas.fillStyle="rgb(250,250,250)"
30801
+ //this.Canvas.fillRect(rtText.Left, rtText.Top, rtText.Width, rtText.Height);
30802
+
30803
+
30804
+ }
30805
+ }
30806
+
30807
+ }
30808
+
30809
+ //是否有缺口
30810
+ this.IsPriceGrap=function(item, preItem)
30811
+ {
30812
+ if (!preItem || !item) return 0;
30813
+
30814
+ if (preItem.Data.Low>item.Data.High) return 2; //下缺口
30815
+
30816
+ if (preItem.Data.High<item.Data.Low) return 1; //上缺口
30817
+
30818
+ return -1;
30819
+ }
30820
+
30821
+ this.CheckPriceGrap=function(kItem)
30822
+ {
30823
+ for(var i=0;i<this.AryPriceGapCache.length;++i)
30824
+ {
30825
+ var item=this.AryPriceGapCache[i];
30826
+ var start=item.Data[0];
30827
+ if (item.Type==1) //上缺口
30828
+ {
30829
+ if (kItem.Low<=start.Data.High)
30830
+ {
30831
+ this.AryPriceGapCache.splice(i,1);
30832
+ --i;
30833
+ continue;
30834
+ }
30835
+ }
30836
+ else if (item.Type==2) //下缺口
30837
+ {
30838
+ if (kItem.High>=start.Data.Low)
30839
+ {
30840
+ this.AryPriceGapCache.splice(i,1);
30841
+ --i;
30842
+ continue;
30843
+ }
30844
+ }
30845
+ }
30846
+ }
30585
30847
 
30586
30848
  }
30587
30849
 
@@ -33891,6 +34153,7 @@ function ChartPointDot()
33891
34153
  var xPointCount=this.ChartFrame.XPointCount;
33892
34154
 
33893
34155
  this.Canvas.save();
34156
+ this.ClipClient(bHScreen);
33894
34157
  this.Canvas.fillStyle=this.Color;
33895
34158
  var colorDot;
33896
34159
  for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j)
@@ -33899,7 +34162,7 @@ function ChartPointDot()
33899
34162
  if (value==null) continue;
33900
34163
 
33901
34164
  var x=this.ChartFrame.GetXFromIndex(j);
33902
- var y=this.ChartFrame.GetYFromData(value);
34165
+ var y=this.ChartFrame.GetYFromData(value, false);
33903
34166
 
33904
34167
  if (x>chartright) break;
33905
34168
 
@@ -40045,7 +40308,7 @@ function ChartMultiText()
40045
40308
  for(var k=0;k<textItem.Data.length;++k)
40046
40309
  {
40047
40310
  var item=textItem.Data[k];
40048
-
40311
+ var y=top;
40049
40312
  if (item.Value=="TOP") y=top;
40050
40313
  else if (item.Value=="BOTTOM") y=bottom;
40051
40314
  else y=this.ChartFrame.GetYFromData(item.Value);
@@ -66045,6 +66308,12 @@ function JSChartResource()
66045
66308
  LineDash:[2,2]
66046
66309
  };
66047
66310
 
66311
+ this.PriceGapStyple=
66312
+ {
66313
+ Line:{ Color:"rgb(186,186,186)" },
66314
+ Text:{ Color:"rgb(105,105,105)", Font:`${12*GetDevicePixelRatio()}px 微软雅黑`}
66315
+ };
66316
+
66048
66317
  //订单流配置
66049
66318
  this.OrderFlow=
66050
66319
  {
@@ -67003,6 +67272,17 @@ function JSChartResource()
67003
67272
  if (item.LineDash) this.VirtualKLine.LineDash=item.LineDash;
67004
67273
  }
67005
67274
 
67275
+ if (style.PriceGapStyple)
67276
+ {
67277
+ var item=style.PriceGapStyple;
67278
+ if (item.Line && item.Line.Color) this.PriceGapStyple.Line.Color=item.Line.Color;
67279
+ if (item.Text)
67280
+ {
67281
+ if (item.Text.Color) this.PriceGapStyple.Text.Color=item.Text.Color;
67282
+ if (item.Text.Font) this.PriceGapStyple.Text.Font=item.Text.Font;
67283
+ }
67284
+ }
67285
+
67006
67286
  if (style.Index)
67007
67287
  {
67008
67288
  if (style.Index.LineColor) this.Index.LineColor = style.Index.LineColor;
@@ -75247,6 +75527,18 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
75247
75527
 
75248
75528
  this.ScrollBar.Reset({Draw:true});
75249
75529
  }
75530
+
75531
+ this.ChangePriceGap=function(obj)
75532
+ {
75533
+ if (!obj) return;
75534
+ var klineChart=this.ChartPaint[0];
75535
+ if (!klineChart) return;
75536
+
75537
+ if (IFrameSplitOperator.IsNumber(obj.Count)) klineChart.PriceGap.Count=obj.Count;
75538
+ if (IFrameSplitOperator.IsBool(obj.Enable)) klineChart.PriceGap.Enable=obj.Enable;
75539
+
75540
+ this.Draw();
75541
+ }
75250
75542
  }
75251
75543
 
75252
75544
  //API 返回数据 转化为array[]
@@ -87796,6 +88088,46 @@ function KLineRightMenu(divElement)
87796
88088
  return data;
87797
88089
  }
87798
88090
 
88091
+ //缺口提示
88092
+ this.GetPriceGap=function(chart)
88093
+ {
88094
+ var klineChart=chart.ChartPaint[0];
88095
+ var priceGap=klineChart.PriceGap;
88096
+ var data=
88097
+ [
88098
+ {
88099
+ text: "显示1个缺口",
88100
+ click: function () { chart.ChangePriceGap({ Enable:true, Count:1 }); }
88101
+ },
88102
+ {
88103
+ text: "显示2个缺口",
88104
+ click: function () { chart.ChangePriceGap({ Enable:true, Count:2 }); }
88105
+ },
88106
+ {
88107
+ text: "显示3个缺口",
88108
+ click: function () { chart.ChangePriceGap({ Enable:true, Count:3 }); }
88109
+ },
88110
+ {
88111
+ text: "隐藏缺口",
88112
+ click: function () { chart.ChangePriceGap({ Enable:false }); }
88113
+ }
88114
+ ];
88115
+
88116
+ if (!priceGap.Enable || priceGap.Count<=0)
88117
+ {
88118
+ data[data.length-1].selected=true; //选中
88119
+ }
88120
+ else if (priceGap.Enable && priceGap.Count>0)
88121
+ {
88122
+ var index=priceGap.Count;
88123
+ if (index>data.length-2) index=data.length-2;
88124
+ data[index].selected=true; //选中
88125
+ }
88126
+
88127
+ return data;
88128
+ }
88129
+
88130
+
87799
88131
  this.GetKLineInfo=function(chart)
87800
88132
  {
87801
88133
  var setInfo=new Set();
@@ -87874,6 +88206,10 @@ function KLineRightMenu(divElement)
87874
88206
  text:'信息地雷',
87875
88207
  children: this.GetKLineInfo(chart)
87876
88208
  },
88209
+ {
88210
+ text:'缺口提示',
88211
+ children: this.GetPriceGap(chart)
88212
+ },
87877
88213
  {
87878
88214
  text: "叠加品种",
87879
88215
  children: this.GetOverlay(chart)
@@ -110824,7 +111160,7 @@ function JSExplainer(ast,option)
110824
111160
  ['VOLR',"量比"], ['VOLINSTK',"持仓量"], ["OPI","持仓量"], ["ZSTJJ","均价"], ["QHJSJ","结算价"], ["SETTLE", "结算价"],
110825
111161
 
110826
111162
  //日期类
110827
- ['DATE',"日期"],['YEAR',"年份"],['MONTH',"月份"],['PERIOD', "周期"],['WEEK',"星期"],["TIME","时间"],
111163
+ ['DATE',"日期"],['YEAR',"年份"],['MONTH',"月份"],["DAY","日"],['PERIOD', "周期"],['WEEK',"星期"],["TIME","时间"],
110828
111164
 
110829
111165
  //大盘数据
110830
111166
  ['INDEXA',"大盘成交额"],['INDEXC',"大盘收盘价"],['INDEXH',"大盘最高价"],['INDEXL',"大盘最低价"],['INDEXO',"大盘开盘价"],['INDEXV',"大盘成交量"],
@@ -112322,6 +112658,7 @@ function ScriptIndex(name,script,args,option)
112322
112658
  if (IFrameSplitOperator.IsNumber(option.YAxis.FloatPrecision)) this.YAxis.FloatPrecision=option.YAxis.FloatPrecision;
112323
112659
  if (IFrameSplitOperator.IsNumber(option.YAxis.StringFormat)) this.YAxis.StringFormat=option.YAxis.StringFormat;
112324
112660
  if (IFrameSplitOperator.IsBool(option.YAxis.EnableRemoveZero)) this.YAxis.EnableRemoveZero=option.YAxis.EnableRemoveZero;
112661
+ if (IFrameSplitOperator.IsBool(option.YAxis.ExcludeValue)) this.YAxis.ExcludeValue=option.YAxis.ExcludeValue; //不参数Y轴的计算
112325
112662
 
112326
112663
  }
112327
112664
 
@@ -112586,6 +112923,11 @@ function ScriptIndex(name,script,args,option)
112586
112923
 
112587
112924
  if (this.ID) chart.IndexID=this.ID;
112588
112925
 
112926
+ if (this.YAxis)
112927
+ {
112928
+ if (IFrameSplitOperator.IsBool(this.YAxis.ExcludeValue)) chart.IsExcludeYValue=this.YAxis.ExcludeValue;
112929
+ }
112930
+
112589
112931
  chart.Script=this; //指标内容绑定上去
112590
112932
  }
112591
112933
 
@@ -112976,6 +113318,7 @@ function ScriptIndex(name,script,args,option)
112976
113318
  pointDot.Data.Data=varItem.Data;
112977
113319
  hqChart.TitlePaint[titleIndex].Data[id]=new DynamicTitleData(pointDot.Data,varItem.Name,pointDot.Color);
112978
113320
 
113321
+ this.SetChartIndexName(pointDot);
112979
113322
  hqChart.ChartPaint.push(pointDot);
112980
113323
  }
112981
113324
 
@@ -118505,6 +118848,12 @@ function GetBlackStyle()
118505
118848
  Color:'rgb(119,136,153)',
118506
118849
  LineDash:[2,2]
118507
118850
  },
118851
+
118852
+ PriceGapStyple:
118853
+ {
118854
+ Line:{ Color:"rgb(128,128,128)" },
118855
+ Text:{ Color:"rgb(219,220,220)", Font:`${12*GetDevicePixelRatio()}px 微软雅黑` }
118856
+ },
118508
118857
 
118509
118858
  Index:
118510
118859
  {
@@ -129172,7 +129521,7 @@ function ScrollBarBGChart()
129172
129521
 
129173
129522
 
129174
129523
 
129175
- var HQCHART_VERSION="1.1.12972";
129524
+ var HQCHART_VERSION="1.1.12985";
129176
129525
 
129177
129526
  function PrintHQChartVersion()
129178
129527
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12972";
8
+ var HQCHART_VERSION="1.1.12985";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {