hqchart 1.1.12977 → 1.1.12988
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.
- package/lib/umychart.vue.js +36 -18
- package/package.json +1 -1
- package/src/jscommon/umychart.js +336 -4
- package/src/jscommon/umychart.style.js +6 -0
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +343 -5
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +343 -5
|
@@ -4411,9 +4411,16 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4411
4411
|
|
|
4412
4412
|
if (option.KLine)
|
|
4413
4413
|
{
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
if (option.KLine.
|
|
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
|
+
}
|
|
4417
4424
|
}
|
|
4418
4425
|
|
|
4419
4426
|
if(option.KLineTitle)
|
|
@@ -5992,6 +5999,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
5992
5999
|
return this.JSChartContainer.ExportData(option);
|
|
5993
6000
|
}
|
|
5994
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
|
+
}
|
|
5995
6011
|
}
|
|
5996
6012
|
|
|
5997
6013
|
JSChart.LastVersion=null; //最新的版本号
|
|
@@ -26425,6 +26441,15 @@ function ChartKLine()
|
|
|
26425
26441
|
this.AryOrderFlowBorder=[]; //订单流边框 临时变量
|
|
26426
26442
|
|
|
26427
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=[]; //缺口数据 { }
|
|
26428
26453
|
|
|
26429
26454
|
this.ReloadResource=function(resource)
|
|
26430
26455
|
{
|
|
@@ -26525,6 +26550,7 @@ function ChartKLine()
|
|
|
26525
26550
|
eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_COLOR);
|
|
26526
26551
|
}
|
|
26527
26552
|
|
|
26553
|
+
var preKItemInfo=null;
|
|
26528
26554
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
|
|
26529
26555
|
{
|
|
26530
26556
|
var data=this.Data.Data[i];
|
|
@@ -26541,6 +26567,8 @@ function ChartKLine()
|
|
|
26541
26567
|
var yClose=this.GetYFromData(data.Close,false);
|
|
26542
26568
|
this.DrawKRange.End=i;
|
|
26543
26569
|
|
|
26570
|
+
var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
|
|
26571
|
+
|
|
26544
26572
|
if (ptMax.Value==null || ptMax.Value<data.High) //求最大值
|
|
26545
26573
|
{
|
|
26546
26574
|
ptMax.X=x;
|
|
@@ -26659,6 +26687,17 @@ function ChartKLine()
|
|
|
26659
26687
|
var infoItem={Xleft:left,XRight:right, YMax:yHigh, XCenter:x, YMin:yLow, DayData:data, Index:j};
|
|
26660
26688
|
this.DrawInfo(infoItem);
|
|
26661
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;
|
|
26662
26701
|
}
|
|
26663
26702
|
|
|
26664
26703
|
this.PtMax=ptMax;
|
|
@@ -26795,6 +26834,7 @@ function ChartKLine()
|
|
|
26795
26834
|
this.ShowRange.ShowCount=xPointCount;
|
|
26796
26835
|
this.DrawKRange.Start=this.Data.DataOffset;
|
|
26797
26836
|
|
|
26837
|
+
var preKItemInfo=null;
|
|
26798
26838
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
|
|
26799
26839
|
{
|
|
26800
26840
|
var data=this.Data.Data[i];
|
|
@@ -26832,6 +26872,24 @@ function ChartKLine()
|
|
|
26832
26872
|
{
|
|
26833
26873
|
ptLast={ X:x, Y:yClose, XLeft:left, XRight:right, KItem:data, ChartRight:chartright };
|
|
26834
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
|
+
}
|
|
26835
26893
|
}
|
|
26836
26894
|
|
|
26837
26895
|
this.DrawLastPointEvent(ptLast); //通知外部绘制最后一个点
|
|
@@ -26905,6 +26963,7 @@ function ChartKLine()
|
|
|
26905
26963
|
this.ShowRange.ShowCount=xPointCount;
|
|
26906
26964
|
this.DrawKRange.Start=this.Data.DataOffset;
|
|
26907
26965
|
|
|
26966
|
+
var preKItemInfo=null;
|
|
26908
26967
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
|
|
26909
26968
|
{
|
|
26910
26969
|
var data=this.Data.Data[i];
|
|
@@ -26929,6 +26988,24 @@ function ChartKLine()
|
|
|
26929
26988
|
if (isHScreen) this.Canvas.lineTo(yClose,x);
|
|
26930
26989
|
else this.Canvas.lineTo(x,yClose);
|
|
26931
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
|
+
}
|
|
26932
27009
|
}
|
|
26933
27010
|
|
|
26934
27011
|
if (bFirstPoint==false) this.Canvas.stroke();
|
|
@@ -26971,6 +27048,7 @@ function ChartKLine()
|
|
|
26971
27048
|
eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_COLOR);
|
|
26972
27049
|
}
|
|
26973
27050
|
|
|
27051
|
+
var preKItemInfo=null;
|
|
26974
27052
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
|
|
26975
27053
|
{
|
|
26976
27054
|
var data=this.Data.Data[i];
|
|
@@ -26987,6 +27065,8 @@ function ChartKLine()
|
|
|
26987
27065
|
var yClose=this.GetYFromData(data.Close, false);
|
|
26988
27066
|
var y=yHigh;
|
|
26989
27067
|
|
|
27068
|
+
var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
|
|
27069
|
+
|
|
26990
27070
|
this.DrawKRange.End=i;
|
|
26991
27071
|
if (ptMax.Value==null || ptMax.Value<data.High) //求最大值
|
|
26992
27072
|
{
|
|
@@ -27090,6 +27170,17 @@ function ChartKLine()
|
|
|
27090
27170
|
{
|
|
27091
27171
|
ptLast={ X:x, Y:yClose, XLeft:left, XRight:right, KItem:data, ChartRight:chartright };
|
|
27092
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;
|
|
27093
27184
|
}
|
|
27094
27185
|
|
|
27095
27186
|
this.DrawLastPointEvent(ptLast); //通知外部绘制最后一个点
|
|
@@ -28728,6 +28819,7 @@ function ChartKLine()
|
|
|
28728
28819
|
this.PtMax={X:null,Y:null,Value:null,Align:'left'}; //清空最大
|
|
28729
28820
|
this.PtMin={X:null,Y:null,Value:null,Align:'left'}; //清空最小
|
|
28730
28821
|
this.DrawKRange={ Start:null, End:null };
|
|
28822
|
+
this.AryPriceGapCache=[];
|
|
28731
28823
|
|
|
28732
28824
|
this.ChartFrame.ChartKLine={Max:null, Min:null }; //保存K线上 显示最大最小值坐标
|
|
28733
28825
|
|
|
@@ -28768,6 +28860,7 @@ function ChartKLine()
|
|
|
28768
28860
|
{
|
|
28769
28861
|
this.DrawCloseLine();
|
|
28770
28862
|
this.Canvas.restore();
|
|
28863
|
+
if (this.PriceGap.Enable) this.DrawPriceGap();
|
|
28771
28864
|
return;
|
|
28772
28865
|
}
|
|
28773
28866
|
else if (this.DrawType==2)
|
|
@@ -28828,8 +28921,11 @@ function ChartKLine()
|
|
|
28828
28921
|
|
|
28829
28922
|
if (this.TradeIcon) this.DrawTradeIcon()
|
|
28830
28923
|
else this.DrawTrade();
|
|
28924
|
+
|
|
28831
28925
|
this.Canvas.restore();
|
|
28832
28926
|
|
|
28927
|
+
if (this.PriceGap.Enable) this.DrawPriceGap();
|
|
28928
|
+
|
|
28833
28929
|
if (this.IsShowMaxMinPrice) //标注最大值最小值
|
|
28834
28930
|
{
|
|
28835
28931
|
if (this.ChartFrame.IsHScreen===true) this.HScreenDrawMaxMinPrice(this.PtMax,this.PtMin);
|
|
@@ -30585,6 +30681,169 @@ function ChartKLine()
|
|
|
30585
30681
|
|
|
30586
30682
|
}
|
|
30587
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
|
+
}
|
|
30588
30847
|
|
|
30589
30848
|
}
|
|
30590
30849
|
|
|
@@ -40049,7 +40308,7 @@ function ChartMultiText()
|
|
|
40049
40308
|
for(var k=0;k<textItem.Data.length;++k)
|
|
40050
40309
|
{
|
|
40051
40310
|
var item=textItem.Data[k];
|
|
40052
|
-
|
|
40311
|
+
var y=top;
|
|
40053
40312
|
if (item.Value=="TOP") y=top;
|
|
40054
40313
|
else if (item.Value=="BOTTOM") y=bottom;
|
|
40055
40314
|
else y=this.ChartFrame.GetYFromData(item.Value);
|
|
@@ -66049,6 +66308,12 @@ function JSChartResource()
|
|
|
66049
66308
|
LineDash:[2,2]
|
|
66050
66309
|
};
|
|
66051
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
|
+
|
|
66052
66317
|
//订单流配置
|
|
66053
66318
|
this.OrderFlow=
|
|
66054
66319
|
{
|
|
@@ -67007,6 +67272,17 @@ function JSChartResource()
|
|
|
67007
67272
|
if (item.LineDash) this.VirtualKLine.LineDash=item.LineDash;
|
|
67008
67273
|
}
|
|
67009
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
|
+
|
|
67010
67286
|
if (style.Index)
|
|
67011
67287
|
{
|
|
67012
67288
|
if (style.Index.LineColor) this.Index.LineColor = style.Index.LineColor;
|
|
@@ -75251,6 +75527,18 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
75251
75527
|
|
|
75252
75528
|
this.ScrollBar.Reset({Draw:true});
|
|
75253
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
|
+
}
|
|
75254
75542
|
}
|
|
75255
75543
|
|
|
75256
75544
|
//API 返回数据 转化为array[]
|
|
@@ -87800,6 +88088,46 @@ function KLineRightMenu(divElement)
|
|
|
87800
88088
|
return data;
|
|
87801
88089
|
}
|
|
87802
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-1;
|
|
88123
|
+
if (index>data.length-2) index=data.length-2;
|
|
88124
|
+
data[index].selected=true; //选中
|
|
88125
|
+
}
|
|
88126
|
+
|
|
88127
|
+
return data;
|
|
88128
|
+
}
|
|
88129
|
+
|
|
88130
|
+
|
|
87803
88131
|
this.GetKLineInfo=function(chart)
|
|
87804
88132
|
{
|
|
87805
88133
|
var setInfo=new Set();
|
|
@@ -87878,6 +88206,10 @@ function KLineRightMenu(divElement)
|
|
|
87878
88206
|
text:'信息地雷',
|
|
87879
88207
|
children: this.GetKLineInfo(chart)
|
|
87880
88208
|
},
|
|
88209
|
+
{
|
|
88210
|
+
text:'缺口提示',
|
|
88211
|
+
children: this.GetPriceGap(chart)
|
|
88212
|
+
},
|
|
87881
88213
|
{
|
|
87882
88214
|
text: "叠加品种",
|
|
87883
88215
|
children: this.GetOverlay(chart)
|
|
@@ -118516,6 +118848,12 @@ function GetBlackStyle()
|
|
|
118516
118848
|
Color:'rgb(119,136,153)',
|
|
118517
118849
|
LineDash:[2,2]
|
|
118518
118850
|
},
|
|
118851
|
+
|
|
118852
|
+
PriceGapStyple:
|
|
118853
|
+
{
|
|
118854
|
+
Line:{ Color:"rgb(128,128,128)" },
|
|
118855
|
+
Text:{ Color:"rgb(219,220,220)", Font:`${12*GetDevicePixelRatio()}px 微软雅黑` }
|
|
118856
|
+
},
|
|
118519
118857
|
|
|
118520
118858
|
Index:
|
|
118521
118859
|
{
|
|
@@ -129183,7 +129521,7 @@ function ScrollBarBGChart()
|
|
|
129183
129521
|
|
|
129184
129522
|
|
|
129185
129523
|
|
|
129186
|
-
var HQCHART_VERSION="1.1.
|
|
129524
|
+
var HQCHART_VERSION="1.1.12987";
|
|
129187
129525
|
|
|
129188
129526
|
function PrintHQChartVersion()
|
|
129189
129527
|
{
|