这是我的代码:
private void DrawCharts()
{
List<double> xAxis = new List<double>();
List<double> yAxis = new List<double>();
ch_Vf2.Series.Add("Vf2");
ch_Vf2.Series["Vf2"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point;
foreach (Value v in Bf1_Values["Vf2"].Values)
{
xAxis.Add(v.d_val);
}
foreach (Value v in Bf2_Values["Vf2"].Values)
{
yAxis.Add(v.d_val);
}
ch_Vf2.Series["Vf2"].Points.DataBindXY(xAxis.ToArray(), yAxis.ToArray());
}
结果如下:
问题