daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Jun 18th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function zoomed() {
  2.                 if (self.onVizChangeFn && d3.event) {
  3.                         self.onVizChangeFn.call(self, {
  4.                         scale: d3.event.scale,
  5.                         translate: d3.event.translate,
  6.                         domain: [x.domain()]
  7.                     });
  8.                 }
  9.                 var t = zoom.translate(),
  10.                      tx = t[0],
  11.                      ty = t[1];
  12.  
  13.                 tx = Math.min(0, tx),
  14.                 tx = Math.max(width - maxDt, tx),
  15.                 zoom.translate([tx, ty]);
  16.                 svg.select('.x.axis').call(xAxis);
  17.  
  18.                 svg.selectAll('rect.interval').attr('x', function (d) {
  19.                     return x(d.from);
  20.                 }).attr('width', function (d) {
  21.                     return Math.max(options.intervalMinWidth, x(d.to) - x(d.from));
  22.                 });
  23.  
  24.             }
  25.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top