diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts
index 121001b49b..adf853af72 100644
--- a/types/plotly.js/index.d.ts
+++ b/types/plotly.js/index.d.ts
@@ -13,7 +13,7 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
-///
+import * as _d3 from "d3";
export as namespace Plotly;
export interface StaticPlots {
@@ -189,7 +189,7 @@ export function plot(root: Root, data: Data[], layout?: Partial, config?
export function relayout(root: Root, layout: Partial): Promise;
export function redraw(root: Root): Promise;
export function purge(root: Root): void;
-export const d3: any;
+export const d3: typeof _d3;
export function restyle(root: Root, aobj: Data, traces?: number[] | number): Promise;
export function update(root: Root, traceUpdate: Data, layoutUpdate: Partial, traces?: number[] | number): Promise;
export function addTraces(root: Root, traces: Data | Data[], newIndices?: number[] | number): Promise;
diff --git a/types/plotly.js/tsconfig.json b/types/plotly.js/tsconfig.json
index dd21321c49..fe2dfd96bd 100644
--- a/types/plotly.js/tsconfig.json
+++ b/types/plotly.js/tsconfig.json
@@ -13,6 +13,9 @@
"typeRoots": [
"../"
],
+ "paths": {
+ "d3": [ "d3/v3" ]
+ },
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
diff --git a/types/react-plotly.js/tsconfig.json b/types/react-plotly.js/tsconfig.json
index e0ec629a4c..02d264a0e5 100644
--- a/types/react-plotly.js/tsconfig.json
+++ b/types/react-plotly.js/tsconfig.json
@@ -13,6 +13,9 @@
"typeRoots": [
"../"
],
+ "paths": {
+ "d3": [ "d3/v3" ]
+ },
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,