Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function zoomed() {
- if (self.onVizChangeFn && d3.event) {
- self.onVizChangeFn.call(self, {
- scale: d3.event.scale,
- translate: d3.event.translate,
- domain: [x.domain()]
- });
- }
- var t = zoom.translate(),
- tx = t[0],
- ty = t[1];
- tx = Math.min(0, tx),
- tx = Math.max(width - maxDt, tx),
- zoom.translate([tx, ty]);
- svg.select('.x.axis').call(xAxis);
- svg.selectAll('rect.interval').attr('x', function (d) {
- return x(d.from);
- }).attr('width', function (d) {
- return Math.max(options.intervalMinWidth, x(d.to) - x(d.from));
- });
- }
- }
Add Comment
Please, Sign In to add comment