D3 candlestick example error #3614
-
Regarding using the candlestick example... https://observablehq.com/@d3/candlestick-chart Data looks like this: Judging by error and code (and I may be incorrect) it seems like it's expecting Date to be a number instead of a string? Do I need to fix the example code, or the example data or am I potentially using this thing incorrectly? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
In this notebook the cell that reads the data converts the date field from a string to a javascript Date, thanks to the typed: true option aapl = FileAttachment("aapl-2.csv").csv({typed: true}).then(data => data.slice(-120)) In a typical use of D3 you might use |
Beta Was this translation helpful? Give feedback.
In this notebook the cell that reads the data converts the date field from a string to a javascript Date, thanks to the typed: true option
In a typical use of D3 you might use
d3.csv("url of the file", d3.autyType)
instead.