This may be a simple question, but I am new to WPF programming. I want to create a Line Chart from a database. This works fine so far but how do I specify a data column for the x-axis ? Via DataMapping I can only specify the column for the y-axis. The x-axis always displays the values of the first column of my data table.
DataMapping="Label = Labels_Column ; Value = Values_Column";
that should do it -- where Labels_Column contains your X-axis values.
unless you are trying to get the X axis to be a numeric scale, in which case you should set the Series.ChartType to ScatterLine instead of Line chart.
and the DataMapping for a ScatterLine chart is something like "ValueX = XValues_Column; ValueY = YValues_Column;"
http://help.infragistics.com/Help/NetAdvantage/WPF/2007.2/CLR3.X/html/xamChart_Data_Mapping.html