D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
sunole
Full window
Github gist
freshestblock12
Built with
blockbuilder.org
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://d3js.org/d3.v4.min.js"></script> <script src="stocks.js"></script> <style> body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } </style> </head> <body> <script> // Feel free to change or delete any of the code you see in this editor! var svg = d3.select("body").append("svg") .attr("width", 960) .attr("height", 500) svg.append("text") .text("Edit the code below to change me!") .attr("y", 200) .attr("x", 120) .attr("font-size", 36) .attr("font-family", "monospace") var stocks = new Stocks('VTZA'); // Replace with your own // Let's get the stock data of Tesla Inc for the last 10 minutes async function request () { var result = await stocks.timeSeries({ symbol: 'TSLA', interval: 'daily', amount: 52 }); // console.log( JSON.stringify(result )) ; aa = JSON.stringify(result ) } var tickerslist = d3.csv("https://rawgit.com/sunole/6aa71643487b1144390b8011595dba4d/raw/eaf7efc734d95288d831b46181c3b3f61e4a5143/NAS100.csv") ; console.log(tickerslist); var aa; request(); console.log( aa); var data = [[ 1, 2, 3, 4, 5, 6, 7, 8, 9 ,10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [ 5, 5, 5,5 , 5, 5, 5, 5, 5, 5], [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2] [ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]]; </script> </body>
https://d3js.org/d3.v4.min.js