hqchart 1.1.12516 → 1.1.12522
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 +30 -8
- package/package.json +1 -1
- package/src/jscommon/umychart.js +428 -4
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +429 -5
- package/src/jscommon/umychart.version.js +1 -1
- package/src/jscommon/umychart.vue/umychart.vue.js +429 -5
- package/src/jscommon/umychart.wechat/umychart.chartpaint.wechat.js +13 -1
- package/src/jscommon/umychart.wechat/umychart.index.wechat.js +6 -0
|
@@ -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-
|
|
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 &&
|
|
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
|
|
|
@@ -56045,7 +56049,9 @@ IChartDrawPicture.ArrayDrawPricture=
|
|
|
56045
56049
|
{ Name:"AnchoredText", ClassName:"ChartDrawAnchoredText", Create:function() { return new ChartDrawAnchoredText();} },
|
|
56046
56050
|
{ Name:"PriceLabel", ClassName:"ChartDrawPriceLabel", Create:function() { return new ChartDrawPriceLabel();} },
|
|
56047
56051
|
{ Name:"PriceNote", ClassName:"ChartDrawPriceNote", Create:function() { return new ChartDrawPriceNote();} },
|
|
56048
|
-
{ Name:"FibWedge", ClassName:"ChartDrawFibWedge", Create:function(){ return new ChartDrawFibWedge(); }}
|
|
56052
|
+
{ Name:"FibWedge", ClassName:"ChartDrawFibWedge", Create:function(){ return new ChartDrawFibWedge(); }},
|
|
56053
|
+
{ Name:"FibRetracement", ClassName:"ChartFibRetracement", Create:function() { return new ChartFibRetracement(); }}, //斐波那契回测
|
|
56054
|
+
{ Name:"FibSpeedResistanceFan", ClassName:"ChartFibSpeedResistanceFan", Create:function() { return new ChartFibSpeedResistanceFan(); }} //斐波那契扇形
|
|
56049
56055
|
];
|
|
56050
56056
|
|
|
56051
56057
|
IChartDrawPicture.MapIonFont=new Map(
|
|
@@ -58316,7 +58322,7 @@ function ChartDrawPictureParallelChannel()
|
|
|
58316
58322
|
var ptCenter=new Point();
|
|
58317
58323
|
ptCenter.X=linePoint.Start.X+(linePoint.End.X-linePoint.Start.X)/2;
|
|
58318
58324
|
ptCenter.Y=linePoint.Start.Y+(linePoint.End.Y-linePoint.Start.Y)/2;
|
|
58319
|
-
drawPoint[
|
|
58325
|
+
drawPoint[2]=ptCenter;
|
|
58320
58326
|
|
|
58321
58327
|
this.Point[2]=ptCenter;
|
|
58322
58328
|
var xValue=parseInt(this.Frame.GetXData(ptCenter.X))+data.DataOffset;
|
|
@@ -58749,6 +58755,7 @@ function ChartDrawPictureGannFan()
|
|
|
58749
58755
|
else return 3;
|
|
58750
58756
|
}
|
|
58751
58757
|
|
|
58758
|
+
|
|
58752
58759
|
//isDotline 是否是虚线
|
|
58753
58760
|
this.DrawLine=function(ptStart,ptEnd,isDottedline)
|
|
58754
58761
|
{
|
|
@@ -63528,6 +63535,423 @@ function ChartDrawFibWedge()
|
|
|
63528
63535
|
|
|
63529
63536
|
}
|
|
63530
63537
|
|
|
63538
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
63539
|
+
// 斐波那契回测
|
|
63540
|
+
//
|
|
63541
|
+
function ChartFibRetracement()
|
|
63542
|
+
{
|
|
63543
|
+
this.newMethod=IChartDrawPicture; //派生
|
|
63544
|
+
this.newMethod();
|
|
63545
|
+
delete this.newMethod;
|
|
63546
|
+
|
|
63547
|
+
this.ClassName='ChartFibRetracement';
|
|
63548
|
+
this.PointCount=2;
|
|
63549
|
+
this.Font=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
63550
|
+
this.IsPointIn=this.IsPointIn_XYValue_Line;
|
|
63551
|
+
this.GetXYCoordinate=this.GetXYCoordinate_default;
|
|
63552
|
+
this.PointToValue_Default=this.PointToValue;
|
|
63553
|
+
this.OnlyMoveXIndex=true;
|
|
63554
|
+
this.IsSupportMagnet=true;
|
|
63555
|
+
this.LineDash=[6,3];
|
|
63556
|
+
this.LineWidth=1;
|
|
63557
|
+
this.EnableBGColor=true;
|
|
63558
|
+
this.ExtendLine={ Left:false, Right: false }; //延长线
|
|
63559
|
+
|
|
63560
|
+
this.AreaConfig=
|
|
63561
|
+
{
|
|
63562
|
+
AryData:
|
|
63563
|
+
[
|
|
63564
|
+
{ Value: 0, Color:"rgb(128,128,128)", Enable:true },
|
|
63565
|
+
{ Value: 0.236, Color:"rgb(242,52,69)", Enable:true },
|
|
63566
|
+
{ Value: 0.382, Color:"rgb(255,152,0)",Enable:true },
|
|
63567
|
+
{ Value: 0.5, Color:"rgb(76,175,80)", Enable:true },
|
|
63568
|
+
{ Value: 0.618, Color:"rgb(8,153,129)", Enable:true },
|
|
63569
|
+
{ Value: 0.786, Color:"rgb(0,188,212)" ,Enable:true },
|
|
63570
|
+
{ Value: 1, Color:"rgb(120,123,134)", Enable:true },
|
|
63571
|
+
{ Value: 1.618, Color:"rgb(41,98,255)",Enable:true },
|
|
63572
|
+
{ Value: 2.618, Color:"rgb(242,54,69)",Enable:false },
|
|
63573
|
+
],
|
|
63574
|
+
|
|
63575
|
+
Opacity:0.3
|
|
63576
|
+
}
|
|
63577
|
+
|
|
63578
|
+
this.SetOption=function(option)
|
|
63579
|
+
{
|
|
63580
|
+
if (!option) return;
|
|
63581
|
+
|
|
63582
|
+
if (option.Font) this.Font=option.Font;
|
|
63583
|
+
if (option.LineWidth) this.LineWidth=option.LineWidth;
|
|
63584
|
+
if (option.LineDash) this.LineDash=option.LineDash;
|
|
63585
|
+
if (IFrameSplitOperator.IsBool(option.EnableBGColor)) this.EnableBGColor=option.EnableBGColor;
|
|
63586
|
+
if (option.ExtendLine)
|
|
63587
|
+
{
|
|
63588
|
+
var item=option.ExtendLine;
|
|
63589
|
+
if (IFrameSplitOperator.IsBool(item.Left)) this.ExtendLine.Left=item.Left;
|
|
63590
|
+
if (IFrameSplitOperator.IsBool(item.Right)) this.ExtendLine.Left=item.Right;
|
|
63591
|
+
}
|
|
63592
|
+
|
|
63593
|
+
if (option.AreaConfig) this.AreaConfig=option.AreaConfig;
|
|
63594
|
+
}
|
|
63595
|
+
|
|
63596
|
+
//导出成存储格式
|
|
63597
|
+
this.ExportStorageData=function()
|
|
63598
|
+
{
|
|
63599
|
+
var storageData=this.ExportBaseData();
|
|
63600
|
+
|
|
63601
|
+
storageData.Value=[];
|
|
63602
|
+
for(var i=0;i<this.Value.length && i<this.PointCount;++i)
|
|
63603
|
+
{
|
|
63604
|
+
var item=this.Value[i];
|
|
63605
|
+
storageData.Value.push( { XValue:item.XValue, YValue:item.YValue } );
|
|
63606
|
+
}
|
|
63607
|
+
|
|
63608
|
+
storageData.Font=this.Font;
|
|
63609
|
+
storageData.EnableBGColor=this.EnableBGColor;
|
|
63610
|
+
storageData.LineDash=this.LineDash;
|
|
63611
|
+
storageData.ExtendLine={ Left:this.ExtendLine.Left, Right:this.ExtendLine.Right };
|
|
63612
|
+
storageData.AreaConfig=CloneData(this.AreaConfig);
|
|
63613
|
+
|
|
63614
|
+
return storageData;
|
|
63615
|
+
}
|
|
63616
|
+
|
|
63617
|
+
this.ImportStorageData=function(storageData)
|
|
63618
|
+
{
|
|
63619
|
+
if (storageData.Font) this.Font=storageData.Font;
|
|
63620
|
+
if (storageData.LineDash) this.LineDash=storageData.LineDash;
|
|
63621
|
+
if (IFrameSplitOperator.IsBool(storageData.EnableBGColor)) this.EnableBGColor=storageData.EnableBGColor;
|
|
63622
|
+
if (storageData.ExtendLine) this.ExtendLine=storageData.ExtendLine;
|
|
63623
|
+
if (storageData.AreaConfig) this.AreaConfig=storageData.AreaConfig;
|
|
63624
|
+
}
|
|
63625
|
+
|
|
63626
|
+
this.Draw=function()
|
|
63627
|
+
{
|
|
63628
|
+
this.LinePoint=[];
|
|
63629
|
+
if (this.IsFrameMinSize()) return;
|
|
63630
|
+
var bCheckXY=true;
|
|
63631
|
+
if (this.ExtendLine.Left || this.ExtendLine.Right) bCheckXY=false;
|
|
63632
|
+
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
63633
|
+
if (!drawPoint) return;
|
|
63634
|
+
if (drawPoint.length!=2) return;
|
|
63635
|
+
|
|
63636
|
+
this.ClipFrame();
|
|
63637
|
+
|
|
63638
|
+
var ptStart=drawPoint[0];
|
|
63639
|
+
var ptEnd=drawPoint[1];
|
|
63640
|
+
|
|
63641
|
+
this.SetLineWidth();
|
|
63642
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
63643
|
+
this.Canvas.setLineDash(this.LineDash);
|
|
63644
|
+
this.Canvas.beginPath();
|
|
63645
|
+
this.Canvas.moveTo(ptStart.X,ptStart.Y);
|
|
63646
|
+
this.Canvas.lineTo(ptEnd.X,ptEnd.Y);
|
|
63647
|
+
this.Canvas.stroke();
|
|
63648
|
+
this.Canvas.setLineDash([]);
|
|
63649
|
+
|
|
63650
|
+
this.DrawBlock(ptStart, ptEnd);
|
|
63651
|
+
|
|
63652
|
+
this.RestoreLineWidth();
|
|
63653
|
+
|
|
63654
|
+
var line={Start:ptStart, End:ptEnd};
|
|
63655
|
+
this.LinePoint.push(line);
|
|
63656
|
+
|
|
63657
|
+
this.DrawPoint(drawPoint); //画点
|
|
63658
|
+
this.Canvas.restore();
|
|
63659
|
+
}
|
|
63660
|
+
|
|
63661
|
+
this.GetArrayAreaConfig=function()
|
|
63662
|
+
{
|
|
63663
|
+
var aryArea=[];
|
|
63664
|
+
for(var i=0;i<this.AreaConfig.AryData.length;++i)
|
|
63665
|
+
{
|
|
63666
|
+
var item=this.AreaConfig.AryData[i];
|
|
63667
|
+
if (item.Enable) aryArea.push(item);
|
|
63668
|
+
}
|
|
63669
|
+
|
|
63670
|
+
aryArea.sort((left,right)=>{ return right.Value-left.Value; })
|
|
63671
|
+
|
|
63672
|
+
return aryArea;
|
|
63673
|
+
}
|
|
63674
|
+
|
|
63675
|
+
this.DrawBlock=function(ptStart, ptEnd)
|
|
63676
|
+
{
|
|
63677
|
+
var yTop=Math.min(ptStart.Y, ptEnd.Y);
|
|
63678
|
+
var yBottom=Math.max(ptStart.Y, ptEnd.Y);
|
|
63679
|
+
var xLeft=Math.min(ptStart.X, ptEnd.X);
|
|
63680
|
+
var xRight=Math.max(ptStart.X, ptEnd.X);
|
|
63681
|
+
var height=yBottom-yTop;
|
|
63682
|
+
//var baseValue=Math.min(this.Value[0].YValue, this.Value[1].YValue);
|
|
63683
|
+
//var diffValue=Math.abs(this.Value[0].YValue-this.Value[1].YValue); //差值
|
|
63684
|
+
|
|
63685
|
+
if (this.ExtendLine.Right) xRight=this.Frame.ChartBorder.GetRight();
|
|
63686
|
+
if (this.ExtendLine.Left) xLeft=this.Frame.ChartBorder.GetLeft();
|
|
63687
|
+
|
|
63688
|
+
var aryArea=this.GetArrayAreaConfig();
|
|
63689
|
+
var yPre=null; //上一个点
|
|
63690
|
+
var clrArea=null;
|
|
63691
|
+
this.Canvas.font=this.Font;
|
|
63692
|
+
if (this.ExtendLine.Left) this.Canvas.textAlign="left";
|
|
63693
|
+
else this.Canvas.textAlign="right";
|
|
63694
|
+
this.Canvas.textBaseline="bottom";
|
|
63695
|
+
|
|
63696
|
+
for(var i=0;i<aryArea.length;++i)
|
|
63697
|
+
{
|
|
63698
|
+
var item=aryArea[i];
|
|
63699
|
+
var y=yBottom-height*item.Value;
|
|
63700
|
+
//var yValue=baseValue+diffValue*item.Value;
|
|
63701
|
+
yValue=this.Frame.GetYData(y,false);
|
|
63702
|
+
y=ToFixedPoint(y);
|
|
63703
|
+
if (this.EnableBGColor && IFrameSplitOperator.IsNumber(yPre))
|
|
63704
|
+
{
|
|
63705
|
+
var rtBG={ Left:xLeft, Right:xRight, Top:yPre, Bottom:y };
|
|
63706
|
+
rtBG.Width=rtBG.Right-rtBG.Left;
|
|
63707
|
+
rtBG.Height=rtBG.Bottom-rtBG.Top;
|
|
63708
|
+
this.Canvas.fillStyle=clrArea;
|
|
63709
|
+
this.Canvas.fillRect(rtBG.Left, rtBG.Top, rtBG.Width, rtBG.Height);
|
|
63710
|
+
}
|
|
63711
|
+
|
|
63712
|
+
this.Canvas.strokeStyle=item.Color;
|
|
63713
|
+
this.Canvas.beginPath();
|
|
63714
|
+
this.Canvas.moveTo(xLeft,y);
|
|
63715
|
+
this.Canvas.lineTo(xRight,y);
|
|
63716
|
+
this.Canvas.stroke();
|
|
63717
|
+
|
|
63718
|
+
var line={ Start:{X:xLeft, Y:y}, End:{X:xRight, Y:y} };
|
|
63719
|
+
this.LinePoint.push(line);
|
|
63720
|
+
|
|
63721
|
+
//文字
|
|
63722
|
+
var text=`${item.Value} (${yValue.toFixed(2)})`;
|
|
63723
|
+
this.Canvas.fillStyle=item.Color;
|
|
63724
|
+
if (this.ExtendLine.Left)
|
|
63725
|
+
this.Canvas.fillText(text,xLeft+2,y-2);
|
|
63726
|
+
else
|
|
63727
|
+
this.Canvas.fillText(text,xLeft-2,y-2);
|
|
63728
|
+
|
|
63729
|
+
yPre=y;
|
|
63730
|
+
clrArea=IChartDrawPicture.ColorToRGBA(item.Color, this.AreaConfig.Opacity);
|
|
63731
|
+
}
|
|
63732
|
+
}
|
|
63733
|
+
|
|
63734
|
+
}
|
|
63735
|
+
|
|
63736
|
+
|
|
63737
|
+
function ChartFibSpeedResistanceFan()
|
|
63738
|
+
{
|
|
63739
|
+
this.newMethod=IChartDrawPicture; //派生
|
|
63740
|
+
this.newMethod();
|
|
63741
|
+
delete this.newMethod;
|
|
63742
|
+
|
|
63743
|
+
this.ClassName='ChartFibSpeedResistanceFan';
|
|
63744
|
+
this.PointCount=2;
|
|
63745
|
+
this.Font=12*GetDevicePixelRatio() +"px 微软雅黑";
|
|
63746
|
+
this.IsPointIn=this.IsPointIn_XYValue_Line;
|
|
63747
|
+
this.GetXYCoordinate=this.GetXYCoordinate_default;
|
|
63748
|
+
this.PointToValue_Default=this.PointToValue;
|
|
63749
|
+
this.OnlyMoveXIndex=true;
|
|
63750
|
+
this.IsSupportMagnet=true;
|
|
63751
|
+
this.LineWidth=1;
|
|
63752
|
+
this.EnableBGColor=true;
|
|
63753
|
+
|
|
63754
|
+
this.AreaConfig=
|
|
63755
|
+
{
|
|
63756
|
+
AryYData:
|
|
63757
|
+
[
|
|
63758
|
+
{ Value: 0, Color:"rgb(128,128,128)", Enable:true },
|
|
63759
|
+
{ Value: 0.25, Color:"rgb(242,52,69)", Enable:true },
|
|
63760
|
+
{ Value: 0.382, Color:"rgb(255,152,0)",Enable:true },
|
|
63761
|
+
{ Value: 0.5, Color:"rgb(76,175,80)", Enable:true },
|
|
63762
|
+
{ Value: 0.618, Color:"rgb(8,153,129)", Enable:true },
|
|
63763
|
+
{ Value: 0.75, Color:"rgb(0,188,212)" ,Enable:true },
|
|
63764
|
+
{ Value: 1, Color:"rgb(120,123,134)", Enable:true },
|
|
63765
|
+
|
|
63766
|
+
],
|
|
63767
|
+
|
|
63768
|
+
AryXData:
|
|
63769
|
+
[
|
|
63770
|
+
{ Value: 0, Color:"rgb(128,128,128)", Enable:true },
|
|
63771
|
+
{ Value: 0.25, Color:"rgb(242,52,69)", Enable:true },
|
|
63772
|
+
{ Value: 0.382, Color:"rgb(255,152,0)",Enable:true },
|
|
63773
|
+
{ Value: 0.5, Color:"rgb(76,175,80)", Enable:true },
|
|
63774
|
+
{ Value: 0.618, Color:"rgb(8,153,129)", Enable:true },
|
|
63775
|
+
{ Value: 0.75, Color:"rgb(0,188,212)" ,Enable:true },
|
|
63776
|
+
{ Value: 1, Color:"rgb(120,123,134)", Enable:true },
|
|
63777
|
+
],
|
|
63778
|
+
|
|
63779
|
+
Opacity:0.3
|
|
63780
|
+
}
|
|
63781
|
+
|
|
63782
|
+
this.Draw=function()
|
|
63783
|
+
{
|
|
63784
|
+
this.LinePoint=[];
|
|
63785
|
+
if (this.IsFrameMinSize()) return;
|
|
63786
|
+
var bCheckXY=false;
|
|
63787
|
+
var drawPoint=this.CalculateDrawPoint( {IsCheckX:bCheckXY, IsCheckY:bCheckXY} );
|
|
63788
|
+
if (!drawPoint) return;
|
|
63789
|
+
if (drawPoint.length!=2) return;
|
|
63790
|
+
|
|
63791
|
+
this.ClipFrame();
|
|
63792
|
+
|
|
63793
|
+
var ptStart=drawPoint[0];
|
|
63794
|
+
var ptEnd=drawPoint[1];
|
|
63795
|
+
|
|
63796
|
+
this.SetLineWidth();
|
|
63797
|
+
this.DrawBlock(ptEnd, ptStart);
|
|
63798
|
+
this.RestoreLineWidth();
|
|
63799
|
+
|
|
63800
|
+
this.DrawPoint(drawPoint); //画点
|
|
63801
|
+
this.Canvas.restore();
|
|
63802
|
+
}
|
|
63803
|
+
|
|
63804
|
+
//获取在第几象限
|
|
63805
|
+
this.GetQuadrant=function(ptStart,ptEnd)
|
|
63806
|
+
{
|
|
63807
|
+
if (ptStart.X<ptEnd.X && ptStart.Y>ptEnd.Y) return 1;
|
|
63808
|
+
else if (ptStart.X>ptEnd.X && ptStart.Y>ptEnd.Y) return 2;
|
|
63809
|
+
else if (ptStart.X<ptEnd.X && ptStart.Y< ptEnd.Y) return 4;
|
|
63810
|
+
else return 3;
|
|
63811
|
+
}
|
|
63812
|
+
|
|
63813
|
+
this.DrawBlock=function(ptStart, ptEnd)
|
|
63814
|
+
{
|
|
63815
|
+
var center=ptEnd;
|
|
63816
|
+
var xDiff=ptEnd.X-ptStart.X;
|
|
63817
|
+
var yDiff=ptEnd.Y-ptStart.Y;
|
|
63818
|
+
var quadrant=this.GetQuadrant(center,ptStart); //象限
|
|
63819
|
+
|
|
63820
|
+
var aryYData=this.GetArrayAreaConfig(this.AreaConfig.AryYData);
|
|
63821
|
+
var ptPre=null; //上一个点
|
|
63822
|
+
var clrArea=null;
|
|
63823
|
+
this.Canvas.font=this.Font;
|
|
63824
|
+
var textOffset=4;
|
|
63825
|
+
if (quadrant==1 || quadrant==4)
|
|
63826
|
+
{
|
|
63827
|
+
this.Canvas.textAlign="right";
|
|
63828
|
+
textOffset=-4;
|
|
63829
|
+
}
|
|
63830
|
+
else
|
|
63831
|
+
{
|
|
63832
|
+
this.Canvas.textAlign="left";
|
|
63833
|
+
textOffset=4;
|
|
63834
|
+
}
|
|
63835
|
+
this.Canvas.textBaseline="middle";
|
|
63836
|
+
for(var i=0;i<aryYData.length;++i)
|
|
63837
|
+
{
|
|
63838
|
+
var item=aryYData[i];
|
|
63839
|
+
var y=item.Value*yDiff+ptStart.Y;
|
|
63840
|
+
|
|
63841
|
+
var pt=this.CalculateExtendLineEndPoint([center, {X:ptStart.X, Y:y}]);
|
|
63842
|
+
|
|
63843
|
+
if (ptPre)
|
|
63844
|
+
{
|
|
63845
|
+
this.Canvas.beginPath();
|
|
63846
|
+
this.Canvas.moveTo(center.X,center.Y);
|
|
63847
|
+
this.Canvas.lineTo(ptPre.X,ptPre.Y);
|
|
63848
|
+
this.Canvas.lineTo(pt.X,pt.Y);
|
|
63849
|
+
this.Canvas.closePath();
|
|
63850
|
+
this.Canvas.fillStyle=clrArea;
|
|
63851
|
+
this.Canvas.fill();
|
|
63852
|
+
}
|
|
63853
|
+
|
|
63854
|
+
this.Canvas.strokeStyle=item.Color;
|
|
63855
|
+
this.Canvas.beginPath();
|
|
63856
|
+
this.Canvas.moveTo(center.X,center.Y);
|
|
63857
|
+
this.Canvas.lineTo(pt.X,pt.Y);
|
|
63858
|
+
this.Canvas.stroke();
|
|
63859
|
+
|
|
63860
|
+
this.LinePoint.push({Start:center, End:pt});
|
|
63861
|
+
|
|
63862
|
+
if (item.Value!=1)
|
|
63863
|
+
{
|
|
63864
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
63865
|
+
this.Canvas.beginPath();
|
|
63866
|
+
this.Canvas.moveTo(center.X,y);
|
|
63867
|
+
this.Canvas.lineTo(ptStart.X,y);
|
|
63868
|
+
this.Canvas.stroke();
|
|
63869
|
+
}
|
|
63870
|
+
|
|
63871
|
+
ptPre=pt;
|
|
63872
|
+
clrArea=IChartDrawPicture.ColorToRGBA(item.Color, this.AreaConfig.Opacity);
|
|
63873
|
+
|
|
63874
|
+
//文字
|
|
63875
|
+
var text=`${item.Value}`;
|
|
63876
|
+
this.Canvas.fillStyle=item.Color;
|
|
63877
|
+
this.Canvas.fillText(text,center.X+textOffset,y);
|
|
63878
|
+
}
|
|
63879
|
+
|
|
63880
|
+
var aryXData=this.GetArrayAreaConfig(this.AreaConfig.AryXData);
|
|
63881
|
+
var ptPre=null;
|
|
63882
|
+
this.Canvas.textAlign="center";
|
|
63883
|
+
if (quadrant==3 || quadrant==4)
|
|
63884
|
+
{
|
|
63885
|
+
this.Canvas.textBaseline="bottom";
|
|
63886
|
+
textOffset=-5;
|
|
63887
|
+
}
|
|
63888
|
+
else
|
|
63889
|
+
{
|
|
63890
|
+
this.Canvas.textBaseline="top";
|
|
63891
|
+
textOffset=5;
|
|
63892
|
+
}
|
|
63893
|
+
|
|
63894
|
+
for(var i=0;i<aryXData.length;++i)
|
|
63895
|
+
{
|
|
63896
|
+
var item=aryXData[i];
|
|
63897
|
+
var x=item.Value*xDiff+ptStart.X;
|
|
63898
|
+
|
|
63899
|
+
var pt=this.CalculateExtendLineEndPoint([center, {X:x, Y:ptStart.Y}]);
|
|
63900
|
+
|
|
63901
|
+
if (ptPre) //面积
|
|
63902
|
+
{
|
|
63903
|
+
this.Canvas.beginPath();
|
|
63904
|
+
this.Canvas.moveTo(center.X,center.Y);
|
|
63905
|
+
this.Canvas.lineTo(ptPre.X,ptPre.Y);
|
|
63906
|
+
this.Canvas.lineTo(pt.X,pt.Y);
|
|
63907
|
+
this.Canvas.closePath();
|
|
63908
|
+
this.Canvas.fillStyle=clrArea;
|
|
63909
|
+
this.Canvas.fill();
|
|
63910
|
+
}
|
|
63911
|
+
|
|
63912
|
+
this.Canvas.strokeStyle=item.Color;
|
|
63913
|
+
this.Canvas.beginPath();
|
|
63914
|
+
this.Canvas.moveTo(center.X,center.Y);
|
|
63915
|
+
this.Canvas.lineTo(pt.X,pt.Y);
|
|
63916
|
+
this.Canvas.stroke();
|
|
63917
|
+
|
|
63918
|
+
this.LinePoint.push({Start:center, End:pt});
|
|
63919
|
+
|
|
63920
|
+
if (item.Value!=1)
|
|
63921
|
+
{
|
|
63922
|
+
this.Canvas.strokeStyle=this.LineColor;
|
|
63923
|
+
this.Canvas.beginPath();
|
|
63924
|
+
this.Canvas.moveTo(x,center.Y);
|
|
63925
|
+
this.Canvas.lineTo(x,ptStart.Y);
|
|
63926
|
+
this.Canvas.stroke();
|
|
63927
|
+
}
|
|
63928
|
+
|
|
63929
|
+
ptPre=pt;
|
|
63930
|
+
clrArea=IChartDrawPicture.ColorToRGBA(item.Color, this.AreaConfig.Opacity);
|
|
63931
|
+
|
|
63932
|
+
//文字
|
|
63933
|
+
var text=`${item.Value}`;
|
|
63934
|
+
this.Canvas.fillStyle=item.Color;
|
|
63935
|
+
this.Canvas.fillText(text,x,center.Y+textOffset);
|
|
63936
|
+
}
|
|
63937
|
+
}
|
|
63938
|
+
|
|
63939
|
+
this.GetArrayAreaConfig=function(aryData)
|
|
63940
|
+
{
|
|
63941
|
+
var aryArea=[];
|
|
63942
|
+
for(var i=0;i<aryData.length;++i)
|
|
63943
|
+
{
|
|
63944
|
+
var item=aryData[i];
|
|
63945
|
+
if (item.Enable) aryArea.push(item);
|
|
63946
|
+
}
|
|
63947
|
+
|
|
63948
|
+
aryArea.sort((left,right)=>{ return right.Value-left.Value; })
|
|
63949
|
+
|
|
63950
|
+
return aryArea;
|
|
63951
|
+
}
|
|
63952
|
+
|
|
63953
|
+
}
|
|
63954
|
+
|
|
63531
63955
|
function ChartDrawStorage()
|
|
63532
63956
|
{
|
|
63533
63957
|
this.DrawData=new Map(); //画图工具数据 key=symbol-Period, value=Map() Key:Guid, Value:{Guid, Symbol, Period, ClassName, Value}
|
|
@@ -128463,7 +128887,7 @@ function ScrollBarBGChart()
|
|
|
128463
128887
|
|
|
128464
128888
|
|
|
128465
128889
|
|
|
128466
|
-
var HQCHART_VERSION="1.1.
|
|
128890
|
+
var HQCHART_VERSION="1.1.12521";
|
|
128467
128891
|
|
|
128468
128892
|
function PrintHQChartVersion()
|
|
128469
128893
|
{
|