title: Get chart area bounds in C#
body: <p>Just to explain what I'm doing, I draw two selectors on a chart, and the part that will not be selected should appear under that blue rectangle. The part that will be selected will appear in the white area, between the two selectors. The figure below shows only the left selector.</p>
  
  <p>Now, what I'm trying to do is to draw a rectangle inside a chart that always remain inside the plotting area, even when the windows is resized.</p>
  
  <p>To get the top, left and bottom bounds, to draw the rectangle as shown in the figure below, I do the following:</p>
  
  <pre><code>(...)
  int top = (int)(Chart.Height * 0.07);
  int bottom = (int)(Chart.Height - 1.83 * top);
  int left = (int)(0.083 * Chart.Width);
  Brush b = new SolidBrush(Color.FromArgb(128, Color.Blue));
  e.Graphics.FillRectangle(b, left, top, marker1.X - left, bottom - top);
  (...)
  </code></pre>
  
  <p>But that's far from perfect, and it isn't drawn in the right place when the window is resized. I want the blue rectangle to always be bound on the top, left and bottom by the plotting area grid. Is that possible?</p>
  
  <p><img src="https://i.stack.imgur.com/JkZEC.png" alt="Chart"></p>