# GrapeCity.Spreadsheet.Charts.IChart.SetSourceData

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_" data-uid="GrapeCity.Spreadsheet.Charts.IChart.SetSourceData*">SetSourceData Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_" data-uid="GrapeCity.Spreadsheet.Charts.IChart.SetSourceData*"></a>
<h4 id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_GrapeCity_Spreadsheet_IRange_System_Nullable_GrapeCity_Spreadsheet_Charts_RowCol__" data-uid="GrapeCity.Spreadsheet.Charts.IChart.SetSourceData(GrapeCity.Spreadsheet.IRange,System.Nullable{GrapeCity.Spreadsheet.Charts.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 = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub SetSourceData(source As IRange, Optional plotBy As RowCol? = Nothing)</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.Spreadsheet.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.Spreadsheet.Charts.RowCol.html">RowCol</a>?</td>
      <td><span class="parametername">plotBy</span></td>
      <td><p>Specifies the way the data is to be plotted.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_GrapeCity_Spreadsheet_IRange_System_Nullable_GrapeCity_Spreadsheet_Charts_RowCol___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This function works with Spread WPF only.</p>
</div>


<a id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_" data-uid="GrapeCity.Spreadsheet.Charts.IChart.SetSourceData*"></a>
<h4 id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_System_String_System_Nullable_GrapeCity_Spreadsheet_Charts_RowCol__" data-uid="GrapeCity.Spreadsheet.Charts.IChart.SetSourceData(System.String,System.Nullable{GrapeCity.Spreadsheet.Charts.RowCol})">SetSourceData(string, 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(string source, RowCol? plotBy = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub SetSourceData(source As String, Optional plotBy As RowCol? = Nothing)</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.string">string</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.Spreadsheet.Charts.RowCol.html">RowCol</a>?</td>
      <td><span class="parametername">plotBy</span></td>
      <td><p>Specifies the way the data is to be plotted.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_System_String_System_Nullable_GrapeCity_Spreadsheet_Charts_RowCol___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This function works with Spread WPF only.</p>
</div>


<a id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_" data-uid="GrapeCity.Spreadsheet.Charts.IChart.SetSourceData*"></a>
<h4 id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_GrapeCity_Spreadsheet_WorksheetReference_System_Nullable_GrapeCity_Spreadsheet_Charts_RowCol__" data-uid="GrapeCity.Spreadsheet.Charts.IChart.SetSourceData(GrapeCity.Spreadsheet.WorksheetReference,System.Nullable{GrapeCity.Spreadsheet.Charts.RowCol})">SetSourceData(WorksheetReference, 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(WorksheetReference source, RowCol? plotBy = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub SetSourceData(source As WorksheetReference, Optional plotBy As RowCol? = Nothing)</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.Spreadsheet.WorksheetReference.html">WorksheetReference</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.Spreadsheet.Charts.RowCol.html">RowCol</a>?</td>
      <td><span class="parametername">plotBy</span></td>
      <td><p>Specifies the way the data is to be plotted.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Spreadsheet_Charts_IChart_SetSourceData_GrapeCity_Spreadsheet_WorksheetReference_System_Nullable_GrapeCity_Spreadsheet_Charts_RowCol___remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This function works with Spread WPF only.</p>
</div>
</div>
