This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.cs
50 lines (40 loc) · 1.79 KB
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Windows.Forms;
using DevExpress.XtraCharts;
// ...
namespace Series_RadarLineChart {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
// Create a new chart.
ChartControl RadarLineChart = new ChartControl();
// Add a radar series to it.
Series series1 = new Series("Series 1", ViewType.RadarLine);
// Populate the series with points.
series1.Points.Add(new SeriesPoint(0, 90));
series1.Points.Add(new SeriesPoint(90, 95));
series1.Points.Add(new SeriesPoint(180, 50));
series1.Points.Add(new SeriesPoint(270, 55));
series1.Points.Add(new SeriesPoint(0, 180));
series1.Points.Add(new SeriesPoint(90, 185));
series1.Points.Add(new SeriesPoint(180, 270));
series1.Points.Add(new SeriesPoint(270, 275));
// Add the series to the chart.
RadarLineChart.Series.Add(series1);
// Flip the diagram (if necessary).
((RadarDiagram)RadarLineChart.Diagram).StartAngleInDegrees = 180;
((RadarDiagram)RadarLineChart.Diagram).RotationDirection =
RadarDiagramRotationDirection.Counterclockwise;
// Add a title to the chart and hide the legend.
ChartTitle chartTitle1 = new ChartTitle();
chartTitle1.Text = "Radar Line Chart";
RadarLineChart.Titles.Add(chartTitle1);
RadarLineChart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
// Add the chart to the form.
RadarLineChart.Dock = DockStyle.Fill;
this.Controls.Add(RadarLineChart);
}
}
}