, , :
http://fiddle.jshell.net/7TPhq/7/
, , (x, y), .
fisheye, "accessor" d.x d.y. , , " ", x/y, . , ; d3.
( github, , . , / fisheye, - .)
:
function getHPosition(d){
return (d.y)*Math.cos(d.x);
}
function getVPosition(d){
return (d.y)*Math.sin(d.x);
};
, , , ( , ) d.fisheye.x d.fisheye.y.
, , d3.svg.diagonal, :
var diagonal = d3.svg.diagonal()
.projection(function(d) {
return [getHPosition(d), getVPosition(d)];
});
:
diagonal.projection(function(d) {
d.fisheye = fisheye(d);
return [d.fisheye.x, d.fisheye.y];
});
:
.
pointer-events:all;, , .
( node , ), .
, , , Javascript. , , . , - d3.svg.diagonal() d3.svg.diagonal.radial() , ...