Code: Select all
System.Windows.Forms.DataVisualization.Charting.Series s = new System.Windows.Forms.DataVisualization.Charting.Series();
s.SmartLabelStyle.Enabled = true;
s.BorderWidth = 2;
s.LabelAngle = 0;
s.IsVisibleInLegend = false;
s.ChartType = SeriesChartType.Column;
s.Font = new System.Drawing.Font("Microsoft Sans Serif", 16f);
s.IsValueShownAsLabel = true;
chart1.ChartAreas[0].AxisX.Interval = 1;
chart1.ChartAreas[0].AxisX.MinorGrid.Enabled = true;
chart1.Legends[0].Font = new System.Drawing.Font("Microsoft Sans Serif", 16f);
s.Points.DataBindXY(new List(OctaveCentersStr).GetRange(0, OctaveCentersStr.Length).ToArray(), new List(result).GetRange(0, OctaveCentersStr.Length).ToArray());
chart1.Series.Add(s);
Bild