# GrapeCity.ActiveReports.Chart.DataPointsCollection.DataBindXY

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Chart_DataPointsCollection_DataBindXY_" data-uid="GrapeCity.ActiveReports.Chart.DataPointsCollection.DataBindXY*">DataBindXY Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Chart_DataPointsCollection_DataBindXY_" data-uid="GrapeCity.ActiveReports.Chart.DataPointsCollection.DataBindXY*"></a>
<h4 id="GrapeCity_ActiveReports_Chart_DataPointsCollection_DataBindXY_System_Object_System_String_System_Object_System_String_" data-uid="GrapeCity.ActiveReports.Chart.DataPointsCollection.DataBindXY(System.Object,System.String,System.Object,System.String)">DataBindXY(object, string, object, string)</h4>
<div class="markdown level1 summary"><p>Binds the X and Y values of the collection's DataPoints to the specified column(s) of the specified data source.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DataBindXY(object xDataSource, string xField, object yDataSource, string yFields)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">xDataSource</span></td>
      <td><p>Specifies the data source object that provides the X value(s).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">xField</span></td>
      <td><p>Specify the name of the column supplying the X value of DataPoints as a string.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">yDataSource</span></td>
      <td><p>Specifies the data source object that provides the Y value(s).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">yFields</span></td>
      <td><p>Specify a comma-separated column names to supply Y values for DataPoints.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_Chart_DataPointsCollection_DataBindXY_" data-uid="GrapeCity.ActiveReports.Chart.DataPointsCollection.DataBindXY*"></a>
<h4 id="GrapeCity_ActiveReports_Chart_DataPointsCollection_DataBindXY_System_Collections_IEnumerable_System_Collections_IEnumerable___" data-uid="GrapeCity.ActiveReports.Chart.DataPointsCollection.DataBindXY(System.Collections.IEnumerable,System.Collections.IEnumerable[])">DataBindXY(IEnumerable, params IEnumerable[])</h4>
<div class="markdown level1 summary"><p>Binds the X value and Y values of the collection's DataPoints to the first column(s) of the specified data source(s).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DataBindXY(IEnumerable xValueEnumerable, params IEnumerable[] yEnumerableValues)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></td>
      <td><span class="parametername">xValueEnumerable</span></td>
      <td><p>Specifies the data source that will supply the X values for the DataPoints. The first available column will be used.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a>[]</td>
      <td><span class="parametername">yEnumerableValues</span></td>
      <td><p>Specifies the Y value(s) of the DataPoint object added to the collection (one or more comma-separated values).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_ActiveReports_Chart_DataPointsCollection_DataBindXY_" data-uid="GrapeCity.ActiveReports.Chart.DataPointsCollection.DataBindXY*"></a>
<h4 id="GrapeCity_ActiveReports_Chart_DataPointsCollection_DataBindXY_System_Object___System_Double_____" data-uid="GrapeCity.ActiveReports.Chart.DataPointsCollection.DataBindXY(System.Object[],System.Double[][])">DataBindXY(object[], params double[][])</h4>
<div class="markdown level1 summary"><p>Binds the X value and Y values of the collection's DataPoints to a specified data source.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DataBindXY(object[] xValues, params double[][] yValues)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</td>
      <td><span class="parametername">xValues</span></td>
      <td><p>Specifies the array of X values of the DataPoint object added to the collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a>[][]</td>
      <td><span class="parametername">yValues</span></td>
      <td><p>Specifies the array of Y values of the doubles added to the collection.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
