# FarPoint.Web.Spread.SheetView.AddChart

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Web_Spread_SheetView_AddChart_" data-uid="FarPoint.Web.Spread.SheetView.AddChart*">AddChart Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Web_Spread_SheetView_AddChart_" data-uid="FarPoint.Web.Spread.SheetView.AddChart*"></a>
<h4 id="FarPoint_Web_Spread_SheetView_AddChart_System_Int32_System_Int32_System_Type_System_Int32_System_Int32_System_Int32_System_Int32_FarPoint_Web_Chart_ChartViewType_System_Boolean_" data-uid="FarPoint.Web.Spread.SheetView.AddChart(System.Int32,System.Int32,System.Type,System.Int32,System.Int32,System.Int32,System.Int32,FarPoint.Web.Chart.ChartViewType,System.Boolean)">AddChart(int, int, Type, int, int, int, int, ChartViewType, bool)</h4>
<div class="markdown level1 summary"><p>Adds the chart control.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public SpreadChart AddChart(int row, int column, Type seriesType, int width, int height, int x, int y, ChartViewType viewType, bool showLegend)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddChart(row As Integer, column As Integer, seriesType As Type, width As Integer, height As Integer, x As Integer, y As Integer, viewType As ChartViewType, showLegend As Boolean) As SpreadChart</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.int32">int</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>The row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">column</span></td>
      <td><p>The column.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">seriesType</span></td>
      <td><p>Type of the series.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>Width of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>Height of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The X position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The Y position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Web.Chart/FarPoint.Web.Chart.ChartViewType.html">ChartViewType</a></td>
      <td><span class="parametername">viewType</span></td>
      <td><p>Type of the view.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showLegend</span></td>
      <td><p>if set to <code>true</code> the new chart will have a default legend area; otherwise, there is no legend area.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="FarPoint.Web.Spread.Chart.SpreadChart.html">SpreadChart</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_SheetView_AddChart_" data-uid="FarPoint.Web.Spread.SheetView.AddChart*"></a>
<h4 id="FarPoint_Web_Spread_SheetView_AddChart_System_Int32_System_Int32_System_Type_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.SheetView.AddChart(System.Int32,System.Int32,System.Type,System.Int32,System.Int32,System.Int32,System.Int32)">AddChart(int, int, Type, int, int, int, int)</h4>
<div class="markdown level1 summary"><p>Adds the chart control.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public SpreadChart AddChart(int row, int column, Type seriesType, int width, int height, int x, int y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddChart(row As Integer, column As Integer, seriesType As Type, width As Integer, height As Integer, x As Integer, y As Integer) As SpreadChart</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.int32">int</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>The row.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">column</span></td>
      <td><p>The column.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">seriesType</span></td>
      <td><p>Type of the series.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>Width of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>Height of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The X position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The Y position.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="FarPoint.Web.Spread.Chart.SpreadChart.html">SpreadChart</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_SheetView_AddChart_" data-uid="FarPoint.Web.Spread.SheetView.AddChart*"></a>
<h4 id="FarPoint_Web_Spread_SheetView_AddChart_FarPoint_Web_Spread_Model_CellRange___System_Type_System_Int32_System_Int32_System_Int32_System_Int32_FarPoint_Web_Chart_ChartViewType_System_Boolean_" data-uid="FarPoint.Web.Spread.SheetView.AddChart(FarPoint.Web.Spread.Model.CellRange[],System.Type,System.Int32,System.Int32,System.Int32,System.Int32,FarPoint.Web.Chart.ChartViewType,System.Boolean)">AddChart(CellRange[], Type, int, int, int, int, ChartViewType, bool)</h4>
<div class="markdown level1 summary"><p>Adds a chart to the SheetView. The chart is aligned in the center of the SheetView.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public SpreadChart AddChart(CellRange[] cellRanges, Type seriesType, int width, int height, int x, int y, ChartViewType viewType, bool showLegend)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddChart(cellRanges As CellRange(), seriesType As Type, width As Integer, height As Integer, x As Integer, y As Integer, viewType As ChartViewType, showLegend As Boolean) As SpreadChart</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="FarPoint.Web.Spread.Model.CellRange.html">CellRange</a>[]</td>
      <td><span class="parametername">cellRanges</span></td>
      <td><p>Multiple cell ranges that are used to create data for the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">seriesType</span></td>
      <td><p>Indicates which chart type is added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>Width of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>Height of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The X position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The Y position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Web.Chart/FarPoint.Web.Chart.ChartViewType.html">ChartViewType</a></td>
      <td><span class="parametername">viewType</span></td>
      <td><p>Type of the view.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showLegend</span></td>
      <td><p>if set to <code>true</code> the new chart has a default legend area; otherwise, there is no legend area.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="FarPoint.Web.Spread.Chart.SpreadChart.html">SpreadChart</a></td>
      <td><p>The newly created instance of the chart.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_SheetView_AddChart_" data-uid="FarPoint.Web.Spread.SheetView.AddChart*"></a>
<h4 id="FarPoint_Web_Spread_SheetView_AddChart_FarPoint_Web_Spread_Model_CellRange___System_Type_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.SheetView.AddChart(FarPoint.Web.Spread.Model.CellRange[],System.Type,System.Int32,System.Int32,System.Int32,System.Int32)">AddChart(CellRange[], Type, int, int, int, int)</h4>
<div class="markdown level1 summary"><p>Adds a chart to the SheetView. The chart is aligned in the center of the SheetView.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public SpreadChart AddChart(CellRange[] cellRanges, Type seriesType, int width, int height, int x, int y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddChart(cellRanges As CellRange(), seriesType As Type, width As Integer, height As Integer, x As Integer, y As Integer) As SpreadChart</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="FarPoint.Web.Spread.Model.CellRange.html">CellRange</a>[]</td>
      <td><span class="parametername">cellRanges</span></td>
      <td><p>Multiple cell ranges that are used to create data for the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">seriesType</span></td>
      <td><p>Indicates which chart type is added.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>Width of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>Height of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The X position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The Y position.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="FarPoint.Web.Spread.Chart.SpreadChart.html">SpreadChart</a></td>
      <td><p>The newly created instance of the chart.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_SheetView_AddChart_" data-uid="FarPoint.Web.Spread.SheetView.AddChart*"></a>
<h4 id="FarPoint_Web_Spread_SheetView_AddChart_FarPoint_Web_Spread_Model_CellRange_System_Type_System_Int32_System_Int32_System_Int32_System_Int32_FarPoint_Web_Chart_ChartViewType_System_Boolean_" data-uid="FarPoint.Web.Spread.SheetView.AddChart(FarPoint.Web.Spread.Model.CellRange,System.Type,System.Int32,System.Int32,System.Int32,System.Int32,FarPoint.Web.Chart.ChartViewType,System.Boolean)">AddChart(CellRange, Type, int, int, int, int, ChartViewType, bool)</h4>
<div class="markdown level1 summary"><p>Adds the chart control.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public SpreadChart AddChart(CellRange cellRange, Type seriesType, int width, int height, int x, int y, ChartViewType viewType, bool showLegend)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddChart(cellRange As CellRange, seriesType As Type, width As Integer, height As Integer, x As Integer, y As Integer, viewType As ChartViewType, showLegend As Boolean) As SpreadChart</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="FarPoint.Web.Spread.Model.CellRange.html">CellRange</a></td>
      <td><span class="parametername">cellRange</span></td>
      <td><p>The range of data used in the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">seriesType</span></td>
      <td><p>Type of the series.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>Width of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>Height of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The X position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The Y position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Web.Chart/FarPoint.Web.Chart.ChartViewType.html">ChartViewType</a></td>
      <td><span class="parametername">viewType</span></td>
      <td><p>Type of the view.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showLegend</span></td>
      <td><p>if set to <code>true</code> the new chart has a default legend area; otherwise, there is no legend area.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="FarPoint.Web.Spread.Chart.SpreadChart.html">SpreadChart</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_SheetView_AddChart_" data-uid="FarPoint.Web.Spread.SheetView.AddChart*"></a>
<h4 id="FarPoint_Web_Spread_SheetView_AddChart_FarPoint_Web_Spread_Model_CellRange_System_Type_System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="FarPoint.Web.Spread.SheetView.AddChart(FarPoint.Web.Spread.Model.CellRange,System.Type,System.Int32,System.Int32,System.Int32,System.Int32)">AddChart(CellRange, Type, int, int, int, int)</h4>
<div class="markdown level1 summary"><p>Adds the chart control.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public SpreadChart AddChart(CellRange cellRange, Type seriesType, int width, int height, int x, int y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddChart(cellRange As CellRange, seriesType As Type, width As Integer, height As Integer, x As Integer, y As Integer) As SpreadChart</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="FarPoint.Web.Spread.Model.CellRange.html">CellRange</a></td>
      <td><span class="parametername">cellRange</span></td>
      <td><p>The range of data used in the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">seriesType</span></td>
      <td><p>Type of the series.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>Width of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>Height of the chart.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The X position.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The Y position.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="FarPoint.Web.Spread.Chart.SpreadChart.html">SpreadChart</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
