Skip to content

Instantly share code, notes, and snippets.

@Willmo36
Created March 30, 2015 10:14
Show Gist options
  • Save Willmo36/9c13e3128dd628292252 to your computer and use it in GitHub Desktop.
Save Willmo36/9c13e3128dd628292252 to your computer and use it in GitHub Desktop.
d3-tip with browserify and webpack
let d3 = require("d3");
let d3tip = require("d3-tip");
d3tip(d3);
import d3 from "d3";
import d3Tip from "d3-tip";
d3.tip = d3Tip;
@konekoya
Copy link

This just made my day! Thank you a ton!

@jbschrades
Copy link

create-react-app 3.3.1
d3 5.12
d3-tip 0.9.1

None of the above worked for me. This did:

import * as d3 from "d3"
import d3Tip from "d3-tip"
const tip = d3Tip().attr(...).html(...)

@asteffey
Copy link

This worked for me, using create-react-app@3.3.0, d3@5.15.0, and d3-tip@0.9.1.

import * as _d3 from 'd3';
import _d3Tip from 'd3-tip';
const d3 = {..._d3, tip: _d3Tip};

@mgilarmo
Copy link

create-react-app 3.3.1
d3 5.12
d3-tip 0.9.1

None of the above worked for me. This did:

import * as d3 from "d3"
import d3Tip from "d3-tip"
const tip = d3Tip().attr(...).html(...)

thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment