How to add pagination in table using d3?
<p>i have following code,i have to add pagination on this table</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;table&lt;/title&gt;
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"&gt;&lt;/script&gt;
&lt;style&gt; 
 .rect {
  outline: 1px solid green;
}
&lt;/style&gt; 
&lt;/head&gt;
&lt;body&gt;

&lt;div id="table"&gt;&lt;/div&gt;
&lt;script&gt;
var data = [{
  "name": "a",
  "section": 1,
  "stars": "d1"
}, {
  "name": "b",
  "section": 2,
  "stars": "d2"
}, {
  "name": "c",
  "section": 1,
  "stars": "d3"
}];

var columns = ['name', 'section', 'stars']
  // create table
var table = d3.select("#table").append("table");

var thead = table.append("thead").append("tr");

thead.selectAll("th")
  .data(columns)
  .enter()
  .append("th")
  .text(function(d) {
    return d;
  });

var tbody = table.append("tbody");

data.forEach(function(d, i) {
  trow = tbody.append("tr")
  trow.selectAll("td")
    .data(columns)
    .enter()
    .append("td")
    .append(function(d) {
      if (d == "stars") {
        return document.createElement('button');
      } else
        return document.createElement('div');
    })
    .attr("class", function(d) {
      if (d == "section") {
        return "rect"
      }
    })
    .text(function(e) {
      return d[e]
    });

});
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
</div>
</div>
</p>

<p>how to add pagination in d3?
i have to set pagination for each two rows,please suggest the solution.
just i have added 3 rows of data but my actual data contains 50 to 100 rows</p>