How to load d3.js from YUI3?
I know how to load the native YUI module, but I am unsure how to load external module / library.
YUI().use("node", function(Y){
//initialization code
});
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to config YUI, so he knows where to find it.
By default the loader will look for the scripts at the same place that the yui seed file.
To change the place a specific script (d3) will be download you need to define a group.
A group has ‘base’ that is the base path where its modules will be downloaded.
So you define a group “d3” with a module d3.
You can check the following link where they load some yui2 modules (this is the same principle).
http://yuilibrary.com/yui/docs/yui/loader.html#example-config