一、基本设置
    在工具箱中找到ChartControl—RunDesigner—Series
    image.png
    在Series窗体中找到Polar Point这一项
    image.png
    选择StartAngleInDegree为0度,旋转角度RotationDirection为顺时针,DrawingStyle为Circle
    用代码设置则为

    1. // Adjust the view-type specific properties of the series.
    2. PolarPointSeriesView myView = (PolarPointSeriesView)series.View;
    3. //图标样式
    4. //myView.PointMarkerOptions.Kind = MarkerKind.Star;
    5. //Set the Visual Range of AxisY
    6. myView.PointMarkerOptions.Kind = MarkerKind.Circle;
    7. myView.PointMarkerOptions.StarPointCount = 5;
    8. myView.PointMarkerOptions.Size = 5;
    9. // Flip the diagram (if necessary).
    10. ((PolarDiagram)chartControl1.Diagram).StartAngleInDegrees = 180;
    11. ((PolarDiagram)chartControl1.Diagram).RotationDirection =
    12. RadarDiagramRotationDirection.Counterclockwise;//逆时针

    image.png
    还有一些其他的设置
    image.png
    绑定数据源操作DataSources可以用我们自己定义的引用类型(如类)
    这里我定义了一个卫星的类。并且设置了可视Y坐标轴的最大范围,因为Y坐标绑定的是卫星仰角(范围0-90度)
    image.png
    卫星的类为

    1. public class Satellite
    2. {
    3. public int ID { get; set; }//PRN编号
    4. public string Country { get; set; }
    5. public string Name { get; set; }//Name=County+ID;
    6. public int Elevation { get; set; } //卫星仰角0-90
    7. public int Azimuth { get; set; } //卫星方位角0-360
    8. public TimeSpan BeginTime { get; set; }//开始时间
    9. public TimeSpan EndTime { get; set; }//结束时间
    10. public bool IsExist { get; set; }
    11. public int SNR { get; set; }
    12. public Color Color { get; set; } = Color.Blue;
    13. public Satellite()
    14. {
    15. }
    16. public Satellite(int Id,string country)
    17. {
    18. this.ID = Id;
    19. this.Country = country;
    20. this.Name = country + Id.ToString();
    21. }
    22. public Satellite(int id, int elevation, int az)
    23. {
    24. this.ID = id;
    25. this.Elevation = elevation;
    26. this.Azimuth = az;
    27. }
    28. public Satellite(int id,int elevation,int az,int snr)
    29. {
    30. this.ID = id;
    31. this.Elevation = elevation;
    32. this.Azimuth = az;
    33. this.SNR = snr;
    34. }
    35. public void SetColor(string countryName)
    36. {
    37. switch(countryName)
    38. {
    39. case "GP":
    40. this.Color = Color.Blue;
    41. break;
    42. case "BD":
    43. this.Color = Color.Red;
    44. break;
    45. case "GL":
    46. this.Color = Color.Red;
    47. break;
    48. case "GN":
    49. this.Color = Color.Red;
    50. break;
    51. default:
    52. break;
    53. }
    54. }
    55. public bool IsValid()
    56. {
    57. bool flag = true;
    58. if (ID == 0 || Azimuth == 0||Elevation==0)
    59. {
    60. flag = false;
    61. }
    62. return flag;
    63. }
    64. }

    绑定的数据源需要设置参数和数据的名称

    1. private void InitializeChartControl()
    2. {
    3. series = new Series("Series", ViewType.PolarPoint);
    4. // Add the series to the chart.
    5. chartControl1.Series.Add(series);
    6. //Specify data member to bind the series;
    7. series.ArgumentScaleType = ScaleType.Numerical;
    8. series.ArgumentDataMember = "Azimuth";// AxisX;
    9. series.ValueScaleType = ScaleType.Numerical;
    10. series.ValueDataMembers[0] = "Elevation";//AxisY上的参数名称
    11. series.ColorDataMember = "Color";//数据源的颜色参数名称
    12. // Adjust the view-type specific properties of the series.
    13. PolarPointSeriesView myView = (PolarPointSeriesView)series.View;
    14. //Set the Visual Range of AxisY
    15. myView.PointMarkerOptions.Kind = MarkerKind.Circle;
    16. myView.PointMarkerOptions.StarPointCount = 5;
    17. myView.PointMarkerOptions.Size = 8;
    18. // Add a title to the chart, and hide the legend.
    19. chartControl1.Titles.Add(new ChartTitle());
    20. chartControl1.Titles[0].Text = "A Polar Point Chart";
    21. chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
    22. }
    1. private List<Satellite> BindingSatellites()
    2. {
    3. List<Satellite> satellites = new List<Satellite>();
    4. satellites.Add(new Satellite(1, 0, 90, Color.Red));
    5. satellites.Add(new Satellite(2, 45, 270,Color.PeachPuff));
    6. satellites.Add(new Satellite(3, 35, 300,Color.Peru));
    7. return satellites;
    8. }

    使用时用两个语句即可
    在Form构造函数中写
    InitializeChartControl3();
    series.DataSource = BindingSatellites();