Hi I\'m looking at the documentation for scales and it shows a format like this var x = d3.scaleLinear([10,130]).range([0,960])
I feel like this is strange beca
As specified by Hina, d3.scale.linear() is used on D3 3.0, and d3 4.0 adopted the flat namespace convention. Here is a snippet from the d3 changelog summary
If you don’t care about modularity, you can mostly ignore this change and keep using the default bundle. However, there is one unavoidable consequence of adopting ES6 modules: every symbol in D3 4.0 now shares a flat namespace rather than the nested one of D3 3.x. For example, d3.scale.linear is now d3.scaleLinear,...
Source: https://github.com/d3/d3/blob/master/CHANGES.md
EDIT: Forgot to mention - to fix your error, you may have to update the link or file to d3 that you have in your program. I call it directly from the website with: