![]() |
VOOZH | about |
The d3.csv() function in D3.js is a part of the request API that returns a request for the file of type CSV at the specified URL. The mime type is text/CSV.
Syntax:
d3.csv(url[[, row], callback])
Parameters:
Return Value: It returns a request for the file of type text/csv.CSV
Example 1: Fetching a file named sample.csv which is stored in the same location where the index.html is present. Please create the sample.csv file if not created already. Data of the CSV file is given as a comment in the code below.
Output:
👁 ImageExample 2: