I have tried all of this but the problem still exists. Look what i am trying to do.
public partial class LineChartControl : UserControl { public LineChartControl(DataTable dataTable) { InitializeComponent(); for (int r = 0; r < dataTable.Rows.Count; r++) { ChartFX.WPF.SeriesAttributes series = new ChartFX.WPF.SeriesAttributes(); series.BindingPath = "NumericData"; series.AxisX = new ChartFX.WPF.Axis(); series.AxisY = new ChartFX.WPF.Axis(); chart.Series.Add(series); } chart.ItemsSource = dataTable.Rows; // dataTable.Rows[0].NumericData is an array of Double elements } }
So one line for each row and not for a column. The DataTable is not the one from System.Data, is own defined, but implements the IEnumerable interface.
Is there another way to program the graph to draw each row as a line and not use SeriesAttributes?