title: recharts missing ticks or ticks are displayed wrong
body: <p>I'm using recharts library to create a chart. The x axis of the chart is the timeline axis and I use timestamps as values for it. What I'm trying to do is to display only 5 ticks(for example) spaced equally. I found a lot of people having similar problems on the library git repository. One fixes was to use <code>scale=&quot;time&quot;</code> and setting a minimum tick gap for x axis:</p>
  <pre><code>&lt;XAxis dataKey='timestamp'
     domain={['dataMin', 'dataMax']}
     type = 'number'
     scale=&quot;time&quot;
     minTickGap={120}
     tickCount={7} */
     tickFormatter = {(unixTime) =&gt; moment(unixTime).format('DD MMM')}
  /&gt;
  </code></pre>
  <p>I'm using the brush component of the library to zoom in on the chart and the problem with this implementation is that when I zoom in sometimes it displays all the ticks.</p>
  <p>Ex. without zoom in:
  <a href="https://i.stack.imgur.com/gs5Sk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gs5Sk.png" alt="enter image description here" /></a></p>
  <p>Ex zooming in:
  <a href="https://i.stack.imgur.com/14BQF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/14BQF.png" alt="enter image description here" /></a></p>
  <p>I found that if I remove the <code>scale=&quot;time&quot;</code> parameter and set a specific tickCount and set interval to 0 the problem that occurs when I zoom in disappears but 1 tick is missing or it appears only when I zoom in.</p>
  <pre><code>&lt;XAxis dataKey='timestamp'
     domain={['dataMin', 'dataMax']}
     type = 'number'
     interval={0}
     tickCount={7}
     tickFormatter = {(unixTime) =&gt; moment(unixTime).format('DD MMM')}
  /&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/TWcL0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TWcL0.png" alt="enter image description here" /></a></p>
  <p>Does anyone now how can I fix the issues mentioned above? I don't think I can use predefined ticks based on maximum and minimum values of the axis because those values becomes irrelevant when I zoom in.</p>