score:0
Accepted answer
your first csv
data is loading asynchronously, so this function will not return anything
functionthatreturnsarray(){
d3.csv("http//url.com", function(){
somemorecode;
return arrayofstrings
};)
}
you can put following code in function
function processarray(a){
morecode;
//for example, the first value from a is selected
d3.csv(a[0], function(error, data) {
morecode;
})
}
and invoke this function in first csv
loading callback
functionthatreturnsarray(){
d3.csv("http//url.com", function(){
somemorecode;
processarray(arrayofstrings) //add this
};)
}
Source: stackoverflow.com
Related Query
- d3. Calling a csv url from an array javascript
- Javascript - Can not access array elements of an array created from a csv file
- Javascript D3: from csv to array
- How can I parse csv data from a javascript array of strings for use in d3 graphs
- How do I retrieve an array from a csv file in javascript using d3?
- Select data from a CSV before loading it with javascript (d3 library)
- Retrieving Keys from JSON Array key-value pair dynamically - Javascript
- Javascript d3 reading from csv
- Copy data from csv into array in D3
- how to get data with tsv or csv to array in d3.js from a txt file?
- Selecting a specific value from an array of objects in javascript
- Javascript D3 How to access and manipulate dataset from CSV
- calculate the date diff in javascript from JSON array
- How to load a csv file from static in django into javascript function
- Calling the controller correctly from JavaScript - ASP.NET MVC
- Calculating an average from a javascript array
- How to reshaping Data in Javascript from array to object without losing some of the data
- Create multinested JSON from URL in Javascript for d3.js
- new array from csv data
- How to create an array of nested objects from a csv file in D3.js?
- Creating array from csv with d3.group without group headers
- How to subset a column from loaded in CSV in D3 javascript from
- Add new row dynamically to an array with headers created from a csv file
- D3.js visual selecting image URL from object array dataset
- d3js: Calling different data from the same CSV - transitions
- Create an array from csv for use with D3.js library
- D3 doesn't load a CSV file from an external URL
- Remove duplicates from parsed CSV array
- Adding tooltips to circles from an array with D3 JavaScript
- Extracting an object from an array in Javascript
More Query from same tag
- Zoom only when Ctrl + scrolling
- d3 v4 force layout with boundary
- Using recorded mouse coordinates to draw on d3 canvas
- D3 scatter plot coming out wrong
- Links overlapping with the image in directional force layout
- D3v4 zoom coordinates of visible area
- Is it possible to debounce d3.zoom callback?
- topojson.mesh outputting incorect path? (stroke-dasharray)
- D3 - Map array to bar chart
- Appending axis to a D3 chart
- Dynamically inserted d3 force graph not spreading out
- How to place the bars of a bar chart in the right positions of the xAxis using d3.js?
- Use D3.js single line graph to display same date but different temperatures
- Convertion from CSV to JSON in d3.js
- D3 and color grid
- d3.js guidance on interactive scrolling an svg element
- D3 Hover Over Changes When Data Changes
- d3 geomap drawing on top of map z-order
- How to allow layout.pack() size to be free form in d3?
- Align svg text inline with d3.js legend
- d3.js: swap between topojson maps on mouseclick?
- arrows on links in d3js force layout
- Unable to re-use transitions
- Is this JSON structure suitable for a stacked bar chart using d3.js?
- D3 js tooltip violin plot
- Can I create a WordPress view to create a JSON file to be used by javascript in a page?
- Processing JSON data with D3
- TypeError with d3js tree
- d3 javascript: reading json file
- Adding text to rectangle elements using D3 / SVG