gka / d3-jetpack

🚀 Nifty convenience wrappers that speed up your daily work with d3.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

translateCSS for html elements

1wheel opened this issue · comments

something like:

export default function(xy) {
  return this.style('transform', function(d,i) {
    var p = [typeof xy == 'function' ? xy.call(this, d,i) : xy]
    return 'translate(' + p[0] + 'px, ' + p[1] + 'px)';
  });
}

gpu accelerated!