-
-
Save waleedshkt/98723a7e9580ad655814555ba3c2b98f to your computer and use it in GitHub Desktop.
Modularly import only the D3.js modules you require
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { line, curve, curveCatmullRom } from "d3-shape"; | |
import { scaleTime, scaleLinear } from "d3-scale"; | |
import { axisBottom, axisLeft } from 'd3-axis'; | |
import { timeParse, isoFormat } from "d3-time-format"; | |
import { select } from "d3-selection"; | |
import { extent, max, min } from "d3-array"; | |
export default { | |
line: line, | |
scaleTime: scaleTime, | |
scaleLinear: scaleLinear, | |
axisBottom: axisBottom, | |
axisLeft: axisLeft, | |
timeParse: timeParse, | |
isoFormat: isoFormat, | |
select: select, | |
extent: extent, | |
min: min, | |
max: max, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import d3 from './d3Importer.js'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment