This is an example of a line graph with multiple lines and labels at the end of those lines.
Created in responce to a question on d3noob.org
A few points to note:
The csv file starts with the newest data point and ends with the oldest. If you needed to get the 'y' position of the last point in the array you will need to use data[data.length-1].open
rather than data[0].open
.
I've left some console.log calls in the code as small demos.
The script makes the adjustment for scale using the y
function.
forked from d3noob's block: Multiple line graphs with labels
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js