hqchart 1.1.12977 → 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.
- 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
|
@@ -4455,9 +4455,16 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
4455
4455
|
|
|
4456
4456
|
if (option.KLine)
|
|
4457
4457
|
{
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
if (option.KLine.
|
|
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
|
+
}
|
|
4461
4468
|
}
|
|
4462
4469
|
|
|
4463
4470
|
if(option.KLineTitle)
|
|
@@ -6036,6 +6043,15 @@ function JSChart(divElement, bOffscreen, bCacheCanvas)
|
|
|
6036
6043
|
return this.JSChartContainer.ExportData(option);
|
|
6037
6044
|
}
|
|
6038
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
|
+
}
|
|
6039
6055
|
}
|
|
6040
6056
|
|
|
6041
6057
|
JSChart.LastVersion=null; //最新的版本号
|
|
@@ -26469,6 +26485,15 @@ function ChartKLine()
|
|
|
26469
26485
|
this.AryOrderFlowBorder=[]; //订单流边框 临时变量
|
|
26470
26486
|
|
|
26471
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=[]; //缺口数据 { }
|
|
26472
26497
|
|
|
26473
26498
|
this.ReloadResource=function(resource)
|
|
26474
26499
|
{
|
|
@@ -26569,6 +26594,7 @@ function ChartKLine()
|
|
|
26569
26594
|
eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_COLOR);
|
|
26570
26595
|
}
|
|
26571
26596
|
|
|
26597
|
+
var preKItemInfo=null;
|
|
26572
26598
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
|
|
26573
26599
|
{
|
|
26574
26600
|
var data=this.Data.Data[i];
|
|
@@ -26585,6 +26611,8 @@ function ChartKLine()
|
|
|
26585
26611
|
var yClose=this.GetYFromData(data.Close,false);
|
|
26586
26612
|
this.DrawKRange.End=i;
|
|
26587
26613
|
|
|
26614
|
+
var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
|
|
26615
|
+
|
|
26588
26616
|
if (ptMax.Value==null || ptMax.Value<data.High) //求最大值
|
|
26589
26617
|
{
|
|
26590
26618
|
ptMax.X=x;
|
|
@@ -26703,6 +26731,17 @@ function ChartKLine()
|
|
|
26703
26731
|
var infoItem={Xleft:left,XRight:right, YMax:yHigh, XCenter:x, YMin:yLow, DayData:data, Index:j};
|
|
26704
26732
|
this.DrawInfo(infoItem);
|
|
26705
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;
|
|
26706
26745
|
}
|
|
26707
26746
|
|
|
26708
26747
|
this.PtMax=ptMax;
|
|
@@ -26839,6 +26878,7 @@ function ChartKLine()
|
|
|
26839
26878
|
this.ShowRange.ShowCount=xPointCount;
|
|
26840
26879
|
this.DrawKRange.Start=this.Data.DataOffset;
|
|
26841
26880
|
|
|
26881
|
+
var preKItemInfo=null;
|
|
26842
26882
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
|
|
26843
26883
|
{
|
|
26844
26884
|
var data=this.Data.Data[i];
|
|
@@ -26876,6 +26916,24 @@ function ChartKLine()
|
|
|
26876
26916
|
{
|
|
26877
26917
|
ptLast={ X:x, Y:yClose, XLeft:left, XRight:right, KItem:data, ChartRight:chartright };
|
|
26878
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
|
+
}
|
|
26879
26937
|
}
|
|
26880
26938
|
|
|
26881
26939
|
this.DrawLastPointEvent(ptLast); //通知外部绘制最后一个点
|
|
@@ -26949,6 +27007,7 @@ function ChartKLine()
|
|
|
26949
27007
|
this.ShowRange.ShowCount=xPointCount;
|
|
26950
27008
|
this.DrawKRange.Start=this.Data.DataOffset;
|
|
26951
27009
|
|
|
27010
|
+
var preKItemInfo=null;
|
|
26952
27011
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
|
|
26953
27012
|
{
|
|
26954
27013
|
var data=this.Data.Data[i];
|
|
@@ -26973,6 +27032,24 @@ function ChartKLine()
|
|
|
26973
27032
|
if (isHScreen) this.Canvas.lineTo(yClose,x);
|
|
26974
27033
|
else this.Canvas.lineTo(x,yClose);
|
|
26975
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
|
+
}
|
|
26976
27053
|
}
|
|
26977
27054
|
|
|
26978
27055
|
if (bFirstPoint==false) this.Canvas.stroke();
|
|
@@ -27015,6 +27092,7 @@ function ChartKLine()
|
|
|
27015
27092
|
eventUnchangeKLine=this.GetEventCallback(JSCHART_EVENT_ID.ON_CUSTOM_UNCHANGE_KLINE_COLOR);
|
|
27016
27093
|
}
|
|
27017
27094
|
|
|
27095
|
+
var preKItemInfo=null;
|
|
27018
27096
|
for(var i=this.Data.DataOffset,j=0;i<this.Data.Data.length && j<xPointCount;++i,++j,xOffset+=(dataWidth+distanceWidth),++this.ShowRange.DataCount)
|
|
27019
27097
|
{
|
|
27020
27098
|
var data=this.Data.Data[i];
|
|
@@ -27031,6 +27109,8 @@ function ChartKLine()
|
|
|
27031
27109
|
var yClose=this.GetYFromData(data.Close, false);
|
|
27032
27110
|
var y=yHigh;
|
|
27033
27111
|
|
|
27112
|
+
var kItemInfo={ Data:data, Coordinate:{ X:x, Low:yLow, High:yHigh, Close:yClose, Open:yClose, Left:left, Right:right }};
|
|
27113
|
+
|
|
27034
27114
|
this.DrawKRange.End=i;
|
|
27035
27115
|
if (ptMax.Value==null || ptMax.Value<data.High) //求最大值
|
|
27036
27116
|
{
|
|
@@ -27134,6 +27214,17 @@ function ChartKLine()
|
|
|
27134
27214
|
{
|
|
27135
27215
|
ptLast={ X:x, Y:yClose, XLeft:left, XRight:right, KItem:data, ChartRight:chartright };
|
|
27136
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;
|
|
27137
27228
|
}
|
|
27138
27229
|
|
|
27139
27230
|
this.DrawLastPointEvent(ptLast); //通知外部绘制最后一个点
|
|
@@ -28772,6 +28863,7 @@ function ChartKLine()
|
|
|
28772
28863
|
this.PtMax={X:null,Y:null,Value:null,Align:'left'}; //清空最大
|
|
28773
28864
|
this.PtMin={X:null,Y:null,Value:null,Align:'left'}; //清空最小
|
|
28774
28865
|
this.DrawKRange={ Start:null, End:null };
|
|
28866
|
+
this.AryPriceGapCache=[];
|
|
28775
28867
|
|
|
28776
28868
|
this.ChartFrame.ChartKLine={Max:null, Min:null }; //保存K线上 显示最大最小值坐标
|
|
28777
28869
|
|
|
@@ -28812,6 +28904,7 @@ function ChartKLine()
|
|
|
28812
28904
|
{
|
|
28813
28905
|
this.DrawCloseLine();
|
|
28814
28906
|
this.Canvas.restore();
|
|
28907
|
+
if (this.PriceGap.Enable) this.DrawPriceGap();
|
|
28815
28908
|
return;
|
|
28816
28909
|
}
|
|
28817
28910
|
else if (this.DrawType==2)
|
|
@@ -28872,8 +28965,11 @@ function ChartKLine()
|
|
|
28872
28965
|
|
|
28873
28966
|
if (this.TradeIcon) this.DrawTradeIcon()
|
|
28874
28967
|
else this.DrawTrade();
|
|
28968
|
+
|
|
28875
28969
|
this.Canvas.restore();
|
|
28876
28970
|
|
|
28971
|
+
if (this.PriceGap.Enable) this.DrawPriceGap();
|
|
28972
|
+
|
|
28877
28973
|
if (this.IsShowMaxMinPrice) //标注最大值最小值
|
|
28878
28974
|
{
|
|
28879
28975
|
if (this.ChartFrame.IsHScreen===true) this.HScreenDrawMaxMinPrice(this.PtMax,this.PtMin);
|
|
@@ -30629,6 +30725,169 @@ function ChartKLine()
|
|
|
30629
30725
|
|
|
30630
30726
|
}
|
|
30631
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
|
+
}
|
|
30632
30891
|
|
|
30633
30892
|
}
|
|
30634
30893
|
|
|
@@ -40093,7 +40352,7 @@ function ChartMultiText()
|
|
|
40093
40352
|
for(var k=0;k<textItem.Data.length;++k)
|
|
40094
40353
|
{
|
|
40095
40354
|
var item=textItem.Data[k];
|
|
40096
|
-
|
|
40355
|
+
var y=top;
|
|
40097
40356
|
if (item.Value=="TOP") y=top;
|
|
40098
40357
|
else if (item.Value=="BOTTOM") y=bottom;
|
|
40099
40358
|
else y=this.ChartFrame.GetYFromData(item.Value);
|
|
@@ -66093,6 +66352,12 @@ function JSChartResource()
|
|
|
66093
66352
|
LineDash:[2,2]
|
|
66094
66353
|
};
|
|
66095
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
|
+
|
|
66096
66361
|
//订单流配置
|
|
66097
66362
|
this.OrderFlow=
|
|
66098
66363
|
{
|
|
@@ -67051,6 +67316,17 @@ function JSChartResource()
|
|
|
67051
67316
|
if (item.LineDash) this.VirtualKLine.LineDash=item.LineDash;
|
|
67052
67317
|
}
|
|
67053
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
|
+
|
|
67054
67330
|
if (style.Index)
|
|
67055
67331
|
{
|
|
67056
67332
|
if (style.Index.LineColor) this.Index.LineColor = style.Index.LineColor;
|
|
@@ -75295,6 +75571,18 @@ function KLineChartContainer(uielement,OffscreenElement, cacheElement)
|
|
|
75295
75571
|
|
|
75296
75572
|
this.ScrollBar.Reset({Draw:true});
|
|
75297
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
|
+
}
|
|
75298
75586
|
}
|
|
75299
75587
|
|
|
75300
75588
|
//API 返回数据 转化为array[]
|
|
@@ -87844,6 +88132,46 @@ function KLineRightMenu(divElement)
|
|
|
87844
88132
|
return data;
|
|
87845
88133
|
}
|
|
87846
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
|
+
|
|
87847
88175
|
this.GetKLineInfo=function(chart)
|
|
87848
88176
|
{
|
|
87849
88177
|
var setInfo=new Set();
|
|
@@ -87922,6 +88250,10 @@ function KLineRightMenu(divElement)
|
|
|
87922
88250
|
text:'信息地雷',
|
|
87923
88251
|
children: this.GetKLineInfo(chart)
|
|
87924
88252
|
},
|
|
88253
|
+
{
|
|
88254
|
+
text:'缺口提示',
|
|
88255
|
+
children: this.GetPriceGap(chart)
|
|
88256
|
+
},
|
|
87925
88257
|
{
|
|
87926
88258
|
text: "叠加品种",
|
|
87927
88259
|
children: this.GetOverlay(chart)
|
|
@@ -118560,6 +118892,12 @@ function GetBlackStyle()
|
|
|
118560
118892
|
Color:'rgb(119,136,153)',
|
|
118561
118893
|
LineDash:[2,2]
|
|
118562
118894
|
},
|
|
118895
|
+
|
|
118896
|
+
PriceGapStyple:
|
|
118897
|
+
{
|
|
118898
|
+
Line:{ Color:"rgb(128,128,128)" },
|
|
118899
|
+
Text:{ Color:"rgb(219,220,220)", Font:`${12*GetDevicePixelRatio()}px 微软雅黑` }
|
|
118900
|
+
},
|
|
118563
118901
|
|
|
118564
118902
|
Index:
|
|
118565
118903
|
{
|
|
@@ -129341,7 +129679,7 @@ function HQChartScriptWorker()
|
|
|
129341
129679
|
|
|
129342
129680
|
|
|
129343
129681
|
|
|
129344
|
-
var HQCHART_VERSION="1.1.
|
|
129682
|
+
var HQCHART_VERSION="1.1.12985";
|
|
129345
129683
|
|
|
129346
129684
|
function PrintHQChartVersion()
|
|
129347
129685
|
{
|