title: Scaling and scrolling chart windows forms
body: <p>I have a chart and TextBoxes which show coordinates (xMin, xMax, yMin, yMax) by which user can change scale of a chart. Examples of what I need you can see in pictures below.</p>
  <p>I planned to change <strong>Axis min/max</strong> values if user gives values bigger than original, and use <strong>ScaleView.zoom</strong> if given values is less. But zooming (actually only for AxisX) don't works correctly:</p>
  <ol>
  <li><p>When I use <code>.ScaleView.Zomm(a,b)</code> I get zoom from <strong>(a-1) to b</strong>. If I put <code>.ScaleView.Zomm((a+1), b)</code> it's okay, but <code>.ScaleView.Size</code> become lower.</p>
  </li>
  <li><p>So main problem is that zooming dont allow me to zoom more than 3 intervals, for example</p>
  <pre><code> xMin = 5;
   xMax = 8;
   AxisX.ScaleView.Zomm(xMin + 1, xMax)
  </code></pre>
  </li>
  </ol>
  <p>It works well and show me 3 intervals (from 5 to 8).
  But this code</p>
  <pre><code>   xMin = 6;
     xMax = 8;
     AxisX.ScaleView.Zomm(xMin + 1, xMax)
  </code></pre>
  <p>Still shows me 3 intervals. If I will use <code>xMin</code> instead of <code>xMin+1</code> I'll get same result at <code>xMin = 7</code>.</p>
  <p>For AxisY it works: when i zoom more than 3 intervals it shows me double values between (for AxisX i need only integers).</p>
  <p>P.S.<br />
  Also I need to put in TextBoxes new values, when user scrolls, so if you can help me with this too, i will be pleasured</p>
  <p>Thanks</p>
  <p>What I want to get:</p>
  <ol>
  <li><a href="https://i.stack.imgur.com/MhH3D.png" rel="nofollow noreferrer">Standard mode</a></li>
  <li><a href="https://i.stack.imgur.com/LMJ95.png" rel="nofollow noreferrer">Scaled with interval 1 (6 to 7)</a></li>
  <li><a href="https://i.stack.imgur.com/OGOFX.png" rel="nofollow noreferrer">TextBoxes updated after scrolling</a></li>
  </ol>
  <p>What I have:</p>
  <ol>
  <li><a href="https://i.stack.imgur.com/DpjcT.png" rel="nofollow noreferrer">Scale 5 to 8</a></li>
  <li><a href="https://i.stack.imgur.com/56gcP.png" rel="nofollow noreferrer">Scale 6 to 8</a></li>
  <li><a href="https://i.stack.imgur.com/ctJH6.png" rel="nofollow noreferrer">Scale 6 to 8 after scrolling</a></li>
  <li><a href="https://i.stack.imgur.com/TLr8x.png" rel="nofollow noreferrer">Scale 7 to 8</a></li>
  </ol>