score:2
Accepted answer
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.
YUI({
groups: {
"d3lib": {
base: "http://d3js.org/", //the modules of this group will be downloaded from there
modules: {
"d3": {
path:"d3.v2.js" // base + path = http://d3js.org/d3.v2.js
},
"d3fake": { //another module of the "d3lib" group
path:"d3fake.js"
}
}
}
}
}).use("d3", function (Y) {
//d3 is available and ready to use!
}
});
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
Source: stackoverflow.com
Related Query
- How to load d3.js from YUI3
- How to load data from a CSV file in D3 v5
- How to load data from an internal JSON array rather than from an external resource / file for a collapsible tree in d3.js?
- How to load external JSON data from a Web API in d3.js?
- How to load a csv file from static in django into javascript function
- How to expand child from JSON, load data after click parent - D3.Js - force directed layout
- How can we load color from a sequential scale into a map in D3 v5?
- How to load data to D3 chart from JSON when there are only tuples
- How to load a json from externally to a D3 application
- D3: How to load features from a JSON string in D3
- How to update d3 graphics if I load from external data?
- How to load data from Django to a variable for a D3 graph
- In D3 Sankey, how can I load the from objects or arrays instead of either json or csv files?
- How to load chart data from URL for reactd3?
- Trying to load a .tsv file from the front end. The file stays on my server. How do I do this using Express?
- How to load a json from a file to the D3 api
- How do I remove all children elements from a node and then apply them again with different color and size?
- How to write vertical text from bottom to top without using transform rotate?
- How to get maximum value from an array of objects to use in d3.scale.linear().domain()
- In d3, how to get the interpolated line data from a SVG line?
- How to prevent d3 from triggering drag on right click?
- How do I resolve "[ERR_REQUIRE_ESM]: Must use import to load ES Module" when using D3.js 7.0.0 with Next.js 11.0.1?
- How to draw a path smoothly from start point to end point in D3.js
- how to load a json object instead of json file
- How to select unique values in d3.js from data
- How can I efficiently move from a Pandas dataframe to JSON
- d3.sparql - How to query SPARQL endpoints directly from D3js?
- how can I exclude an element from an Angular scope?
- How do I load JSON data synchronously with d3.js?
- How can I keep tick marks from repeating when I have a small number of dates on an nvd3 chart
More Query from same tag
- Issue with scale module d3 on react
- Reliable way to determine the width of svg text styled with @font-face
- D3 animation (transition) does NOT work on Angular app
- D3 adds path for geojson but not topojson
- Conditionally build group in d3
- How to read geojson file using TopoJSON
- Problems converting from shape to topojson
- D3 Canvas brush and zoom
- Min and Max function in d3.js
- d3.js update line based on mouse movement
- Appending title to D3 Tree layout causes error (D3)
- Setting the circle radius in d3js with a dynamic variable
- selecting a column of a matrix created from a list in d3
- d3js. Coordinates after zoom and pan. How to calculate it?
- d3js stacked bar chart not updating
- Why is domain not using d3.max(data) in D3?
- Understanding enter() and exit()
- D3.js - Fading in data points sequentially
- d3.js force directed layout constrained by a shape
- Drag rect not working as expected
- Putting tspan inside rectangle D3JS SVG
- D3 custom library - Collapsible Tree in Drupal 7
- D3js responsive stacked bar chart - other topics solutions not working
- How to load d3.js from YUI3
- D3 Graph working in chromium, but not in other browsers
- place image inside grid using d3js
- D3 7.0.0 SyntaxError: Unexpected token 'export'
- SVG Text responsive positioning
- Updating D3 Axis Labels
- How to merge objects using javascript