GithubHelp home page GithubHelp logo

d3.v2 loads but not d3.v3 about aight HOT 10 CLOSED

phoebebright avatar phoebebright commented on August 16, 2024
d3.v2 loads but not d3.v3

from aight.

Comments (10)

phoebebright avatar phoebebright commented on August 16, 2024

Just done a few more checks.
Same issue on proper windows machine, so not an emulator issue.
Switching to d3.v2 for the example makes it run ok for me.

from aight.

shawnbot avatar shawnbot commented on August 16, 2024

Which browser are you using? The only reason that aight.d3 wouldn't be able to find d3 is if d3.v3 threw an error and never exported d3 to the global namespace. Did d3.v3 throw an error? Can you get a reference to d3 in the console? The more info that you can provide, the easier this will be to figure out.

from aight.

clintharris avatar clintharris commented on August 16, 2024

@shawnbot I'm also seeing this issue (i.e., d3.v3 results in "d3 is undefined" error, but d3.v2 works.

Did d3.v3 throw an error?

No, not seeing any other errors in the console. Very strange.

from aight.

 avatar commented on August 16, 2024

I just tried running the code in the example (https://github.com/shawnbot/aight/blob/master/examples/d3.html) in IE8 on Windows 7, and I get all the "d3 is not defined" errors. If I change to d3.v2 as mentioned above, I get "object does not support this property or method." I've also tried just embedded aight as shown in the template with a simple d3 example and get the same issues. Any ideas? Should I use an older version of something?

from aight.

buunguyen avatar buunguyen commented on August 16, 2024

This has something to do with this d3/d3#2099.

from aight.

shawnbot avatar shawnbot commented on August 16, 2024

This is not yet fixed in aight v2, unfortunately. See d3/d3#2209 for more info, which is a PR that resolves d3/d3#2099. D3 is a moving target, and if Mike and Jason reject my PR I might have to commit to maintaining an IE8-compatible build on my fork. For now you can grab my build or the minified one.

I'm going to add a note to the README and close this when I hear back from the D3 maintainers.

from aight.

shawnbot avatar shawnbot commented on August 16, 2024

OK, so this might be crazy, but v2.0.5 introduces an aight script that you can use to build an IE8-friendly version of D3, just in case my PR is rejected. This might actually be a better option anyway, because after running it on the latest d3.js and running a diff, it's obvious that there are many other places in the code that need this "shimming".

from aight.

shawnbot avatar shawnbot commented on August 16, 2024

I'm going to close this now that we've got both the aight script and an IE8-friendly D3 build.

from aight.

buunguyen avatar buunguyen commented on August 16, 2024

@shawnbot great job, thanks!

from aight.

shawnbot avatar shawnbot commented on August 16, 2024

Hey @phoebebright @buunguyen @travis5555 @clintharris: if you're still using aight and d3, would you mind testing out the latest? Here's the deal:

  1. Grab d3.ie8.js or the minified build.

  2. Update your <head> to include this snippet with the appropriate paths:

    <!--[if lte IE 9]><script src="aight.js"></script><![endif]-->
    <script src="d3.v3.min.js"></script>
    <!--[if IE 8]><script src="d3.ie8.js"></script><![endif]-->

The unit tests all pass in IE8 and 9 and I've confirmed that the most basic d3 APIs all function as expected in the d3 test, including the opacity shim. I'm very interested in knowing how this works for people with existing projects.

Thank you!

from aight.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.