title: Primefaces chart + jqplot extender - rounded value in the y-axis
body: <p><strong>Background</strong></p>
  
  <p>I have a primefaces line chart (date on x, integer >= 0 on y) extended with jqplot options:</p>
  
  <pre><code>function extender() {
          this.cfg.axes = {
              xaxis : {
                  renderer : $.jqplot.DateAxisRenderer, 
                  rendererOptions : {
                      tickRenderer:$.jqplot.CanvasAxisTickRenderer
                  },
                  tickOptions : { 
                      fontSize:'10pt',
                      fontFamily:'Tahoma', 
                      angle:-40,                     
                      formatString:'%b-%y'
                  },
                  tickInterval:'2592000000'
              },
              yaxis : {
                  min: 0,
                  rendererOptions : {
                      tickRenderer:$.jqplot.CanvasAxisTickRenderer,
                  },
                  tickOptions: {
                      fontSize:'10pt', 
                      fontFamily:'Tahoma', 
                      angle:0,
                      formatString: '%d'
                  }
              },
          };
          this.cfg.axes.xaxis.ticks = this.cfg.categories;
      }
  </code></pre>
  
  <p>I'm using the jqplot extender to have custom date interval on the x-axis and this is working fine:</p>
  
  <p><img src="https://i.stack.imgur.com/TPWlb.png" alt="Working fine"></p>
  
  <p><strong>Problem</strong></p>
  
  <p>When I use the option <code>min: 0</code> in the y-axis the formatting of numbers goes really funky, especially when there are small values:</p>
  
  <p><img src="https://i.stack.imgur.com/EGylu.png" alt="Fraction number"></p>
  
  <p>Note that the <code>minY</code> attribute in primefaces doesn't work (probably because the extender overwrites it)</p>
  
  <p>To fix that, I use <code>formatString: %d</code>. It works but it creates problem with the number of ticks:</p>
  
  <p><img src="https://i.stack.imgur.com/B6EBB.png" alt="enter image description here"></p>
  
  <p>As you see on the screenshot, there are several times the line for the value 1.</p>
  
  <p><strong>Question</strong></p>
  
  <p>How can make sure I don't get several times the same value on the y-axis?</p>
  
  <p>I can't really have a static number of ticks because when the data grows large (let's say around 100), I do want several values on the y-axis (e.g 20, 40, etc...)</p>