I want to generate some graphs and I follow some tutorials but I think I am using a different version of d3.js because I keep getting weird errors like d3.line() is not a function or .interpolate is not a know method etc. Is there a way to download and use a earlier version of d3.js? Also any other good methods of generating charts (including a treemap) a large dataset that is updating every second? I have tried chart.js and n2-nvd3(not sure if this is the right name). Please be aware that I am new to typescript and angular in general.
Asked
Active
Viewed 1,438 times
2 Answers
0
https://www.npmjs.com/package/d3
then go to versions. you can Use NPM to select the version you want.

Jacob Nash
- 11
- 3
-
Will this overwrite the d3.js version that I already have installed on my machine? – May 04 '18 at 19:54
-
You can install multiple versions. you will just have to define which one you want to use. here is a link showing that https://stackoverflow.com/questions/15890958/how-do-i-install-a-previous-version-of-an-npm-package – Jacob Nash May 04 '18 at 20:02
0
You probably are using d3-v3.
Try to install it by using:
npm i d3-3
Then you can import:
import * as d3 from 'd3-3';

Raphael M.
- 140
- 6