title: Can I keep integral tick marks even with autoranging on an Axis?
body: <p>I "stole" some code from <a href="http://fxexperience.com/2012/01/curve-fitting-and-styling-areachart/" rel="nofollow noreferrer">here</a> to have an <code>AreaChart</code> with "smooth lines" which I use in my FXML and it works:</p>
  
  <pre><code>    &lt;SmoothedAreaChart fx:id="chart" legendVisible="false"
          title="Tree depth by line" animated="false"&gt;
          &lt;xAxis&gt;
              &lt;NumberAxis fx:id="xAxis" tickUnit="1.0" autoRanging="false"
                  minorTickVisible="false" forceZeroInRange="false"
                  label="Line number"/&gt;
          &lt;/xAxis&gt;
          &lt;yAxis&gt;
              &lt;NumberAxis fx:id="yAxis" minorTickVisible="false"
                  tickUnit="1.0" forceZeroInRange="true" label="Tree depth"/&gt;
          &lt;/yAxis&gt;
      &lt;/SmoothedAreaChart&gt;
  </code></pre>
  
  <p>The problem I have however is with the Y axis.</p>
  
  <p>I set the <code>tickUnit</code> to <code>1.0</code> because I want, well, integral units, but it doesn't quite work:</p>
  
  <p><img src="https://i.stack.imgur.com/GXihr.png" alt="enter image description here"></p>
  
  <p>If, in the definition of <code>yAxis</code>, I set <code>autoRanging</code> to <code>false</code> then the graph is cropped (I set the upper bound by hand when I fill the graph):</p>
  
  <p><img src="https://i.stack.imgur.com/QsNTx.png" alt="enter image description here"></p>
  
  <p>And, well, there are too many tick marks as well.</p>
  
  <p>Basically, I'd like the behavior of both:</p>
  
  <ul>
  <li>that the autoranging takes place,</li>
  <li>but that the tick marks always be integral numbers.</li>
  </ul>
  
  <p>Is there a possibility to do this, or do I need to code my own/find an implementation of <code>Axis</code> which does that?</p>