lookout.devlookout.dev
search
Share Knowledge
20

import d3 micro libraries

Wednesday, October 28, 2020

When using d3 it's best practice to import the d3 mirco libraries required, as opposed to importing the full library.

You can find list of d3 mirco libraries here

Instructions

checkmark-circle
Do

import { select, selectAll } from 'd3-selection';

error-circle
Avoid

import * from 'd3';

Tom Eustace

Reformed Java developer specializing in frontend technologies, mostly Angular (Nx), Svelte, Vue and D3.

Have a question or comment?