hqchart 1.1.14320 → 1.1.14330

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.
@@ -35863,199 +35863,292 @@ function ChartSimpleRadar()
35863
35863
  delete this.newMethod;
35864
35864
 
35865
35865
  this.ClassName='ChartSimpleRadar'; //类名
35866
- this.BorderPoint=[]; //边框点
35867
- this.DataPoint=[]; //数据点
35868
- this.CenterPoint={};
35869
- this.StartAngle=0;
35870
- this.Color='rgb(198,198,198)';
35871
- this.AreaColor='rgba(242,154,118,0.4)'; //面积图颜色
35866
+
35867
+ this.AreaColor='rgba(242,154,118,0.4)'; //
35872
35868
  this.AreaLineColor='rgb(242,154,118)';
35873
- this.TitleFont=24*GetDevicePixelRatio()+'px 微软雅黑';
35874
- this.TitleColor='rgb(102,102,102)';
35875
- this.BGColor = ['rgb(255,255,255)', 'rgb(224,224,224)']//背景色
35869
+
35870
+ this.TitleColor=g_JSChartResource.ChartSimpleRadar.TextColor;
35871
+ this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleRadar.TextFont);
35872
+ this.Offset=CloneData(g_JSChartResource.ChartSimpleRadar.Offset);
35873
+ this.BorderColor=g_JSChartResource.ChartSimpleRadar.BorderColor;
35874
+ this.AryBGColor=g_JSChartResource.ChartSimpleRadar.AryBGColor.slice();//背景色
35875
+ this.AryAreaConfig=g_JSChartResource.ChartSimpleRadar.AryArea.slice(); //面积图颜色
35876
+
35877
+ this.StartAngle=270;
35878
+ this.Radius=50;
35879
+ this.AryBorder=[1, 0.75, 0.5, 0.25];
35880
+ this.AryIndex; //指标{ Name:, Max:100, Min:0 },
35876
35881
 
35877
- this.DrawBorder=function() //画边框
35882
+ this.CenterPoint={};
35883
+ this.RectClient={ };
35884
+ this.AryIndexCache=[];
35885
+ this.MapDataCache=new Map(); //key=name value={ Data:[] }
35886
+ this.TextFont;
35887
+
35888
+
35889
+ this.ReloadResource=function(resource)
35878
35890
  {
35879
- if (this.BorderPoint.length<=0) return;
35891
+ this.TitleColor=g_JSChartResource.ChartSimpleRadar.TextColor;
35892
+ this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleRadar.TextFont);
35893
+ this.Offset=CloneData(g_JSChartResource.ChartSimpleRadar.Offset);
35894
+ this.BorderColor=g_JSChartResource.ChartSimpleRadar.BorderColor;
35895
+ this.AryBGColor=g_JSChartResource.ChartSimpleRadar.AryBGColor.slice();//背景色
35896
+ this.AryAreaConfig=g_JSChartResource.ChartSimpleRadar.AryArea.slice(); //面积图颜色
35897
+ }
35880
35898
 
35881
- this.Canvas.font=this.TitleFont;
35882
- this.Canvas.strokeStyle = this.Color;
35883
- const aryBorder=[1,0.8,0.6,0.4,0.2];
35884
- for (let j in aryBorder)
35899
+ this.DrawBorder=function() //画边框
35900
+ {
35901
+ this.Canvas.strokeStyle = this.BorderColor;
35902
+ this.Canvas.font=this.TextFont;
35903
+ for(var i=0;i<this.AryBorder.length;++i)
35885
35904
  {
35886
- var rate = aryBorder[j];
35887
- var isFirstDraw=true;
35888
- for(let i in this.BorderPoint)
35905
+ var rate = this.AryBorder[i];
35906
+ var radius=this.RectClient.Radius*rate;
35907
+ var bFirstDraw=true;
35908
+ for(var j=0;j<this.AryIndexCache.length;++j)
35889
35909
  {
35890
- var item=this.BorderPoint[i];
35891
- item.X = this.CenterPoint.X + item.Radius * Math.cos(item.Angle * Math.PI / 180) * rate;
35892
- item.Y = this.CenterPoint.Y + item.Radius * Math.sin(item.Angle * Math.PI / 180) * rate;
35893
- if (isFirstDraw)
35910
+ var item=this.AryIndexCache[j];
35911
+ var x = this.CenterPoint.X + radius * Math.cos(item.Angle * Math.PI / 180);
35912
+ var y = this.CenterPoint.Y + radius * Math.sin(item.Angle * Math.PI / 180);
35913
+ if (bFirstDraw)
35894
35914
  {
35895
35915
  this.Canvas.beginPath();
35896
- this.Canvas.moveTo(item.X,item.Y);
35897
- isFirstDraw=false;
35916
+ this.Canvas.moveTo(x,y);
35917
+ bFirstDraw=false;
35898
35918
  }
35899
35919
  else
35900
35920
  {
35901
- this.Canvas.lineTo(item.X,item.Y);
35921
+ this.Canvas.lineTo(x,y);
35902
35922
  }
35903
35923
  }
35904
35924
 
35905
35925
  this.Canvas.closePath();
35906
35926
  this.Canvas.stroke();
35907
- this.Canvas.fillStyle = this.BGColor[j%2==0?0:1];
35908
- this.Canvas.fill();
35927
+
35928
+ if (IFrameSplitOperator.IsNonEmptyArray(this.AryBGColor))
35929
+ {
35930
+ this.Canvas.fillStyle = this.AryBGColor[i%this.AryBGColor.length];
35931
+ this.Canvas.fill();
35932
+ }
35909
35933
  }
35910
35934
 
35911
35935
  this.Canvas.beginPath();
35912
- for(let i in this.BorderPoint)
35936
+ for(var i=0;i<this.AryIndexCache.length;++i)
35913
35937
  {
35914
- var item=this.BorderPoint[i];
35915
- item.X = this.CenterPoint.X + item.Radius * Math.cos(item.Angle * Math.PI / 180);
35916
- item.Y = this.CenterPoint.Y + item.Radius * Math.sin(item.Angle * Math.PI / 180);
35938
+ var item=this.AryIndexCache[i];
35939
+ var x = this.CenterPoint.X + item.Radius * Math.cos(item.Angle * Math.PI / 180);
35940
+ var y = this.CenterPoint.Y + item.Radius * Math.sin(item.Angle * Math.PI / 180);
35917
35941
  this.Canvas.moveTo(this.CenterPoint.X,this.CenterPoint.Y);
35918
- this.Canvas.lineTo(item.X,item.Y);
35919
- this.DrawText(item);
35942
+ this.Canvas.lineTo(x,y);
35943
+ this.DrawText(item, x, y);
35920
35944
  }
35921
35945
  this.Canvas.stroke();
35946
+
35947
+ }
35948
+
35949
+ this.GetRadarRate=function(indexItem, value)
35950
+ {
35951
+ var range={ Max:100, Min:0 };
35952
+ if (IFrameSplitOperator.IsNumber(indexItem.Max)) range.Max=indexItem.Max;
35953
+ if (IFrameSplitOperator.IsNumber(indexItem.Min)) range.Min=indexItem.Min;
35954
+
35955
+ if (value>range.Max) value=range.Max;
35956
+ else if (value<range.Min) value=range.Min;
35957
+
35958
+ return (value-range.Min)/(range.Max-range.Min);
35922
35959
  }
35923
35960
 
35924
35961
  this.DrawArea=function()
35925
35962
  {
35926
- if (!this.DataPoint || this.DataPoint.length<=0) return;
35963
+ if (this.MapDataCache.size<=0) return;
35927
35964
 
35928
- this.Canvas.fillStyle = this.AreaColor;
35929
- this.Canvas.strokeStyle = this.AreaLineColor;
35930
- this.Canvas.beginPath();
35931
- var isFirstDraw=true;
35932
- for(let i in this.DataPoint)
35965
+ var index=0;
35966
+ for(var mapItem of this.MapDataCache)
35933
35967
  {
35934
- var item=this.DataPoint[i];
35935
- if (isFirstDraw)
35968
+ var mapData=mapItem[1].MapData;
35969
+
35970
+ var bFirstDraw=true;
35971
+ var pointCount=0;
35972
+ for(var i=0;i<this.AryIndexCache.length;++i)
35936
35973
  {
35937
- this.Canvas.beginPath();
35938
- this.Canvas.moveTo(item.X,item.Y);
35939
- isFirstDraw=false;
35974
+ var indexItem=this.AryIndexCache[i];
35975
+ if (!indexItem.Data || !indexItem.Data.Name) continue;
35976
+ if (!mapData.has(indexItem.Data.Name)) continue;
35977
+ var item=mapData.get(indexItem.Data.Name);
35978
+ if (!item.Data && !IFrameSplitOperator.IsNumber(item.Data.Value)) conintue;
35979
+
35980
+ var widthRate=this.GetRadarRate(indexItem, item.Data.Value);
35981
+ var x = this.CenterPoint.X+indexItem.Radius*widthRate*Math.cos(indexItem.Angle * Math.PI / 180);
35982
+ var y = this.CenterPoint.Y+indexItem.Radius*widthRate*Math.sin(indexItem.Angle * Math.PI / 180);
35983
+
35984
+ if (bFirstDraw)
35985
+ {
35986
+ this.Canvas.beginPath();
35987
+ this.Canvas.moveTo(x,y);
35988
+ bFirstDraw=false;
35989
+ ++pointCount;
35990
+ }
35991
+ else
35992
+ {
35993
+ this.Canvas.lineTo(x,y);
35994
+ ++pointCount;
35995
+ }
35940
35996
  }
35941
- else
35997
+
35998
+ if (pointCount>0)
35942
35999
  {
35943
- this.Canvas.lineTo(item.X,item.Y);
36000
+ this.Canvas.closePath();
36001
+
36002
+ var config=this.AryAreaConfig[index%this.AryAreaConfig.length];
36003
+ if (config.Color)
36004
+ {
36005
+ this.Canvas.fillStyle = config.Color;
36006
+ this.Canvas.fill();
36007
+ }
36008
+
36009
+ if (config.LineColor)
36010
+ {
36011
+ this.Canvas.strokeStyle = config.LineColor;
36012
+ this.Canvas.stroke();
36013
+ }
35944
36014
  }
35945
- }
35946
36015
 
35947
- this.Canvas.closePath();
35948
- this.Canvas.fill();
35949
- this.Canvas.stroke();
36016
+ ++index;
36017
+ }
35950
36018
  }
35951
36019
 
35952
- this.DrawText=function(item)
36020
+ this.DrawText=function(item, x, y)
35953
36021
  {
35954
- if (!item.Text) return;
36022
+ if (!item.Data || !item.Data.Name) return;
35955
36023
 
35956
36024
  //JSConsole.Chart.Log(item.Text, item.Angle);
35957
36025
  this.Canvas.fillStyle = this.TitleColor;
35958
- var xText = item.X, yText = item.Y;
36026
+ var xText = x, yText =y;
36027
+
36028
+ var angle=item.Angle%360;
35959
36029
 
35960
36030
  //显示每个角度的位置
35961
- if (item.Angle > 0 && item.Angle < 45) {
36031
+ if (angle > 0 && angle < 45) {
35962
36032
  this.Canvas.textAlign = 'left';
35963
36033
  this.Canvas.textBaseline = 'middle';
35964
36034
  xText += 2;
35965
36035
  }
35966
- else if (item.Angle >= 0 && item.Angle < 90) {
36036
+ else if (angle >= 45 && angle < 90) {
35967
36037
  this.Canvas.textAlign = 'left';
35968
36038
  this.Canvas.textBaseline = 'top';
35969
36039
  xText += 2;
35970
36040
  }
35971
- else if (item.Angle >= 90 && item.Angle < 135) {
36041
+ else if (angle==90)
36042
+ {
36043
+ this.Canvas.textAlign = 'center';
36044
+ this.Canvas.textBaseline = 'top';
36045
+ yText+=2;
36046
+ }
36047
+ else if (angle >= 90 && angle < 135) {
35972
36048
  this.Canvas.textAlign = 'right';
35973
36049
  this.Canvas.textBaseline = 'top';
35974
36050
  xText -= 2;
35975
36051
  }
35976
- else if (item.Angle >= 135 && item.Angle < 180) {
36052
+ else if (angle >= 135 && angle < 180) {
35977
36053
  this.Canvas.textAlign = 'right';
35978
36054
  this.Canvas.textBaseline = 'top';
35979
36055
  xText -= 2;
35980
36056
  }
35981
- else if (item.Angle >= 180 && item.Angle < 225) {
36057
+ else if (angle >= 180 && angle < 225) {
35982
36058
  this.Canvas.textAlign = 'right';
35983
36059
  this.Canvas.textBaseline = 'middle';
35984
36060
  xText -= 2;
35985
36061
  }
35986
- else if (item.Angle >= 225 && item.Angle <= 270) {
36062
+ else if (angle >= 225 && angle <= 270) {
35987
36063
  this.Canvas.textAlign = 'center';
35988
36064
  this.Canvas.textBaseline = 'bottom';
35989
36065
  }
35990
- else if (item.Angle > 270 && item.Angle < 315) {
36066
+ else if (angle > 270 && angle < 315) {
35991
36067
  this.Canvas.textAlign = 'left';
35992
36068
  this.Canvas.textBaseline = 'bottom';
35993
36069
  xText += 2;
35994
36070
  }
35995
- else {
36071
+ else
36072
+ {
35996
36073
  this.Canvas.textAlign = 'left';
35997
36074
  this.Canvas.textBaseline = 'middle';
35998
36075
  xText += 2;
35999
36076
  }
36000
36077
 
36001
- this.Canvas.fillText(item.Text, xText, yText);
36078
+ this.Canvas.fillText(item.Data.Name, xText, yText);
36002
36079
  }
36003
36080
 
36004
36081
  this.Draw=function()
36005
36082
  {
36006
- this.BorderPoint=[];
36007
- this.DataPoint=[];
36008
- this.CenterPoint={};
36009
- if (!this.Data || !this.Data.Data || !(this.Data.Data.length>0))
36010
- this.CalculatePoints(null);
36011
- else
36012
- this.CalculatePoints(this.Data.Data);
36083
+ this.AryIndexCache=[];
36084
+ this.MapData=new Map();
36085
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.AryIndex)) return;
36086
+
36087
+ this.CalculateSize();
36013
36088
 
36014
36089
  this.DrawBorder();
36090
+
36015
36091
  this.DrawArea();
36016
36092
  }
36017
36093
 
36018
- this.CalculatePoints=function(data)
36094
+ this.BuildCacheData=function()
36019
36095
  {
36020
- let left=this.ChartBorder.GetLeft();
36021
- let right=this.ChartBorder.GetRight();
36022
- let top=this.ChartBorder.GetTop();
36023
- let bottom=this.ChartBorder.GetBottom();
36024
- let width=this.ChartBorder.GetWidth();
36025
- let height=this.ChartBorder.GetHeight();
36096
+ this.MapDataCache=new Map();
36026
36097
 
36027
- let ptCenter={X:left+width/2, Y:top+height/2}; //中心点
36028
- let radius=Math.min(width/2,height/2)-2 //半径
36029
- let count=Math.max(5,data?data.length:0);
36030
- let averageAngle=360/count;
36031
- for(let i=0;i<count;++i)
36098
+ for(var i=0;i<this.Data.Data.length;++i)
36032
36099
  {
36033
- let ptBorder = { Index: i, Radius: radius, Angle: i * averageAngle + this.StartAngle };
36034
- let angle = ptBorder.Angle;
36100
+ var item=this.Data.Data[i];
36101
+ if (!this.MapDataCache.has(item.Group))
36102
+ {
36103
+ this.MapDataCache.set(item.Group, { MapData:new Map() })
36104
+ }
36105
+
36106
+ var mpaItem=this.MapDataCache.get(item.Group);
36107
+ mpaItem.MapData.set(item.Name, { Data:item });
36108
+ }
36109
+ }
36035
36110
 
36036
- if (data && i<data.length)
36111
+ this.CalculateSize=function(data)
36112
+ {
36113
+ var border=this.ChartBorder.GetBorder();
36114
+ var pixelRatio=GetDevicePixelRatio();
36115
+ this.TextFont=`${this.TextFontConfig.Size*pixelRatio}px ${ this.TextFontConfig.Name}`;
36116
+ var fontHeight=this.GetFontHeight(this.TextFont,"擎")+1;
36117
+
36118
+ var maxTextWidth=0;
36119
+ if (IFrameSplitOperator.IsNonEmptyArray(this.AryIndex))
36120
+ {
36121
+ for(var i=0;i<this.AryIndex.length;++i)
36037
36122
  {
36038
- var item=data[i];
36039
- let ptData={Index:i,Text:item.Text};
36040
- ptBorder.Text=item.Name;
36041
- if (!item.Value)
36042
- {
36043
- ptData.X=ptCenter.X;
36044
- ptData.Y=ptCenter.Y;
36045
- }
36046
- else
36047
- {
36048
- var value=item.Value;
36049
- if (value>=1) value=1;
36050
- var dataRadius=radius*value;
36051
- ptData.X=ptCenter.X+dataRadius*Math.cos(angle*Math.PI/180);
36052
- ptData.Y=ptCenter.Y+dataRadius*Math.sin(angle*Math.PI/180);
36053
- }
36123
+ var item=this.AryIndex[i];
36124
+ if (!item.Name) continue;
36125
+ var textWidth=this.Canvas.measureText(item.Name).width;
36126
+ if (maxTextWidth<textWidth) maxTextWidth=textWidth;
36127
+ }
36128
+ }
36129
+
36130
+ var radius=this.Radius*2*pixelRatio; //半径
36131
+ this.RectClient={ Width:radius*2, Height:radius*2, Radius:radius };
36132
+ this.RectClient.Right=border.Right+this.Offset.X-maxTextWidth;
36133
+ this.RectClient.Top=border.TopEx+this.Offset.Y+fontHeight;
36134
+ this.RectClient.Left=this.RectClient.Right-this.RectClient.Width;
36135
+ this.RectClient.Bottom=this.RectClient.Top+this.RectClient.Height;
36136
+
36137
+ var ptCenter={X:this.RectClient.Left+this.RectClient.Width/2, Y:this.RectClient.Top+this.RectClient.Height/2}; //中心点
36138
+
36139
+ var count=Math.max(5,this.AryIndex.length);
36140
+ var averageAngle=360/count;
36141
+ for(var i=0;i<count;++i)
36142
+ {
36143
+ var angle=i*averageAngle+this.StartAngle;
36054
36144
 
36055
- this.DataPoint.push(ptData);
36145
+ var indexItem={ Data:null, Index:i, Angle:angle, Radius:radius };
36146
+ if (this.AryIndex && this.AryIndex[i])
36147
+ {
36148
+ indexItem.Data=this.AryIndex[i];
36056
36149
  }
36057
36150
 
36058
- this.BorderPoint.push(ptBorder);
36151
+ this.AryIndexCache.push(indexItem);
36059
36152
  }
36060
36153
 
36061
36154
  this.CenterPoint=ptCenter;
@@ -36064,7 +36157,7 @@ function ChartSimpleRadar()
36064
36157
  //空数据
36065
36158
  this.DrawEmptyData=function()
36066
36159
  {
36067
- JSConsole.Chart.Log('[ChartPie::DrawEmptyData]')
36160
+ JSConsole.Chart.Log('[ChartSimpleRadar::DrawEmptyData]')
36068
36161
  }
36069
36162
  }
36070
36163
 
@@ -74961,6 +75054,20 @@ function JSChartResource()
74961
75054
  Offset:{ X:-5, Y:5 }
74962
75055
  }
74963
75056
 
75057
+ this.ChartSimpleRadar=
75058
+ {
75059
+ TextFont:{ Family:'微软雅黑' , Size:12 },
75060
+ BorderColor:"rgb(169,169,169)",
75061
+ Offset:{ X:-5, Y:5 },
75062
+ TextColor:"rgb(105,105,105)",
75063
+ AryBGColor:['rgba(255,255,255,0.9)', 'rgba(230, 234, 242,0.9)'],
75064
+ AryArea:
75065
+ [
75066
+ { Color:"rgba(242,154,118,0.4)", LineColor:"rgb(242,154,118)"},
75067
+ { Color:"rgba(121,197,228,0.4)", LineColor:"rgb(92,165,196)"},
75068
+ ],
75069
+ }
75070
+
74964
75071
  //手机端tooltip
74965
75072
  this.TooltipPaint = {
74966
75073
  BGColor:'rgba(250,250,250,0.8)', //背景色
@@ -76192,6 +76299,7 @@ function JSChartResource()
76192
76299
 
76193
76300
  if (style.ChartSimpleTable) this.SetChartSimpleTable(style.ChartSimpleTable);
76194
76301
  if (style.ChartSimplePie) this.SetChartSimplePie(style.ChartSimplePie);
76302
+ if (style.ChartSimpleRadar) this.SetChartSimpleRadar(style.ChartSimpleRadar);
76195
76303
 
76196
76304
  if (style.DRAWICON)
76197
76305
  {
@@ -77285,6 +77393,30 @@ function JSChartResource()
77285
77393
  }
77286
77394
  }
77287
77395
 
77396
+ this.SetChartSimpleRadar=function(style)
77397
+ {
77398
+ var dest=this.ChartSimpleRadar;
77399
+ if (style.TextFont)
77400
+ {
77401
+ var item=style.TextFont;
77402
+ if (item.Name) dest.TextFont.Name=item.Name;
77403
+ if (IFrameSplitOperator.IsNumber(item.Size)) dest.TextFont.Size=item.Size;
77404
+ }
77405
+
77406
+ if (style.BorderColor) dest.BorderColor=style.BorderColor;
77407
+ if (style.TextColor) dest.TextColor=style.TextColor;
77408
+
77409
+ if (style.Offset)
77410
+ {
77411
+ var item=style.Offset;
77412
+ if (IFrameSplitOperator.IsNumber(item.X)) dest.Offset.X=item.X;
77413
+ if (IFrameSplitOperator.IsNumber(item.Y)) dest.Offset.Y=item.Y;
77414
+ }
77415
+
77416
+ if (IFrameSplitOperator.IsNonEmptyArray(style.AryBGColor)) dest.AryBGColor=style.AryBGColor.slice();
77417
+ if (IFrameSplitOperator.IsNonEmptyArray(style.AryArea)) dest.AryArea=style.AryArea.slice();
77418
+ }
77419
+
77288
77420
  }
77289
77421
 
77290
77422
  var g_JSChartResource=new JSChartResource();
@@ -112491,6 +112623,48 @@ function JSDraw(errorHandler,symbolData)
112491
112623
 
112492
112624
  return result={ DrawData:{ Data:aryCell, Radius:radius }, DrawType:"DRAW_SIMPLE_PIE" };
112493
112625
  }
112626
+
112627
+ this.RADAR_CELL=function(name, data, max, min)
112628
+ {
112629
+ var cellItem={ Name:name, Max:100, Min:0, Value:null };
112630
+ if (IFrameSplitOperator.IsNumber(data))
112631
+ {
112632
+ cellItem.Value=data;
112633
+ }
112634
+ else if (IFrameSplitOperator.IsString(data))
112635
+ {
112636
+ cellItem.Value=parseFloat(data);
112637
+ }
112638
+ else if (IFrameSplitOperator.IsNonEmptyArray(data))
112639
+ {
112640
+ var lastValue=data[data.length-1];
112641
+ if (IFrameSplitOperator.IsNumber(lastValue)) cellItem.Value=lastValue;
112642
+ else if (IFrameSplitOperator.IsString(lastValue)) cellItem.Value=parseFloat(lastValue);
112643
+ }
112644
+
112645
+ if (IFrameSplitOperator.IsNumber(max)) cellItem.Max=max;
112646
+ if (IFrameSplitOperator.IsNumber(min)) cellItem.Min=min;
112647
+
112648
+ return cellItem;
112649
+ }
112650
+
112651
+ this.DRAWRADAR=function(args)
112652
+ {
112653
+ var radius=args[0];
112654
+ var color=args[1];
112655
+
112656
+ var aryIndex=[];
112657
+ var aryData=[];
112658
+ for(var i=2;i<args.length;++i)
112659
+ {
112660
+ var item=args[i];
112661
+
112662
+ aryIndex.push({ Name:item.Name, Max:item.Max, Min:item.Min });
112663
+ aryData.push({ Value:item.Value, Name:item.Name, Group:"Default"});
112664
+ }
112665
+
112666
+ return result={ DrawData:{ Data:aryData, AryIndex:aryIndex, Radius:radius, AryArea:[{ LineColor:color }] }, DrawType:"DRAW_SIMPLE_RADAR" };
112667
+ }
112494
112668
  }
112495
112669
 
112496
112670
 
@@ -112545,7 +112719,7 @@ JSDraw.prototype.IsDrawFunction=function(name)
112545
112719
  'DRAWOVERLAYLINE',"FILLRGN", "FILLRGN2","FILLTOPRGN", "FILLBOTTOMRGN", "FILLVERTICALRGN","FLOATRGN","DRAWSL", "DRAWGBK2","DRAWGBK_DIV",
112546
112720
  "VERTLINE","HORLINE","TIPICON",
112547
112721
  "BUY","SELL","SELLSHORT","BUYSHORT",
112548
- "DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE","DRAWPIE",
112722
+ "DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE","DRAWPIE","DRAWRADAR",
112549
112723
  ]);
112550
112724
  if (setFunctionName.has(name)) return true;
112551
112725
 
@@ -119434,6 +119608,14 @@ function JSExecute(ast,option)
119434
119608
  node.Draw=this.Draw.DRAWPIE(args);
119435
119609
  node.Out=[];
119436
119610
  break;
119611
+ //雷达图
119612
+ case "RADAR_CELL":
119613
+ node.Out=this.Draw.RADAR_CELL(args[0],args[1],args[2],args[3]);
119614
+ break;
119615
+ case "DRAWRADAR":
119616
+ node.Draw=this.Draw.DRAWRADAR(args);
119617
+ node.Out=[];
119618
+ break;
119437
119619
 
119438
119620
  default:
119439
119621
  node.Out=this.Algorithm.CallFunction(funcName, args, node, this.SymbolData);
@@ -122450,6 +122632,35 @@ function ScriptIndex(name,script,args,option)
122450
122632
  hqChart.ChartPaint.push(chart);
122451
122633
  }
122452
122634
 
122635
+ this.CreateSimpleRadar=function(hqChart,windowIndex,varItem,id)
122636
+ {
122637
+ var chart=new ChartSimpleRadar();
122638
+ chart.Canvas=hqChart.Canvas;
122639
+ chart.Name=varItem.Name;
122640
+ chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
122641
+ chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
122642
+
122643
+ if (varItem.Draw && varItem.Draw.DrawData)
122644
+ {
122645
+ var drawData=varItem.Draw.DrawData;
122646
+ if (drawData.Data) chart.Data.Data=drawData.Data;
122647
+ if (drawData.AryIndex) chart.AryIndex=drawData.AryIndex;
122648
+ if (IFrameSplitOperator.IsPlusNumber(drawData.Radius)) chart.Radius=drawData.Radius;
122649
+ if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
122650
+
122651
+ if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
122652
+ if (drawData.TextColor) chart.TextColor=drawData.TextColor;
122653
+ if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
122654
+ if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
122655
+ if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
122656
+ if (IFrameSplitOperator.IsNonEmptyArray(drawData.AryArea)) chart.AryAreaConfig=drawData.AryArea;
122657
+
122658
+ chart.BuildCacheData();
122659
+ }
122660
+
122661
+ hqChart.ChartPaint.push(chart);
122662
+ }
122663
+
122453
122664
  this.CreateTradeIcon=function(hqChart,windowIndex,varItem,id)
122454
122665
  {
122455
122666
  var chart=new ChartTradeIcon();
@@ -123325,6 +123536,10 @@ function ScriptIndex(name,script,args,option)
123325
123536
  break;
123326
123537
  case "DRAW_SIMPLE_PIE":
123327
123538
  this.CreateSimplePie(hqChart,windowIndex,item,i);
123539
+ break;
123540
+ case "DRAW_SIMPLE_RADAR":
123541
+ this.CreateSimpleRadar(hqChart,windowIndex,item,i);
123542
+ break;
123328
123543
  case "BUY":
123329
123544
  case "SELL":
123330
123545
  case "SELLSHORT":
@@ -123677,7 +123892,10 @@ function OverlayScriptIndex(name,script,args,option)
123677
123892
  break;
123678
123893
  case "DRAW_SIMPLE_PIE":
123679
123894
  this.CreateSimplePie(hqChart,windowIndex,item,i);
123680
-
123895
+ break;
123896
+ case "DRAW_SIMPLE_RADAR":
123897
+ this.CreateSimpleRadar(hqChart,windowIndex,item,i);
123898
+ break;
123681
123899
  case "KLINE_BG":
123682
123900
  this.CreateBackgroud(hqChart,windowIndex,item,i);
123683
123901
  break;
@@ -124745,6 +124963,39 @@ function OverlayScriptIndex(name,script,args,option)
124745
124963
  frame.ChartPaint.push(chart);
124746
124964
  }
124747
124965
 
124966
+ this.CreateSimpleRadar=function(hqChart,windowIndex,varItem,id)
124967
+ {
124968
+ var overlayIndex=this.OverlayIndex;
124969
+ var frame=overlayIndex.Frame;
124970
+ var chart=new ChartSimpleRadar();
124971
+ chart.Canvas=hqChart.Canvas;
124972
+ chart.Name=varItem.Name;
124973
+ chart.ChartBorder=frame.Frame.ChartBorder;
124974
+ chart.ChartFrame=frame.Frame;
124975
+ chart.Identify=overlayIndex.Identify;
124976
+ chart.HQChart=hqChart;
124977
+
124978
+ if (varItem.Draw && varItem.Draw.DrawData)
124979
+ {
124980
+ var drawData=varItem.Draw.DrawData;
124981
+ if (drawData.Data) chart.Data.Data=drawData.Data;
124982
+ if (drawData.AryIndex) chart.AryIndex=drawData.AryIndex;
124983
+ if (IFrameSplitOperator.IsPlusNumber(drawData.Radius)) chart.Radius=drawData.Radius;
124984
+ if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
124985
+
124986
+ if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
124987
+ if (drawData.TextColor) chart.TextColor=drawData.TextColor;
124988
+ if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
124989
+ if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
124990
+ if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
124991
+ if (IFrameSplitOperator.IsNonEmptyArray(drawData.AryArea)) chart.AryAreaConfig=drawData.AryArea;
124992
+
124993
+ chart.BuildCacheData();
124994
+ }
124995
+
124996
+ frame.ChartPaint.push(chart);
124997
+ }
124998
+
124748
124999
  this.CreateChartVericaltLine=function(hqChart,windowIndex,varItem,id)
124749
125000
  {
124750
125001
  var overlayIndex=this.OverlayIndex;
@@ -125958,6 +126209,17 @@ function APIScriptIndex(name,script,args,option, isOverlay)
125958
126209
  outVarItem.Draw=drawItem;
125959
126210
  result.push(outVarItem);
125960
126211
  }
126212
+ else if (draw.DrawType=="DRAW_SIMPLE_RADAR")
126213
+ {
126214
+ drawItem.Name=draw.Name;
126215
+ drawItem.Type=draw.Type;
126216
+
126217
+ drawItem.DrawType=draw.DrawType;
126218
+ drawItem.DrawData=draw.DrawData; //{ AryIndex:[ ], Data:[] };
126219
+
126220
+ outVarItem.Draw=drawItem;
126221
+ result.push(outVarItem);
126222
+ }
125961
126223
  else
125962
126224
  {
125963
126225
  var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
@@ -127574,6 +127836,20 @@ function GetBlackStyle()
127574
127836
  BorderColor:"rgb(220,220,220)",
127575
127837
  },
127576
127838
 
127839
+ ChartSimpleRadar:
127840
+ {
127841
+ //TextFont:{ Family:'微软雅黑' , Size:12 },
127842
+ BorderColor:"rgb(230, 230, 230)",
127843
+ //Offset:{ X:-5, Y:5 },
127844
+ TextColor:"rgb(250, 250, 250)",
127845
+ AryBGColor:['rgba(63,61,82,0.9)','rgba(56,55,80,0.9)'],
127846
+ AryArea:
127847
+ [
127848
+ { Color:"rgba(242,154,118,0.4)", LineColor:"rgb(242,154,118)"},
127849
+ { Color:"rgba(121,197,228,0.4)", LineColor:"rgb(92,165,196)"},
127850
+ ],
127851
+ },
127852
+
127577
127853
  ChartDrawVolProfile:
127578
127854
  {
127579
127855
  BGColor:"rgba(244,250,254,0.3)",
@@ -142109,7 +142385,7 @@ function ScrollBarBGChart()
142109
142385
 
142110
142386
 
142111
142387
 
142112
- var HQCHART_VERSION="1.1.14319";
142388
+ var HQCHART_VERSION="1.1.14329";
142113
142389
 
142114
142390
  function PrintHQChartVersion()
142115
142391
  {