title: Flot, jsrender & phantom: Bar label axis
body: <p>I set up a jsrender based flot chart with jsreport.net and currently fail with the y axis of the charts on multi-pages. As you can see on the second image, the y axis doesn't match the bars correctly.</p>
  
  <p><strong>Update: Here's the playground link:</strong>: <a href="https://playground.jsreport.net/#playground/WJmSGjkB5/2" rel="nofollow noreferrer">https://playground.jsreport.net/#playground/WJmSGjkB5/2</a></p>
  
  <p><strong>First page:</strong>
  <img src="https://i.stack.imgur.com/fbOFv.png" alt="First page"></p>
  
  <p><strong>Second page:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/h6FLV.png" alt="Second page"></p>
  
  <p><strong>Here's the current source code snippet</strong></p>
  
  <pre><code>        var seriesCount = 1; // current data series identifier
  
          // drawing series hook
          dsHook = function(plot, canvascontext, series){
              for (var i = 0; i &lt; series.data.length; i++){
  
                  // get relative position of plot
                  var offset = plot.offset();
  
                  // get data point
                  var dP = series.data[i];
  
                 var pos = plot.p2c({x: dP[0], y: dP[1]});
  
                 var barWidth = plot.p2c({x: dP[0] + series.bars.barWidth, y: dP[1]}).left - pos.left;
  
                 var posCorr; 
                 // set horizontal position correction
  
                 switch(seriesCount) {
                     case 1: posCorr = -72; break;
                     case 2: posCorr = -23; break;
                     case 3: posCorr = 24; break;
                     case 4: posCorr = -50; break;
                     case 5: posCorr = 2; break;
                  } 
  
                  pos.left += offset.left + posCorr; 
                  pos.top += offset.top - 30;
  
                  numFormatted = number_format(dP[1], 0, '', '\'');
  
                  var aDiv = $('&lt;div&gt;&lt;/div&gt;').css({'width':barWidth, 'background-color':'white','color':'black','font-size':'12px','text-align':'center','position':'absolute','left': pos.left,'top':pos.top}).text(numFormatted).appendTo("body");
  
              }
              seriesCount++;
          }
  </code></pre>