mhemesath / r2d3

Raphael Rendered, Data Driven Documents
MIT License
546 stars 133 forks source link

Transform attribute giving error in IE8 #127

Closed NageshChawan closed 6 years ago

NageshChawan commented 11 years ago

I am trying to render a force layout using R2D3 in IE 8.

node.attr("transform", function(d) {
                return "translate(" + d.x + "," + d.y + ")";
            });

Inside the force tick() method when I call transform for the node I get this error:Arg: Illegal input string in Vector2D at line 4793 skew.offset = matrix.offset() in the r2d3.js. Problem what I see here is IE8 browser engine is not able to read the large numbers which are returned by this translate method. I am not able to understand how are this large numbers returned by the translate method which should ideally return each nodes x and y position.

mhemesath commented 11 years ago

What is the value of d.x and d.y, or more importanlty, the returned transform string from your example function?

NageshChawan commented 11 years ago

Following is the trace of the developer tool where we can see the transform values.

<g fixed="true" r2d3="[object Object]" class="node" transform="translate(-4910.71135479042,1350.786467869108)">

Not sure if IE8 can render the node at these pixel values. Similar values i get for all the nodes i try to render. This is making the layout get stuck with script errors.

roryhardy commented 6 years ago

Hi there,

This project is no longer being maintained so this issue is being closed. Thank you for using r2d3 and taking the time to report this issue.