title: asp.net charts: Legend overlapping with X-axis
body: <p>I am creating a Chart (DataVisualization.Charting.Chart) programmatically, which is a Stacked Bar chart.</p>
  
  <p>I am also adding Legend entries programmatically to it. I want to show the Legend at the bottom of the chart.</p>
  
  <p>But, while doing so, the Legend overlapps with the X-axis of the chart.</p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>Private Function GetLegend(ByVal legendName As String, ByVal s As Single) As     System.Windows.Forms.DataVisualization.Charting.Legend
  
   Dim objLegend As System.Windows.Forms.DataVisualization.Charting.Legend = New System.Windows.Forms.DataVisualization.Charting.Legend()
  
   objLegend.Name = legendName
   objLegend.Font = New System.Drawing.Font("Verdana", s)
   objLegend.IsDockedInsideChartArea = False
   objLegend.Docking = Docking.Bottom
   Return objLegend
  End Function
  </code></pre>
  
  <p>Below statement adds that Legend to the chart</p>
  
  <pre><code>_msChart.Legends.Add(GetLegend("SomeValue1", 10.0F))
  </code></pre>
  
  <p>Any idea, what is missing? I want to show the legend at the bottom only, but it should not overlapp with the X-axis.</p>