This is an example to demonstrate d3js CSV reader
Created
March 6, 2017 17:59
-
-
Save dimitardanailov/aa1d5575a275d867254cdf12ac3224f2 to your computer and use it in GitHub Desktop.
Simple CSV reader with d3js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="//d3js.org/d3.v3.min.js"></script> | |
<script> | |
d3.csv('lines.csv', function(data) { | |
console.log(data[0]); | |
}); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x1 | y1 | x2 | y2 | |
---|---|---|---|---|
350 | 15 | 250 | 33 | |
420 | 420 | 250 | 333 | |
140 | 120 | 220 | 220 | |
180 | 55 | 330 | 320 | |
200 | 260 | 150 | 180 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment