# C1.WPF.C1Chart.PlotElement.AutoPosition

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_C1Chart_PlotElement_AutoPosition_" data-uid="C1.WPF.C1Chart.PlotElement.AutoPosition*">AutoPosition Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_C1Chart_PlotElement_AutoPosition_" data-uid="C1.WPF.C1Chart.PlotElement.AutoPosition*"></a>
<h4 id="C1_WPF_C1Chart_PlotElement_AutoPosition_System_Windows_Size_System_Windows_Point__System_Windows_Point__" data-uid="C1.WPF.C1Chart.PlotElement.AutoPosition(System.Windows.Size,System.Windows.Point@,System.Windows.Point@)">AutoPosition(Size, ref Point, ref Point)</h4>
<div class="markdown level1 summary"><p>Calculates automatic position of data label.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected virtual LabelAlignment AutoPosition(Size labelSize, ref Point hot, ref Point offset)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overridable Function AutoPosition(labelSize As Size, ByRef hot As Point, ByRef offset As Point) As LabelAlignment</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.windows.size">Size</a></td>
      <td><span class="parametername">labelSize</span></td>
      <td><p>Size of the label.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.point">Point</a></td>
      <td><span class="parametername">hot</span></td>
      <td><p>Hot point (coordinates of the data point) of l.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.point">Point</a></td>
      <td><span class="parametername">offset</span></td>
      <td><p>Offset of the label from the hot point.</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="C1.WPF.C1Chart.LabelAlignment.html">LabelAlignment</a></td>
      <td><p>The alignment of the label.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
