hqchart 1.1.12516 → 1.1.12525

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.
@@ -33095,6 +33095,7 @@ function ChartStick()
33095
33095
  this.Draw=function()
33096
33096
  {
33097
33097
  if (!this.IsShow || this.ChartFrame.IsMinSize) return;
33098
+ if (this.IsHideScriptIndex()) return;
33098
33099
 
33099
33100
  if (this.NotSupportMessage)
33100
33101
  {
@@ -33120,6 +33121,8 @@ function ChartLineStick()
33120
33121
  this.Draw=function()
33121
33122
  {
33122
33123
  if (!this.IsShow || this.ChartFrame.IsMinSize) return;
33124
+ if (this.IsShowIndexTitleOnly()) return;
33125
+ if (this.IsHideScriptIndex()) return;
33123
33126
 
33124
33127
  if (this.NotSupportMessage)
33125
33128
  {
@@ -43648,7 +43651,7 @@ function DrawToolsButton()
43648
43651
  { HTML: { Title: 'M头W底', IClass: 'iconfont icon-draw_wavemw', ID: 'icon-wavemw' }, Name: 'M头W底' },
43649
43652
  { HTML: { Title: '头肩型', IClass: 'iconfont icon-draw_head_shoulders_bt', ID: 'icon-Head-Shoulders' }, Name: '头肩型' },
43650
43653
  { HTML: { Title: '波浪尺', IClass: 'iconfont icon-waveruler', ID: 'icon-wave-ruler' }, Name: '波浪尺' },
43651
- { HTML: { Title: 'AB波浪尺', IClass: 'iconfont icon-waveruler', ID: 'icon-wave-ruler' }, Name: 'AB波浪尺' },
43654
+ { HTML: { Title: 'AB波浪尺', IClass: 'iconfont icon-waveruler', ID: 'icon-wave-ruler2' }, Name: 'AB波浪尺' },
43652
43655
  { HTML: { Title: '箱型线', IClass: 'iconfont icon-draw_box', ID: 'icon-drawbox' }, Name: '箱型线' },
43653
43656
  { HTML: { Title: '涂鸦线段', IClass: 'iconfont icon-draw_line', ID: 'icon-segment2' }, Name: '涂鸦线段' },
43654
43657
 
@@ -52631,7 +52634,8 @@ function DynamicMinuteTitlePainting()
52631
52634
 
52632
52635
  if (beforeItem && dataItem) //盘前数据
52633
52636
  {
52634
- if (beforeItem.Date>dataItem.Date || (beforeItem.Date==dataItem.Date && beforeItem.Time>dataItem.Time && afterDataVer==1.0) )
52637
+ if (beforeItem.Date>dataItem.Date || (beforeItem.Date==dataItem.Date && beforeItem.Time>dataItem.Time && beforeDataVer==1.0)
52638
+ || (beforeItem.Date==dataItem.Date && parseInt(beforeItem.Time>dataItem.Time) && beforeDataVer==2.0))
52635
52639
  return { Type:2, Data:beforeItem, Ver: beforeDataVer, Explain:beforeExplain};
52636
52640
  }
52637
52641
 
@@ -54721,6 +54725,7 @@ function IChartDrawPicture()
54721
54725
  this.EnableCtrlMove=false; //是否按住Ctrl才能移动
54722
54726
  this.OnlyMoveXIndex=false; //只能在X轴刻度上移动
54723
54727
  this.IsSupportMagnet=false; //是否支持磁吸
54728
+ this.EnableMoveCheck=true; //允许移动时监测是否超出边界
54724
54729
 
54725
54730
  this.IsDrawFirst=false;
54726
54731
  this.IsShowYCoordinate=false; //是否在Y轴显示点的刻度
@@ -55069,6 +55074,8 @@ function IChartDrawPicture()
55069
55074
  var index=parseInt(this.MovePointIndex);
55070
55075
  if (index===100) //整体移动
55071
55076
  {
55077
+ if (this.IsMoveOutOfBounds(this.Point, xStep, yStep)) return false;
55078
+
55072
55079
  for(var i in this.Point)
55073
55080
  {
55074
55081
  this.Point[i].X+=xStep;
@@ -55089,6 +55096,56 @@ function IChartDrawPicture()
55089
55096
  }
55090
55097
  }
55091
55098
 
55099
+ //是否超出边界了
55100
+ this.IsMoveOutOfBounds=function(aryPoint,xStep,yStep)
55101
+ {
55102
+ if (!this.EnableMoveCheck) return false;
55103
+
55104
+ if (!this.Frame) return false;
55105
+
55106
+ if (this.Frame.ClassName=="MinuteFrame" || this.Frame.Class=="MinuteHScreenFrame")
55107
+ return false;
55108
+
55109
+
55110
+ var data=this.Frame.Data;
55111
+ if (!data) return false;
55112
+ if (!IFrameSplitOperator.IsNonEmptyArray(data.Data)) return false;
55113
+ if (!IFrameSplitOperator.IsNonEmptyArray(aryPoint)) return false;
55114
+ var isHScreen=this.Frame.IsHScreen;
55115
+ if (isHScreen)
55116
+ {
55117
+ //TODO:横屏以后再做
55118
+ return false;
55119
+ }
55120
+ else
55121
+ {
55122
+ var offset=data.DataOffset;
55123
+ var startIndex=0-offset;
55124
+ var endIndex=data.Data.length-offset;
55125
+
55126
+ if (xStep>0)
55127
+ {
55128
+ var xEnd=this.Frame.GetXFromIndex(endIndex-1,false);
55129
+ for(var i=0;i<aryPoint.length;++i)
55130
+ {
55131
+ var item=aryPoint[i];
55132
+ if (item.X+xStep>xEnd) return true;
55133
+ }
55134
+ }
55135
+ else if (xStep<0)
55136
+ {
55137
+ var xStart=this.Frame.GetXFromIndex(startIndex,false);
55138
+ for(var i=0;i<aryPoint.length;++i)
55139
+ {
55140
+ var item=aryPoint[i];
55141
+ if (item.X+xStep<xStart) return true;
55142
+ }
55143
+ }
55144
+
55145
+ return false;
55146
+ }
55147
+ }
55148
+
55092
55149
  this.ClipFrame=function()
55093
55150
  {
55094
55151
  if (this.Frame.IsHScreen)
@@ -56045,7 +56102,9 @@ IChartDrawPicture.ArrayDrawPricture=
56045
56102
  { Name:"AnchoredText", ClassName:"ChartDrawAnchoredText", Create:function() { return new ChartDrawAnchoredText();} },
56046
56103
  { Name:"PriceLabel", ClassName:"ChartDrawPriceLabel", Create:function() { return new ChartDrawPriceLabel();} },
56047
56104
  { Name:"PriceNote", ClassName:"ChartDrawPriceNote", Create:function() { return new ChartDrawPriceNote();} },
56048
- { Name:"FibWedge", ClassName:"ChartDrawFibWedge", Create:function(){ return new ChartDrawFibWedge(); }}
56105
+ { Name:"FibWedge", ClassName:"ChartDrawFibWedge", Create:function(){ return new ChartDrawFibWedge(); }},
56106
+ { Name:"FibRetracement", ClassName:"ChartFibRetracement", Create:function() { return new ChartFibRetracement(); }}, //斐波那契回测
56107
+ { Name:"FibSpeedResistanceFan", ClassName:"ChartFibSpeedResistanceFan", Create:function() { return new ChartFibSpeedResistanceFan(); }} //斐波那契扇形
56049
56108
  ];
56050
56109
 
56051
56110
  IChartDrawPicture.MapIonFont=new Map(
@@ -56219,6 +56278,7 @@ function ChartDrawGraffitiLine()
56219
56278
  this.IsPointIn=this.IsPointIn_XYValue_Line;
56220
56279
  this.GetXYCoordinate=null;
56221
56280
  this.PointCount=2; //画点的个数
56281
+ this.EnableMoveCheck=false; //允许移动时不监测是否超出边界
56222
56282
 
56223
56283
  this.PointToValue=function()
56224
56284
  {
@@ -57243,6 +57303,8 @@ function ChartDrawPictureRect()
57243
57303
 
57244
57304
  this.ClassName='ChartDrawPictureRect';
57245
57305
  this.GetXYCoordinate=this.GetXYCoordinate_default;
57306
+ this.OnlyMoveXIndex=true;
57307
+ this.IsSupportMagnet=true;
57246
57308
 
57247
57309
  this.Draw=function()
57248
57310
  {
@@ -58316,7 +58378,7 @@ function ChartDrawPictureParallelChannel()
58316
58378
  var ptCenter=new Point();
58317
58379
  ptCenter.X=linePoint.Start.X+(linePoint.End.X-linePoint.Start.X)/2;
58318
58380
  ptCenter.Y=linePoint.Start.Y+(linePoint.End.Y-linePoint.Start.Y)/2;
58319
- drawPoint[3]=ptCenter;
58381
+ drawPoint[2]=ptCenter;
58320
58382
 
58321
58383
  this.Point[2]=ptCenter;
58322
58384
  var xValue=parseInt(this.Frame.GetXData(ptCenter.X))+data.DataOffset;
@@ -58749,6 +58811,7 @@ function ChartDrawPictureGannFan()
58749
58811
  else return 3;
58750
58812
  }
58751
58813
 
58814
+
58752
58815
  //isDotline 是否是虚线
58753
58816
  this.DrawLine=function(ptStart,ptEnd,isDottedline)
58754
58817
  {
@@ -63528,6 +63591,423 @@ function ChartDrawFibWedge()
63528
63591
 
63529
63592
  }
63530
63593
 
63594
+ //////////////////////////////////////////////////////////////////////////////
63595
+ // 斐波那契回测
63596
+ //
63597
+ function ChartFibRetracement()
63598
+ {
63599
+ this.newMethod=IChartDrawPicture; //派生
63600
+ this.newMethod();
63601
+ delete this.newMethod;
63602
+
63603
+ this.ClassName='ChartFibRetracement';
63604
+ this.PointCount=2;
63605
+ this.Font=12*GetDevicePixelRatio() +"px 微软雅黑";
63606
+ this.IsPointIn=this.IsPointIn_XYValue_Line;
63607
+ this.GetXYCoordinate=this.GetXYCoordinate_default;
63608
+ this.PointToValue_Default=this.PointToValue;
63609
+ this.OnlyMoveXIndex=true;
63610
+ this.IsSupportMagnet=true;
63611
+ this.LineDash=[6,3];
63612
+ this.LineWidth=1;
63613
+ this.EnableBGColor=true;
63614
+ this.ExtendLine={ Left:false, Right: false }; //延长线
63615
+
63616
+ this.AreaConfig=
63617
+ {
63618
+ AryData:
63619
+ [
63620
+ { Value: 0, Color:"rgb(128,128,128)", Enable:true },
63621
+ { Value: 0.236, Color:"rgb(242,52,69)", Enable:true },
63622
+ { Value: 0.382, Color:"rgb(255,152,0)",Enable:true },
63623
+ { Value: 0.5, Color:"rgb(76,175,80)", Enable:true },
63624
+ { Value: 0.618, Color:"rgb(8,153,129)", Enable:true },
63625
+ { Value: 0.786, Color:"rgb(0,188,212)" ,Enable:true },
63626
+ { Value: 1, Color:"rgb(120,123,134)", Enable:true },
63627
+ { Value: 1.618, Color:"rgb(41,98,255)",Enable:true },
63628
+ { Value: 2.618, Color:"rgb(242,54,69)",Enable:false },
63629
+ ],
63630
+
63631
+ Opacity:0.3
63632
+ }
63633
+
63634
+ this.SetOption=function(option)
63635
+ {
63636
+ if (!option) return;
63637
+
63638
+ if (option.Font) this.Font=option.Font;
63639
+ if (option.LineWidth) this.LineWidth=option.LineWidth;
63640
+ if (option.LineDash) this.LineDash=option.LineDash;
63641
+ if (IFrameSplitOperator.IsBool(option.EnableBGColor)) this.EnableBGColor=option.EnableBGColor;
63642
+ if (option.ExtendLine)
63643
+ {
63644
+ var item=option.ExtendLine;
63645
+ if (IFrameSplitOperator.IsBool(item.Left)) this.ExtendLine.Left=item.Left;
63646
+ if (IFrameSplitOperator.IsBool(item.Right)) this.ExtendLine.Left=item.Right;
63647
+ }
63648
+
63649
+ if (option.AreaConfig) this.AreaConfig=option.AreaConfig;
63650
+ }
63651
+
63652
+ //导出成存储格式
63653
+ this.ExportStorageData=function()
63654
+ {
63655
+ var storageData=this.ExportBaseData();
63656
+
63657
+ storageData.Value=[];
63658
+ for(var i=0;i<this.Value.length && i<this.PointCount;++i)
63659
+ {
63660
+ var item=this.Value[i];
63661
+ storageData.Value.push( { XValue:item.XValue, YValue:item.YValue } );
63662
+ }
63663
+
63664
+ storageData.Font=this.Font;
63665
+ storageData.EnableBGColor=this.EnableBGColor;
63666
+ storageData.LineDash=this.LineDash;
63667
+ storageData.ExtendLine={ Left:this.ExtendLine.Left, Right:this.ExtendLine.Right };
63668
+ storageData.AreaConfig=CloneData(this.AreaConfig);
63669
+
63670
+ return storageData;
63671
+ }
63672
+
63673
+ this.ImportStorageData=function(storageData)
63674
+ {
63675
+ if (storageData.Font) this.Font=storageData.Font;
63676
+ if (storageData.LineDash) this.LineDash=storageData.LineDash;
63677
+ if (IFrameSplitOperator.IsBool(storageData.EnableBGColor)) this.EnableBGColor=storageData.EnableBGColor;
63678
+ if (storageData.ExtendLine) this.ExtendLine=storageData.ExtendLine;
63679
+ if (storageData.AreaConfig) this.AreaConfig=storageData.AreaConfig;
63680
+ }
63681
+
63682
+ this.Draw=function()
63683
+ {
63684
+ this.LinePoint=[];
63685
+ if (this.IsFrameMinSize()) return;
63686
+ var bCheckXY=true;
63687
+ if (this.ExtendLine.Left || this.ExtendLine.Right) bCheckXY=false;
63688
+ var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
63689
+ if (!drawPoint) return;
63690
+ if (drawPoint.length!=2) return;
63691
+
63692
+ this.ClipFrame();
63693
+
63694
+ var ptStart=drawPoint[0];
63695
+ var ptEnd=drawPoint[1];
63696
+
63697
+ this.SetLineWidth();
63698
+ this.Canvas.strokeStyle=this.LineColor;
63699
+ this.Canvas.setLineDash(this.LineDash);
63700
+ this.Canvas.beginPath();
63701
+ this.Canvas.moveTo(ptStart.X,ptStart.Y);
63702
+ this.Canvas.lineTo(ptEnd.X,ptEnd.Y);
63703
+ this.Canvas.stroke();
63704
+ this.Canvas.setLineDash([]);
63705
+
63706
+ this.DrawBlock(ptStart, ptEnd);
63707
+
63708
+ this.RestoreLineWidth();
63709
+
63710
+ var line={Start:ptStart, End:ptEnd};
63711
+ this.LinePoint.push(line);
63712
+
63713
+ this.DrawPoint(drawPoint); //画点
63714
+ this.Canvas.restore();
63715
+ }
63716
+
63717
+ this.GetArrayAreaConfig=function()
63718
+ {
63719
+ var aryArea=[];
63720
+ for(var i=0;i<this.AreaConfig.AryData.length;++i)
63721
+ {
63722
+ var item=this.AreaConfig.AryData[i];
63723
+ if (item.Enable) aryArea.push(item);
63724
+ }
63725
+
63726
+ aryArea.sort((left,right)=>{ return right.Value-left.Value; })
63727
+
63728
+ return aryArea;
63729
+ }
63730
+
63731
+ this.DrawBlock=function(ptStart, ptEnd)
63732
+ {
63733
+ var yTop=Math.min(ptStart.Y, ptEnd.Y);
63734
+ var yBottom=Math.max(ptStart.Y, ptEnd.Y);
63735
+ var xLeft=Math.min(ptStart.X, ptEnd.X);
63736
+ var xRight=Math.max(ptStart.X, ptEnd.X);
63737
+ var height=yBottom-yTop;
63738
+ //var baseValue=Math.min(this.Value[0].YValue, this.Value[1].YValue);
63739
+ //var diffValue=Math.abs(this.Value[0].YValue-this.Value[1].YValue); //差值
63740
+
63741
+ if (this.ExtendLine.Right) xRight=this.Frame.ChartBorder.GetRight();
63742
+ if (this.ExtendLine.Left) xLeft=this.Frame.ChartBorder.GetLeft();
63743
+
63744
+ var aryArea=this.GetArrayAreaConfig();
63745
+ var yPre=null; //上一个点
63746
+ var clrArea=null;
63747
+ this.Canvas.font=this.Font;
63748
+ if (this.ExtendLine.Left) this.Canvas.textAlign="left";
63749
+ else this.Canvas.textAlign="right";
63750
+ this.Canvas.textBaseline="bottom";
63751
+
63752
+ for(var i=0;i<aryArea.length;++i)
63753
+ {
63754
+ var item=aryArea[i];
63755
+ var y=yBottom-height*item.Value;
63756
+ //var yValue=baseValue+diffValue*item.Value;
63757
+ yValue=this.Frame.GetYData(y,false);
63758
+ y=ToFixedPoint(y);
63759
+ if (this.EnableBGColor && IFrameSplitOperator.IsNumber(yPre))
63760
+ {
63761
+ var rtBG={ Left:xLeft, Right:xRight, Top:yPre, Bottom:y };
63762
+ rtBG.Width=rtBG.Right-rtBG.Left;
63763
+ rtBG.Height=rtBG.Bottom-rtBG.Top;
63764
+ this.Canvas.fillStyle=clrArea;
63765
+ this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
63766
+ }
63767
+
63768
+ this.Canvas.strokeStyle=item.Color;
63769
+ this.Canvas.beginPath();
63770
+ this.Canvas.moveTo(xLeft,y);
63771
+ this.Canvas.lineTo(xRight,y);
63772
+ this.Canvas.stroke();
63773
+
63774
+ var line={ Start:{X:xLeft, Y:y}, End:{X:xRight, Y:y} };
63775
+ this.LinePoint.push(line);
63776
+
63777
+ //文字
63778
+ var text=`${item.Value} (${yValue.toFixed(2)})`;
63779
+ this.Canvas.fillStyle=item.Color;
63780
+ if (this.ExtendLine.Left)
63781
+ this.Canvas.fillText(text,xLeft+2,y-2);
63782
+ else
63783
+ this.Canvas.fillText(text,xLeft-2,y-2);
63784
+
63785
+ yPre=y;
63786
+ clrArea=IChartDrawPicture.ColorToRGBA(item.Color, this.AreaConfig.Opacity);
63787
+ }
63788
+ }
63789
+
63790
+ }
63791
+
63792
+
63793
+ function ChartFibSpeedResistanceFan()
63794
+ {
63795
+ this.newMethod=IChartDrawPicture; //派生
63796
+ this.newMethod();
63797
+ delete this.newMethod;
63798
+
63799
+ this.ClassName='ChartFibSpeedResistanceFan';
63800
+ this.PointCount=2;
63801
+ this.Font=12*GetDevicePixelRatio() +"px 微软雅黑";
63802
+ this.IsPointIn=this.IsPointIn_XYValue_Line;
63803
+ this.GetXYCoordinate=this.GetXYCoordinate_default;
63804
+ this.PointToValue_Default=this.PointToValue;
63805
+ this.OnlyMoveXIndex=true;
63806
+ this.IsSupportMagnet=true;
63807
+ this.LineWidth=1;
63808
+ this.EnableBGColor=true;
63809
+
63810
+ this.AreaConfig=
63811
+ {
63812
+ AryYData:
63813
+ [
63814
+ { Value: 0, Color:"rgb(128,128,128)", Enable:true },
63815
+ { Value: 0.25, Color:"rgb(242,52,69)", Enable:true },
63816
+ { Value: 0.382, Color:"rgb(255,152,0)",Enable:true },
63817
+ { Value: 0.5, Color:"rgb(76,175,80)", Enable:true },
63818
+ { Value: 0.618, Color:"rgb(8,153,129)", Enable:true },
63819
+ { Value: 0.75, Color:"rgb(0,188,212)" ,Enable:true },
63820
+ { Value: 1, Color:"rgb(120,123,134)", Enable:true },
63821
+
63822
+ ],
63823
+
63824
+ AryXData:
63825
+ [
63826
+ { Value: 0, Color:"rgb(128,128,128)", Enable:true },
63827
+ { Value: 0.25, Color:"rgb(242,52,69)", Enable:true },
63828
+ { Value: 0.382, Color:"rgb(255,152,0)",Enable:true },
63829
+ { Value: 0.5, Color:"rgb(76,175,80)", Enable:true },
63830
+ { Value: 0.618, Color:"rgb(8,153,129)", Enable:true },
63831
+ { Value: 0.75, Color:"rgb(0,188,212)" ,Enable:true },
63832
+ { Value: 1, Color:"rgb(120,123,134)", Enable:true },
63833
+ ],
63834
+
63835
+ Opacity:0.3
63836
+ }
63837
+
63838
+ this.Draw=function()
63839
+ {
63840
+ this.LinePoint=[];
63841
+ if (this.IsFrameMinSize()) return;
63842
+ var bCheckXY=false;
63843
+ var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
63844
+ if (!drawPoint) return;
63845
+ if (drawPoint.length!=2) return;
63846
+
63847
+ this.ClipFrame();
63848
+
63849
+ var ptStart=drawPoint[0];
63850
+ var ptEnd=drawPoint[1];
63851
+
63852
+ this.SetLineWidth();
63853
+ this.DrawBlock(ptEnd, ptStart);
63854
+ this.RestoreLineWidth();
63855
+
63856
+ this.DrawPoint(drawPoint); //画点
63857
+ this.Canvas.restore();
63858
+ }
63859
+
63860
+ //获取在第几象限
63861
+ this.GetQuadrant=function(ptStart,ptEnd)
63862
+ {
63863
+ if (ptStart.X<ptEnd.X && ptStart.Y>ptEnd.Y) return 1;
63864
+ else if (ptStart.X>ptEnd.X && ptStart.Y>ptEnd.Y) return 2;
63865
+ else if (ptStart.X<ptEnd.X && ptStart.Y< ptEnd.Y) return 4;
63866
+ else return 3;
63867
+ }
63868
+
63869
+ this.DrawBlock=function(ptStart, ptEnd)
63870
+ {
63871
+ var center=ptEnd;
63872
+ var xDiff=ptEnd.X-ptStart.X;
63873
+ var yDiff=ptEnd.Y-ptStart.Y;
63874
+ var quadrant=this.GetQuadrant(center,ptStart); //象限
63875
+
63876
+ var aryYData=this.GetArrayAreaConfig(this.AreaConfig.AryYData);
63877
+ var ptPre=null; //上一个点
63878
+ var clrArea=null;
63879
+ this.Canvas.font=this.Font;
63880
+ var textOffset=4;
63881
+ if (quadrant==1 || quadrant==4)
63882
+ {
63883
+ this.Canvas.textAlign="right";
63884
+ textOffset=-4;
63885
+ }
63886
+ else
63887
+ {
63888
+ this.Canvas.textAlign="left";
63889
+ textOffset=4;
63890
+ }
63891
+ this.Canvas.textBaseline="middle";
63892
+ for(var i=0;i<aryYData.length;++i)
63893
+ {
63894
+ var item=aryYData[i];
63895
+ var y=item.Value*yDiff+ptStart.Y;
63896
+
63897
+ var pt=this.CalculateExtendLineEndPoint([center, {X:ptStart.X, Y:y}]);
63898
+
63899
+ if (ptPre)
63900
+ {
63901
+ this.Canvas.beginPath();
63902
+ this.Canvas.moveTo(center.X,center.Y);
63903
+ this.Canvas.lineTo(ptPre.X,ptPre.Y);
63904
+ this.Canvas.lineTo(pt.X,pt.Y);
63905
+ this.Canvas.closePath();
63906
+ this.Canvas.fillStyle=clrArea;
63907
+ this.Canvas.fill();
63908
+ }
63909
+
63910
+ this.Canvas.strokeStyle=item.Color;
63911
+ this.Canvas.beginPath();
63912
+ this.Canvas.moveTo(center.X,center.Y);
63913
+ this.Canvas.lineTo(pt.X,pt.Y);
63914
+ this.Canvas.stroke();
63915
+
63916
+ this.LinePoint.push({Start:center, End:pt});
63917
+
63918
+ if (item.Value!=1)
63919
+ {
63920
+ this.Canvas.strokeStyle=this.LineColor;
63921
+ this.Canvas.beginPath();
63922
+ this.Canvas.moveTo(center.X,y);
63923
+ this.Canvas.lineTo(ptStart.X,y);
63924
+ this.Canvas.stroke();
63925
+ }
63926
+
63927
+ ptPre=pt;
63928
+ clrArea=IChartDrawPicture.ColorToRGBA(item.Color, this.AreaConfig.Opacity);
63929
+
63930
+ //文字
63931
+ var text=`${item.Value}`;
63932
+ this.Canvas.fillStyle=item.Color;
63933
+ this.Canvas.fillText(text,center.X+textOffset,y);
63934
+ }
63935
+
63936
+ var aryXData=this.GetArrayAreaConfig(this.AreaConfig.AryXData);
63937
+ var ptPre=null;
63938
+ this.Canvas.textAlign="center";
63939
+ if (quadrant==3 || quadrant==4)
63940
+ {
63941
+ this.Canvas.textBaseline="bottom";
63942
+ textOffset=-5;
63943
+ }
63944
+ else
63945
+ {
63946
+ this.Canvas.textBaseline="top";
63947
+ textOffset=5;
63948
+ }
63949
+
63950
+ for(var i=0;i<aryXData.length;++i)
63951
+ {
63952
+ var item=aryXData[i];
63953
+ var x=item.Value*xDiff+ptStart.X;
63954
+
63955
+ var pt=this.CalculateExtendLineEndPoint([center, {X:x, Y:ptStart.Y}]);
63956
+
63957
+ if (ptPre) //面积
63958
+ {
63959
+ this.Canvas.beginPath();
63960
+ this.Canvas.moveTo(center.X,center.Y);
63961
+ this.Canvas.lineTo(ptPre.X,ptPre.Y);
63962
+ this.Canvas.lineTo(pt.X,pt.Y);
63963
+ this.Canvas.closePath();
63964
+ this.Canvas.fillStyle=clrArea;
63965
+ this.Canvas.fill();
63966
+ }
63967
+
63968
+ this.Canvas.strokeStyle=item.Color;
63969
+ this.Canvas.beginPath();
63970
+ this.Canvas.moveTo(center.X,center.Y);
63971
+ this.Canvas.lineTo(pt.X,pt.Y);
63972
+ this.Canvas.stroke();
63973
+
63974
+ this.LinePoint.push({Start:center, End:pt});
63975
+
63976
+ if (item.Value!=1)
63977
+ {
63978
+ this.Canvas.strokeStyle=this.LineColor;
63979
+ this.Canvas.beginPath();
63980
+ this.Canvas.moveTo(x,center.Y);
63981
+ this.Canvas.lineTo(x,ptStart.Y);
63982
+ this.Canvas.stroke();
63983
+ }
63984
+
63985
+ ptPre=pt;
63986
+ clrArea=IChartDrawPicture.ColorToRGBA(item.Color, this.AreaConfig.Opacity);
63987
+
63988
+ //文字
63989
+ var text=`${item.Value}`;
63990
+ this.Canvas.fillStyle=item.Color;
63991
+ this.Canvas.fillText(text,x,center.Y+textOffset);
63992
+ }
63993
+ }
63994
+
63995
+ this.GetArrayAreaConfig=function(aryData)
63996
+ {
63997
+ var aryArea=[];
63998
+ for(var i=0;i<aryData.length;++i)
63999
+ {
64000
+ var item=aryData[i];
64001
+ if (item.Enable) aryArea.push(item);
64002
+ }
64003
+
64004
+ aryArea.sort((left,right)=>{ return right.Value-left.Value; })
64005
+
64006
+ return aryArea;
64007
+ }
64008
+
64009
+ }
64010
+
63531
64011
  function ChartDrawStorage()
63532
64012
  {
63533
64013
  this.DrawData=new Map(); //画图工具数据 key=symbol-Period, value=Map() Key:Guid, Value:{Guid, Symbol, Period, ClassName, Value}
@@ -128463,7 +128943,7 @@ function ScrollBarBGChart()
128463
128943
 
128464
128944
 
128465
128945
 
128466
- var HQCHART_VERSION="1.1.12515";
128946
+ var HQCHART_VERSION="1.1.12523";
128467
128947
 
128468
128948
  function PrintHQChartVersion()
128469
128949
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var HQCHART_VERSION="1.1.12515";
8
+ var HQCHART_VERSION="1.1.12523";
9
9
 
10
10
  function PrintHQChartVersion()
11
11
  {