コード例 #1
0
        private void InitializeRadarChart()
        {
            this.radChartView3.AreaType = ChartAreaType.Polar;
            this.radChartView3.Axes.Add(new PolarAxis());

            PolarArea area      = this.radChartView3.Area as PolarArea;
            PolarAxis polarAxis = area.Axes.Get <PolarAxis>()[0];

            polarAxis.Minimum    = 0d;
            polarAxis.Maximum    = 5d;
            polarAxis.TickLength = 5;
            area.ShowGrid        = true;
            PolarGrid grid = (PolarGrid)area.Grid;

            grid.DrawPolarFills  = false;
            grid.DrawRadialFills = false;
            grid.BackColor       = Color.LightGray;
            grid.BackColor2      = Color.LightGray;

            int valuesPerSeries                 = 8;
            List <RadarSeries> radarSeries      = new List <RadarSeries>();
            RadarLineSeries    radarLineSeries1 = new RadarLineSeries();

            radarLineSeries1.PolarAxis = polarAxis;

            RadarLineSeries radarLineSeries2 = new RadarLineSeries();

            radarLineSeries2.PolarAxis = polarAxis;

            RadarAreaSeries radarAreaSeries1 = new RadarAreaSeries();

            radarAreaSeries1.PolarAxis = polarAxis;

            radarSeries.Add(radarLineSeries1);
            radarSeries.Add(radarLineSeries2);
            radarSeries.Add(radarAreaSeries1);

            for (int i = 0; i < radarSeriesValues.Length; i++)
            {
                int seriesNumber = i / valuesPerSeries;
                radarSeries[seriesNumber].DataPoints.Add(new CategoricalDataPoint(radarSeriesValues[i]));
            }

            radarLineSeries1.PointSize = new SizeF(1f, 1f);
            radarLineSeries2.PointSize = new SizeF(1f, 1f);
            radarAreaSeries1.PointSize = new SizeF(1f, 1f);

            this.radChartView3.Series.Add(radarAreaSeries1);
            this.radChartView3.Series.Add(radarLineSeries2);
            this.radChartView3.Series.Add(radarLineSeries1);

            this.radChartView3.View.Margin = new Padding(20);
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the RadarAreaSeriesAutomationPeer class.
 /// </summary>
 public RadarAreaSeriesAutomationPeer(RadarAreaSeries owner)
     : base(owner)
 {
 }