# GrapeCity.Documents.Excel.Drawing.IChart.SetSourceData

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Excel_Drawing_IChart_SetSourceData_" data-uid="GrapeCity.Documents.Excel.Drawing.IChart.SetSourceData*">SetSourceData Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Excel_Drawing_IChart_SetSourceData_" data-uid="GrapeCity.Documents.Excel.Drawing.IChart.SetSourceData*"></a>
<h4 id="GrapeCity_Documents_Excel_Drawing_IChart_SetSourceData_GrapeCity_Documents_Excel_IRange_GrapeCity_Documents_Excel_Drawing_RowCol_" data-uid="GrapeCity.Documents.Excel.Drawing.IChart.SetSourceData(GrapeCity.Documents.Excel.IRange,GrapeCity.Documents.Excel.Drawing.RowCol)">SetSourceData(IRange, RowCol)</h4>
<div class="markdown level1 summary"><p>Sets the source data range for the chart.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void SetSourceData(IRange source, RowCol plotBy)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub SetSourceData(source As IRange, plotBy As RowCol)</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="GrapeCity.Documents.Excel.IRange.html">IRange</a></td>
      <td><span class="parametername">source</span></td>
      <td><p>The range that contains the source data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Excel.Drawing.RowCol.html">RowCol</a></td>
      <td><span class="parametername">plotBy</span></td>
      <td><p>Specifies the way the data is to be plotted. Can be either of the following <a class="xref" href="GrapeCity.Documents.Excel.Drawing.RowCol.html">RowCol</a> constants: Columns or Rows.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Excel_Drawing_IChart_SetSourceData_" data-uid="GrapeCity.Documents.Excel.Drawing.IChart.SetSourceData*"></a>
<h4 id="GrapeCity_Documents_Excel_Drawing_IChart_SetSourceData_GrapeCity_Documents_Excel_IRange_" data-uid="GrapeCity.Documents.Excel.Drawing.IChart.SetSourceData(GrapeCity.Documents.Excel.IRange)">SetSourceData(IRange)</h4>
<div class="markdown level1 summary"><p>Sets the source data range for the chart.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void SetSourceData(IRange source)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub SetSourceData(source As IRange)</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="GrapeCity.Documents.Excel.IRange.html">IRange</a></td>
      <td><span class="parametername">source</span></td>
      <td><p>The range that contains the source data.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
