title: Infragistics Ultrachart: Populate XY Data Series with data from DataTable
body: <p>Does anyone work with Infragistics UltraChart?  I'm trying to bind a DataTable with elevation monitor data to a line graph in a Windows form.</p>
  
  <p>As you can see from the following code, I have the DataSet and DataTable defined, and have started setting up the properties of the chart, but I'm not sure how to tie the DataTable table to the XYDataPointCollection series in the chart. Basically I want to be able to graph a line from two fields in the data table: "dateTime" (x-axis) and "gwElevation" (y-axis) for a specified date range.  </p>
  
  <p>}
        GroundwaterMonitorDataSet gwMonDataSet = new GroundwaterMonitorDataSet();
        DataTable gwMonDataTable = new DataTable();
        gwMonDataTable = gwMonDataSet.Tables.Add("P-14-01_Data");</p>
  
  <pre><code>  this.chartGwData.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.LineChart;
    Infragistics.UltraChart.Data.Series.XYDataPointCollection gwMonSeries = new Infragistics.UltraChart.Data.Series.XYDataPointCollection();
  
    chartGwData.LineChart.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Solid;
    chartGwData.LineChart.StartStyle = Infragistics.UltraChart.Shared.Styles.LineCapStyle.Round;
    chartGwData.LineChart.EndStyle = Infragistics.UltraChart.Shared.Styles.LineCapStyle.Flat;
    chartGwData.LineChart.NullHandling = Infragistics.UltraChart.Shared.Styles.NullHandling.DontPlot;
    chartGwData.LineChart.Thickness = 3;
  
    this.chartGwData.DataSource = gwMonDataTable;
    this.chartGwData.DataBind();
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks for any help.</p>