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.
@@ -35907,199 +35907,292 @@ function ChartSimpleRadar()
35907
35907
  delete this.newMethod;
35908
35908
 
35909
35909
  this.ClassName='ChartSimpleRadar'; //类名
35910
- this.BorderPoint=[]; //边框点
35911
- this.DataPoint=[]; //数据点
35912
- this.CenterPoint={};
35913
- this.StartAngle=0;
35914
- this.Color='rgb(198,198,198)';
35915
- this.AreaColor='rgba(242,154,118,0.4)'; //面积图颜色
35910
+
35911
+ this.AreaColor='rgba(242,154,118,0.4)'; //
35916
35912
  this.AreaLineColor='rgb(242,154,118)';
35917
- this.TitleFont=24*GetDevicePixelRatio()+'px 微软雅黑';
35918
- this.TitleColor='rgb(102,102,102)';
35919
- this.BGColor = ['rgb(255,255,255)', 'rgb(224,224,224)']//背景色
35913
+
35914
+ this.TitleColor=g_JSChartResource.ChartSimpleRadar.TextColor;
35915
+ this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleRadar.TextFont);
35916
+ this.Offset=CloneData(g_JSChartResource.ChartSimpleRadar.Offset);
35917
+ this.BorderColor=g_JSChartResource.ChartSimpleRadar.BorderColor;
35918
+ this.AryBGColor=g_JSChartResource.ChartSimpleRadar.AryBGColor.slice();//背景色
35919
+ this.AryAreaConfig=g_JSChartResource.ChartSimpleRadar.AryArea.slice(); //面积图颜色
35920
+
35921
+ this.StartAngle=270;
35922
+ this.Radius=50;
35923
+ this.AryBorder=[1, 0.75, 0.5, 0.25];
35924
+ this.AryIndex; //指标{ Name:, Max:100, Min:0 },
35920
35925
 
35921
- this.DrawBorder=function() //画边框
35926
+ this.CenterPoint={};
35927
+ this.RectClient={ };
35928
+ this.AryIndexCache=[];
35929
+ this.MapDataCache=new Map(); //key=name value={ Data:[] }
35930
+ this.TextFont;
35931
+
35932
+
35933
+ this.ReloadResource=function(resource)
35922
35934
  {
35923
- if (this.BorderPoint.length<=0) return;
35935
+ this.TitleColor=g_JSChartResource.ChartSimpleRadar.TextColor;
35936
+ this.TextFontConfig=CloneData(g_JSChartResource.ChartSimpleRadar.TextFont);
35937
+ this.Offset=CloneData(g_JSChartResource.ChartSimpleRadar.Offset);
35938
+ this.BorderColor=g_JSChartResource.ChartSimpleRadar.BorderColor;
35939
+ this.AryBGColor=g_JSChartResource.ChartSimpleRadar.AryBGColor.slice();//背景色
35940
+ this.AryAreaConfig=g_JSChartResource.ChartSimpleRadar.AryArea.slice(); //面积图颜色
35941
+ }
35924
35942
 
35925
- this.Canvas.font=this.TitleFont;
35926
- this.Canvas.strokeStyle = this.Color;
35927
- const aryBorder=[1,0.8,0.6,0.4,0.2];
35928
- for (let j in aryBorder)
35943
+ this.DrawBorder=function() //画边框
35944
+ {
35945
+ this.Canvas.strokeStyle = this.BorderColor;
35946
+ this.Canvas.font=this.TextFont;
35947
+ for(var i=0;i<this.AryBorder.length;++i)
35929
35948
  {
35930
- var rate = aryBorder[j];
35931
- var isFirstDraw=true;
35932
- for(let i in this.BorderPoint)
35949
+ var rate = this.AryBorder[i];
35950
+ var radius=this.RectClient.Radius*rate;
35951
+ var bFirstDraw=true;
35952
+ for(var j=0;j<this.AryIndexCache.length;++j)
35933
35953
  {
35934
- var item=this.BorderPoint[i];
35935
- item.X = this.CenterPoint.X + item.Radius * Math.cos(item.Angle * Math.PI / 180) * rate;
35936
- item.Y = this.CenterPoint.Y + item.Radius * Math.sin(item.Angle * Math.PI / 180) * rate;
35937
- if (isFirstDraw)
35954
+ var item=this.AryIndexCache[j];
35955
+ var x = this.CenterPoint.X + radius * Math.cos(item.Angle * Math.PI / 180);
35956
+ var y = this.CenterPoint.Y + radius * Math.sin(item.Angle * Math.PI / 180);
35957
+ if (bFirstDraw)
35938
35958
  {
35939
35959
  this.Canvas.beginPath();
35940
- this.Canvas.moveTo(item.X,item.Y);
35941
- isFirstDraw=false;
35960
+ this.Canvas.moveTo(x,y);
35961
+ bFirstDraw=false;
35942
35962
  }
35943
35963
  else
35944
35964
  {
35945
- this.Canvas.lineTo(item.X,item.Y);
35965
+ this.Canvas.lineTo(x,y);
35946
35966
  }
35947
35967
  }
35948
35968
 
35949
35969
  this.Canvas.closePath();
35950
35970
  this.Canvas.stroke();
35951
- this.Canvas.fillStyle = this.BGColor[j%2==0?0:1];
35952
- this.Canvas.fill();
35971
+
35972
+ if (IFrameSplitOperator.IsNonEmptyArray(this.AryBGColor))
35973
+ {
35974
+ this.Canvas.fillStyle = this.AryBGColor[i%this.AryBGColor.length];
35975
+ this.Canvas.fill();
35976
+ }
35953
35977
  }
35954
35978
 
35955
35979
  this.Canvas.beginPath();
35956
- for(let i in this.BorderPoint)
35980
+ for(var i=0;i<this.AryIndexCache.length;++i)
35957
35981
  {
35958
- var item=this.BorderPoint[i];
35959
- item.X = this.CenterPoint.X + item.Radius * Math.cos(item.Angle * Math.PI / 180);
35960
- item.Y = this.CenterPoint.Y + item.Radius * Math.sin(item.Angle * Math.PI / 180);
35982
+ var item=this.AryIndexCache[i];
35983
+ var x = this.CenterPoint.X + item.Radius * Math.cos(item.Angle * Math.PI / 180);
35984
+ var y = this.CenterPoint.Y + item.Radius * Math.sin(item.Angle * Math.PI / 180);
35961
35985
  this.Canvas.moveTo(this.CenterPoint.X,this.CenterPoint.Y);
35962
- this.Canvas.lineTo(item.X,item.Y);
35963
- this.DrawText(item);
35986
+ this.Canvas.lineTo(x,y);
35987
+ this.DrawText(item, x, y);
35964
35988
  }
35965
35989
  this.Canvas.stroke();
35990
+
35991
+ }
35992
+
35993
+ this.GetRadarRate=function(indexItem, value)
35994
+ {
35995
+ var range={ Max:100, Min:0 };
35996
+ if (IFrameSplitOperator.IsNumber(indexItem.Max)) range.Max=indexItem.Max;
35997
+ if (IFrameSplitOperator.IsNumber(indexItem.Min)) range.Min=indexItem.Min;
35998
+
35999
+ if (value>range.Max) value=range.Max;
36000
+ else if (value<range.Min) value=range.Min;
36001
+
36002
+ return (value-range.Min)/(range.Max-range.Min);
35966
36003
  }
35967
36004
 
35968
36005
  this.DrawArea=function()
35969
36006
  {
35970
- if (!this.DataPoint || this.DataPoint.length<=0) return;
36007
+ if (this.MapDataCache.size<=0) return;
35971
36008
 
35972
- this.Canvas.fillStyle = this.AreaColor;
35973
- this.Canvas.strokeStyle = this.AreaLineColor;
35974
- this.Canvas.beginPath();
35975
- var isFirstDraw=true;
35976
- for(let i in this.DataPoint)
36009
+ var index=0;
36010
+ for(var mapItem of this.MapDataCache)
35977
36011
  {
35978
- var item=this.DataPoint[i];
35979
- if (isFirstDraw)
36012
+ var mapData=mapItem[1].MapData;
36013
+
36014
+ var bFirstDraw=true;
36015
+ var pointCount=0;
36016
+ for(var i=0;i<this.AryIndexCache.length;++i)
35980
36017
  {
35981
- this.Canvas.beginPath();
35982
- this.Canvas.moveTo(item.X,item.Y);
35983
- isFirstDraw=false;
36018
+ var indexItem=this.AryIndexCache[i];
36019
+ if (!indexItem.Data || !indexItem.Data.Name) continue;
36020
+ if (!mapData.has(indexItem.Data.Name)) continue;
36021
+ var item=mapData.get(indexItem.Data.Name);
36022
+ if (!item.Data && !IFrameSplitOperator.IsNumber(item.Data.Value)) conintue;
36023
+
36024
+ var widthRate=this.GetRadarRate(indexItem, item.Data.Value);
36025
+ var x = this.CenterPoint.X+indexItem.Radius*widthRate*Math.cos(indexItem.Angle * Math.PI / 180);
36026
+ var y = this.CenterPoint.Y+indexItem.Radius*widthRate*Math.sin(indexItem.Angle * Math.PI / 180);
36027
+
36028
+ if (bFirstDraw)
36029
+ {
36030
+ this.Canvas.beginPath();
36031
+ this.Canvas.moveTo(x,y);
36032
+ bFirstDraw=false;
36033
+ ++pointCount;
36034
+ }
36035
+ else
36036
+ {
36037
+ this.Canvas.lineTo(x,y);
36038
+ ++pointCount;
36039
+ }
35984
36040
  }
35985
- else
36041
+
36042
+ if (pointCount>0)
35986
36043
  {
35987
- this.Canvas.lineTo(item.X,item.Y);
36044
+ this.Canvas.closePath();
36045
+
36046
+ var config=this.AryAreaConfig[index%this.AryAreaConfig.length];
36047
+ if (config.Color)
36048
+ {
36049
+ this.Canvas.fillStyle = config.Color;
36050
+ this.Canvas.fill();
36051
+ }
36052
+
36053
+ if (config.LineColor)
36054
+ {
36055
+ this.Canvas.strokeStyle = config.LineColor;
36056
+ this.Canvas.stroke();
36057
+ }
35988
36058
  }
35989
- }
35990
36059
 
35991
- this.Canvas.closePath();
35992
- this.Canvas.fill();
35993
- this.Canvas.stroke();
36060
+ ++index;
36061
+ }
35994
36062
  }
35995
36063
 
35996
- this.DrawText=function(item)
36064
+ this.DrawText=function(item, x, y)
35997
36065
  {
35998
- if (!item.Text) return;
36066
+ if (!item.Data || !item.Data.Name) return;
35999
36067
 
36000
36068
  //JSConsole.Chart.Log(item.Text, item.Angle);
36001
36069
  this.Canvas.fillStyle = this.TitleColor;
36002
- var xText = item.X, yText = item.Y;
36070
+ var xText = x, yText =y;
36071
+
36072
+ var angle=item.Angle%360;
36003
36073
 
36004
36074
  //显示每个角度的位置
36005
- if (item.Angle > 0 && item.Angle < 45) {
36075
+ if (angle > 0 && angle < 45) {
36006
36076
  this.Canvas.textAlign = 'left';
36007
36077
  this.Canvas.textBaseline = 'middle';
36008
36078
  xText += 2;
36009
36079
  }
36010
- else if (item.Angle >= 0 && item.Angle < 90) {
36080
+ else if (angle >= 45 && angle < 90) {
36011
36081
  this.Canvas.textAlign = 'left';
36012
36082
  this.Canvas.textBaseline = 'top';
36013
36083
  xText += 2;
36014
36084
  }
36015
- else if (item.Angle >= 90 && item.Angle < 135) {
36085
+ else if (angle==90)
36086
+ {
36087
+ this.Canvas.textAlign = 'center';
36088
+ this.Canvas.textBaseline = 'top';
36089
+ yText+=2;
36090
+ }
36091
+ else if (angle >= 90 && angle < 135) {
36016
36092
  this.Canvas.textAlign = 'right';
36017
36093
  this.Canvas.textBaseline = 'top';
36018
36094
  xText -= 2;
36019
36095
  }
36020
- else if (item.Angle >= 135 && item.Angle < 180) {
36096
+ else if (angle >= 135 && angle < 180) {
36021
36097
  this.Canvas.textAlign = 'right';
36022
36098
  this.Canvas.textBaseline = 'top';
36023
36099
  xText -= 2;
36024
36100
  }
36025
- else if (item.Angle >= 180 && item.Angle < 225) {
36101
+ else if (angle >= 180 && angle < 225) {
36026
36102
  this.Canvas.textAlign = 'right';
36027
36103
  this.Canvas.textBaseline = 'middle';
36028
36104
  xText -= 2;
36029
36105
  }
36030
- else if (item.Angle >= 225 && item.Angle <= 270) {
36106
+ else if (angle >= 225 && angle <= 270) {
36031
36107
  this.Canvas.textAlign = 'center';
36032
36108
  this.Canvas.textBaseline = 'bottom';
36033
36109
  }
36034
- else if (item.Angle > 270 && item.Angle < 315) {
36110
+ else if (angle > 270 && angle < 315) {
36035
36111
  this.Canvas.textAlign = 'left';
36036
36112
  this.Canvas.textBaseline = 'bottom';
36037
36113
  xText += 2;
36038
36114
  }
36039
- else {
36115
+ else
36116
+ {
36040
36117
  this.Canvas.textAlign = 'left';
36041
36118
  this.Canvas.textBaseline = 'middle';
36042
36119
  xText += 2;
36043
36120
  }
36044
36121
 
36045
- this.Canvas.fillText(item.Text, xText, yText);
36122
+ this.Canvas.fillText(item.Data.Name, xText, yText);
36046
36123
  }
36047
36124
 
36048
36125
  this.Draw=function()
36049
36126
  {
36050
- this.BorderPoint=[];
36051
- this.DataPoint=[];
36052
- this.CenterPoint={};
36053
- if (!this.Data || !this.Data.Data || !(this.Data.Data.length>0))
36054
- this.CalculatePoints(null);
36055
- else
36056
- this.CalculatePoints(this.Data.Data);
36127
+ this.AryIndexCache=[];
36128
+ this.MapData=new Map();
36129
+ if (!IFrameSplitOperator.IsNonEmptyArray(this.AryIndex)) return;
36130
+
36131
+ this.CalculateSize();
36057
36132
 
36058
36133
  this.DrawBorder();
36134
+
36059
36135
  this.DrawArea();
36060
36136
  }
36061
36137
 
36062
- this.CalculatePoints=function(data)
36138
+ this.BuildCacheData=function()
36063
36139
  {
36064
- let left=this.ChartBorder.GetLeft();
36065
- let right=this.ChartBorder.GetRight();
36066
- let top=this.ChartBorder.GetTop();
36067
- let bottom=this.ChartBorder.GetBottom();
36068
- let width=this.ChartBorder.GetWidth();
36069
- let height=this.ChartBorder.GetHeight();
36140
+ this.MapDataCache=new Map();
36070
36141
 
36071
- let ptCenter={X:left+width/2, Y:top+height/2}; //中心点
36072
- let radius=Math.min(width/2,height/2)-2 //半径
36073
- let count=Math.max(5,data?data.length:0);
36074
- let averageAngle=360/count;
36075
- for(let i=0;i<count;++i)
36142
+ for(var i=0;i<this.Data.Data.length;++i)
36076
36143
  {
36077
- let ptBorder = { Index: i, Radius: radius, Angle: i * averageAngle + this.StartAngle };
36078
- let angle = ptBorder.Angle;
36144
+ var item=this.Data.Data[i];
36145
+ if (!this.MapDataCache.has(item.Group))
36146
+ {
36147
+ this.MapDataCache.set(item.Group, { MapData:new Map() })
36148
+ }
36149
+
36150
+ var mpaItem=this.MapDataCache.get(item.Group);
36151
+ mpaItem.MapData.set(item.Name, { Data:item });
36152
+ }
36153
+ }
36154
+
36155
+ this.CalculateSize=function(data)
36156
+ {
36157
+ var border=this.ChartBorder.GetBorder();
36158
+ var pixelRatio=GetDevicePixelRatio();
36159
+ this.TextFont=`${this.TextFontConfig.Size*pixelRatio}px ${ this.TextFontConfig.Name}`;
36160
+ var fontHeight=this.GetFontHeight(this.TextFont,"擎")+1;
36079
36161
 
36080
- if (data && i<data.length)
36162
+ var maxTextWidth=0;
36163
+ if (IFrameSplitOperator.IsNonEmptyArray(this.AryIndex))
36164
+ {
36165
+ for(var i=0;i<this.AryIndex.length;++i)
36081
36166
  {
36082
- var item=data[i];
36083
- let ptData={Index:i,Text:item.Text};
36084
- ptBorder.Text=item.Name;
36085
- if (!item.Value)
36086
- {
36087
- ptData.X=ptCenter.X;
36088
- ptData.Y=ptCenter.Y;
36089
- }
36090
- else
36091
- {
36092
- var value=item.Value;
36093
- if (value>=1) value=1;
36094
- var dataRadius=radius*value;
36095
- ptData.X=ptCenter.X+dataRadius*Math.cos(angle*Math.PI/180);
36096
- ptData.Y=ptCenter.Y+dataRadius*Math.sin(angle*Math.PI/180);
36097
- }
36167
+ var item=this.AryIndex[i];
36168
+ if (!item.Name) continue;
36169
+ var textWidth=this.Canvas.measureText(item.Name).width;
36170
+ if (maxTextWidth<textWidth) maxTextWidth=textWidth;
36171
+ }
36172
+ }
36173
+
36174
+ var radius=this.Radius*2*pixelRatio; //半径
36175
+ this.RectClient={ Width:radius*2, Height:radius*2, Radius:radius };
36176
+ this.RectClient.Right=border.Right+this.Offset.X-maxTextWidth;
36177
+ this.RectClient.Top=border.TopEx+this.Offset.Y+fontHeight;
36178
+ this.RectClient.Left=this.RectClient.Right-this.RectClient.Width;
36179
+ this.RectClient.Bottom=this.RectClient.Top+this.RectClient.Height;
36180
+
36181
+ var ptCenter={X:this.RectClient.Left+this.RectClient.Width/2, Y:this.RectClient.Top+this.RectClient.Height/2}; //中心点
36182
+
36183
+ var count=Math.max(5,this.AryIndex.length);
36184
+ var averageAngle=360/count;
36185
+ for(var i=0;i<count;++i)
36186
+ {
36187
+ var angle=i*averageAngle+this.StartAngle;
36098
36188
 
36099
- this.DataPoint.push(ptData);
36189
+ var indexItem={ Data:null, Index:i, Angle:angle, Radius:radius };
36190
+ if (this.AryIndex && this.AryIndex[i])
36191
+ {
36192
+ indexItem.Data=this.AryIndex[i];
36100
36193
  }
36101
36194
 
36102
- this.BorderPoint.push(ptBorder);
36195
+ this.AryIndexCache.push(indexItem);
36103
36196
  }
36104
36197
 
36105
36198
  this.CenterPoint=ptCenter;
@@ -36108,7 +36201,7 @@ function ChartSimpleRadar()
36108
36201
  //空数据
36109
36202
  this.DrawEmptyData=function()
36110
36203
  {
36111
- JSConsole.Chart.Log('[ChartPie::DrawEmptyData]')
36204
+ JSConsole.Chart.Log('[ChartSimpleRadar::DrawEmptyData]')
36112
36205
  }
36113
36206
  }
36114
36207
 
@@ -75005,6 +75098,20 @@ function JSChartResource()
75005
75098
  Offset:{ X:-5, Y:5 }
75006
75099
  }
75007
75100
 
75101
+ this.ChartSimpleRadar=
75102
+ {
75103
+ TextFont:{ Family:'微软雅黑' , Size:12 },
75104
+ BorderColor:"rgb(169,169,169)",
75105
+ Offset:{ X:-5, Y:5 },
75106
+ TextColor:"rgb(105,105,105)",
75107
+ AryBGColor:['rgba(255,255,255,0.9)', 'rgba(230, 234, 242,0.9)'],
75108
+ AryArea:
75109
+ [
75110
+ { Color:"rgba(242,154,118,0.4)", LineColor:"rgb(242,154,118)"},
75111
+ { Color:"rgba(121,197,228,0.4)", LineColor:"rgb(92,165,196)"},
75112
+ ],
75113
+ }
75114
+
75008
75115
  //手机端tooltip
75009
75116
  this.TooltipPaint = {
75010
75117
  BGColor:'rgba(250,250,250,0.8)', //背景色
@@ -76236,6 +76343,7 @@ function JSChartResource()
76236
76343
 
76237
76344
  if (style.ChartSimpleTable) this.SetChartSimpleTable(style.ChartSimpleTable);
76238
76345
  if (style.ChartSimplePie) this.SetChartSimplePie(style.ChartSimplePie);
76346
+ if (style.ChartSimpleRadar) this.SetChartSimpleRadar(style.ChartSimpleRadar);
76239
76347
 
76240
76348
  if (style.DRAWICON)
76241
76349
  {
@@ -77329,6 +77437,30 @@ function JSChartResource()
77329
77437
  }
77330
77438
  }
77331
77439
 
77440
+ this.SetChartSimpleRadar=function(style)
77441
+ {
77442
+ var dest=this.ChartSimpleRadar;
77443
+ if (style.TextFont)
77444
+ {
77445
+ var item=style.TextFont;
77446
+ if (item.Name) dest.TextFont.Name=item.Name;
77447
+ if (IFrameSplitOperator.IsNumber(item.Size)) dest.TextFont.Size=item.Size;
77448
+ }
77449
+
77450
+ if (style.BorderColor) dest.BorderColor=style.BorderColor;
77451
+ if (style.TextColor) dest.TextColor=style.TextColor;
77452
+
77453
+ if (style.Offset)
77454
+ {
77455
+ var item=style.Offset;
77456
+ if (IFrameSplitOperator.IsNumber(item.X)) dest.Offset.X=item.X;
77457
+ if (IFrameSplitOperator.IsNumber(item.Y)) dest.Offset.Y=item.Y;
77458
+ }
77459
+
77460
+ if (IFrameSplitOperator.IsNonEmptyArray(style.AryBGColor)) dest.AryBGColor=style.AryBGColor.slice();
77461
+ if (IFrameSplitOperator.IsNonEmptyArray(style.AryArea)) dest.AryArea=style.AryArea.slice();
77462
+ }
77463
+
77332
77464
  }
77333
77465
 
77334
77466
  var g_JSChartResource=new JSChartResource();
@@ -112535,6 +112667,48 @@ function JSDraw(errorHandler,symbolData)
112535
112667
 
112536
112668
  return result={ DrawData:{ Data:aryCell, Radius:radius }, DrawType:"DRAW_SIMPLE_PIE" };
112537
112669
  }
112670
+
112671
+ this.RADAR_CELL=function(name, data, max, min)
112672
+ {
112673
+ var cellItem={ Name:name, Max:100, Min:0, Value:null };
112674
+ if (IFrameSplitOperator.IsNumber(data))
112675
+ {
112676
+ cellItem.Value=data;
112677
+ }
112678
+ else if (IFrameSplitOperator.IsString(data))
112679
+ {
112680
+ cellItem.Value=parseFloat(data);
112681
+ }
112682
+ else if (IFrameSplitOperator.IsNonEmptyArray(data))
112683
+ {
112684
+ var lastValue=data[data.length-1];
112685
+ if (IFrameSplitOperator.IsNumber(lastValue)) cellItem.Value=lastValue;
112686
+ else if (IFrameSplitOperator.IsString(lastValue)) cellItem.Value=parseFloat(lastValue);
112687
+ }
112688
+
112689
+ if (IFrameSplitOperator.IsNumber(max)) cellItem.Max=max;
112690
+ if (IFrameSplitOperator.IsNumber(min)) cellItem.Min=min;
112691
+
112692
+ return cellItem;
112693
+ }
112694
+
112695
+ this.DRAWRADAR=function(args)
112696
+ {
112697
+ var radius=args[0];
112698
+ var color=args[1];
112699
+
112700
+ var aryIndex=[];
112701
+ var aryData=[];
112702
+ for(var i=2;i<args.length;++i)
112703
+ {
112704
+ var item=args[i];
112705
+
112706
+ aryIndex.push({ Name:item.Name, Max:item.Max, Min:item.Min });
112707
+ aryData.push({ Value:item.Value, Name:item.Name, Group:"Default"});
112708
+ }
112709
+
112710
+ return result={ DrawData:{ Data:aryData, AryIndex:aryIndex, Radius:radius, AryArea:[{ LineColor:color }] }, DrawType:"DRAW_SIMPLE_RADAR" };
112711
+ }
112538
112712
  }
112539
112713
 
112540
112714
 
@@ -112589,7 +112763,7 @@ JSDraw.prototype.IsDrawFunction=function(name)
112589
112763
  'DRAWOVERLAYLINE',"FILLRGN", "FILLRGN2","FILLTOPRGN", "FILLBOTTOMRGN", "FILLVERTICALRGN","FLOATRGN","DRAWSL", "DRAWGBK2","DRAWGBK_DIV",
112590
112764
  "VERTLINE","HORLINE","TIPICON",
112591
112765
  "BUY","SELL","SELLSHORT","BUYSHORT",
112592
- "DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE","DRAWPIE",
112766
+ "DRAWLASTBARICON","DRAWLASTBARNUMBER", "DRAWLASTBARTEXT","DRAWTABLE","DRAWPIE","DRAWRADAR",
112593
112767
  ]);
112594
112768
  if (setFunctionName.has(name)) return true;
112595
112769
 
@@ -119478,6 +119652,14 @@ function JSExecute(ast,option)
119478
119652
  node.Draw=this.Draw.DRAWPIE(args);
119479
119653
  node.Out=[];
119480
119654
  break;
119655
+ //雷达图
119656
+ case "RADAR_CELL":
119657
+ node.Out=this.Draw.RADAR_CELL(args[0],args[1],args[2],args[3]);
119658
+ break;
119659
+ case "DRAWRADAR":
119660
+ node.Draw=this.Draw.DRAWRADAR(args);
119661
+ node.Out=[];
119662
+ break;
119481
119663
 
119482
119664
  default:
119483
119665
  node.Out=this.Algorithm.CallFunction(funcName, args, node, this.SymbolData);
@@ -122494,6 +122676,35 @@ function ScriptIndex(name,script,args,option)
122494
122676
  hqChart.ChartPaint.push(chart);
122495
122677
  }
122496
122678
 
122679
+ this.CreateSimpleRadar=function(hqChart,windowIndex,varItem,id)
122680
+ {
122681
+ var chart=new ChartSimpleRadar();
122682
+ chart.Canvas=hqChart.Canvas;
122683
+ chart.Name=varItem.Name;
122684
+ chart.ChartBorder=hqChart.Frame.SubFrame[windowIndex].Frame.ChartBorder;
122685
+ chart.ChartFrame=hqChart.Frame.SubFrame[windowIndex].Frame;
122686
+
122687
+ if (varItem.Draw && varItem.Draw.DrawData)
122688
+ {
122689
+ var drawData=varItem.Draw.DrawData;
122690
+ if (drawData.Data) chart.Data.Data=drawData.Data;
122691
+ if (drawData.AryIndex) chart.AryIndex=drawData.AryIndex;
122692
+ if (IFrameSplitOperator.IsPlusNumber(drawData.Radius)) chart.Radius=drawData.Radius;
122693
+ if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
122694
+
122695
+ if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
122696
+ if (drawData.TextColor) chart.TextColor=drawData.TextColor;
122697
+ if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
122698
+ if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
122699
+ if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
122700
+ if (IFrameSplitOperator.IsNonEmptyArray(drawData.AryArea)) chart.AryAreaConfig=drawData.AryArea;
122701
+
122702
+ chart.BuildCacheData();
122703
+ }
122704
+
122705
+ hqChart.ChartPaint.push(chart);
122706
+ }
122707
+
122497
122708
  this.CreateTradeIcon=function(hqChart,windowIndex,varItem,id)
122498
122709
  {
122499
122710
  var chart=new ChartTradeIcon();
@@ -123369,6 +123580,10 @@ function ScriptIndex(name,script,args,option)
123369
123580
  break;
123370
123581
  case "DRAW_SIMPLE_PIE":
123371
123582
  this.CreateSimplePie(hqChart,windowIndex,item,i);
123583
+ break;
123584
+ case "DRAW_SIMPLE_RADAR":
123585
+ this.CreateSimpleRadar(hqChart,windowIndex,item,i);
123586
+ break;
123372
123587
  case "BUY":
123373
123588
  case "SELL":
123374
123589
  case "SELLSHORT":
@@ -123721,7 +123936,10 @@ function OverlayScriptIndex(name,script,args,option)
123721
123936
  break;
123722
123937
  case "DRAW_SIMPLE_PIE":
123723
123938
  this.CreateSimplePie(hqChart,windowIndex,item,i);
123724
-
123939
+ break;
123940
+ case "DRAW_SIMPLE_RADAR":
123941
+ this.CreateSimpleRadar(hqChart,windowIndex,item,i);
123942
+ break;
123725
123943
  case "KLINE_BG":
123726
123944
  this.CreateBackgroud(hqChart,windowIndex,item,i);
123727
123945
  break;
@@ -124789,6 +125007,39 @@ function OverlayScriptIndex(name,script,args,option)
124789
125007
  frame.ChartPaint.push(chart);
124790
125008
  }
124791
125009
 
125010
+ this.CreateSimpleRadar=function(hqChart,windowIndex,varItem,id)
125011
+ {
125012
+ var overlayIndex=this.OverlayIndex;
125013
+ var frame=overlayIndex.Frame;
125014
+ var chart=new ChartSimpleRadar();
125015
+ chart.Canvas=hqChart.Canvas;
125016
+ chart.Name=varItem.Name;
125017
+ chart.ChartBorder=frame.Frame.ChartBorder;
125018
+ chart.ChartFrame=frame.Frame;
125019
+ chart.Identify=overlayIndex.Identify;
125020
+ chart.HQChart=hqChart;
125021
+
125022
+ if (varItem.Draw && varItem.Draw.DrawData)
125023
+ {
125024
+ var drawData=varItem.Draw.DrawData;
125025
+ if (drawData.Data) chart.Data.Data=drawData.Data;
125026
+ if (drawData.AryIndex) chart.AryIndex=drawData.AryIndex;
125027
+ if (IFrameSplitOperator.IsPlusNumber(drawData.Radius)) chart.Radius=drawData.Radius;
125028
+ if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
125029
+
125030
+ if (drawData.TextFont) chart.TextFontConfig=drawData.TextFont;
125031
+ if (drawData.TextColor) chart.TextColor=drawData.TextColor;
125032
+ if (drawData.BorderColor) chart.BorderColor=drawData.BorderColor;
125033
+ if (IFrameSplitOperator.IsNumber(drawData.XOffset)) chart.Offset.X=drawData.XOffset;
125034
+ if (IFrameSplitOperator.IsNumber(drawData.YOffset)) chart.Offset.Y=drawData.YOffset;
125035
+ if (IFrameSplitOperator.IsNonEmptyArray(drawData.AryArea)) chart.AryAreaConfig=drawData.AryArea;
125036
+
125037
+ chart.BuildCacheData();
125038
+ }
125039
+
125040
+ frame.ChartPaint.push(chart);
125041
+ }
125042
+
124792
125043
  this.CreateChartVericaltLine=function(hqChart,windowIndex,varItem,id)
124793
125044
  {
124794
125045
  var overlayIndex=this.OverlayIndex;
@@ -126002,6 +126253,17 @@ function APIScriptIndex(name,script,args,option, isOverlay)
126002
126253
  outVarItem.Draw=drawItem;
126003
126254
  result.push(outVarItem);
126004
126255
  }
126256
+ else if (draw.DrawType=="DRAW_SIMPLE_RADAR")
126257
+ {
126258
+ drawItem.Name=draw.Name;
126259
+ drawItem.Type=draw.Type;
126260
+
126261
+ drawItem.DrawType=draw.DrawType;
126262
+ drawItem.DrawData=draw.DrawData; //{ AryIndex:[ ], Data:[] };
126263
+
126264
+ outVarItem.Draw=drawItem;
126265
+ result.push(outVarItem);
126266
+ }
126005
126267
  else
126006
126268
  {
126007
126269
  var find=g_ScriptIndexChartFactory.Get(draw.DrawType); //外部挂接
@@ -127618,6 +127880,20 @@ function GetBlackStyle()
127618
127880
  BorderColor:"rgb(220,220,220)",
127619
127881
  },
127620
127882
 
127883
+ ChartSimpleRadar:
127884
+ {
127885
+ //TextFont:{ Family:'微软雅黑' , Size:12 },
127886
+ BorderColor:"rgb(230, 230, 230)",
127887
+ //Offset:{ X:-5, Y:5 },
127888
+ TextColor:"rgb(250, 250, 250)",
127889
+ AryBGColor:['rgba(63,61,82,0.9)','rgba(56,55,80,0.9)'],
127890
+ AryArea:
127891
+ [
127892
+ { Color:"rgba(242,154,118,0.4)", LineColor:"rgb(242,154,118)"},
127893
+ { Color:"rgba(121,197,228,0.4)", LineColor:"rgb(92,165,196)"},
127894
+ ],
127895
+ },
127896
+
127621
127897
  ChartDrawVolProfile:
127622
127898
  {
127623
127899
  BGColor:"rgba(244,250,254,0.3)",
@@ -151757,7 +152033,7 @@ function HQChartScriptWorker()
151757
152033
 
151758
152034
 
151759
152035
 
151760
- var HQCHART_VERSION="1.1.14319";
152036
+ var HQCHART_VERSION="1.1.14329";
151761
152037
 
151762
152038
  function PrintHQChartVersion()
151763
152039
  {