How to use D3 and R2D3 in IE8

I searched online about the problem of using d3.js SVG in IE8, and I find that the ideal method uses R2D3 , and I tried to do so, but it still does not work though. I'm not sure what I tried correctly, I only need to import the library?

<html>
  <head>
    <title>R2D3 101</title>
    <!--[if lte IE 8]><script src="r2d3.js" charset="utf-8"></script><![endif]-->
    <!--[if gte IE 9]><!-->
    <script src="d3.js"></script>
    <!--<![endif]-->
  </head>
  <body>
    <h1>Hello, world!</h1>
  </body>
</html>

And other things do not need to be changed? If you're interested, I can show you a simple demo about my treemap function. http://jsfiddle.net/srvikram13/cR35x/9/

Firstly, I am thinking about whether the constraint problem using Transforms is as stated in github: https://github.com/mhemesath/r2d3/

But the fact is, I am really writing the function as GOOD:

// BAD
circles.transform('translate(20)');

// GOOD
circles.transform('translate(20,0)');
+4

Source: https://habr.com/ru/post/1527966/


All Articles