0.1.1 • Published 8 years ago

types.d3 v0.1.1

Weekly downloads
19
License
MIT
Repository
-
Last release
8 years ago

Type definitions for d3.js 4.x

travis-ci

Install

npm install d3-selection d3-transition d3-array ... --save
npm install types.d3 --save

Install d3 modules and types.d3 module.

{
  "compilerOptions" : {
    "typeRoots" : [ "node_modules" ],
    "types" : [ "types.d3" ]
  }
}

Add typeRoots and types to your tsconfig.json.

tsc compiler will find index.d.ts files with typeRoots and types it is like add /// <reference path="${typeRoots}/${types}/index.d.ts"/> to your ts file.

import {select} from 'd3-selection';
import {min, max} from 'd3-array';

d3-selection and d3-transition

d3-selection include d3-transition API.

If you want use Selection.transition(). You need to import d3-transition before use that.

import 'd3-transition'; // import the d3-transition
import {select} from 'd3-selection';

select('a').transition(); // then you can use Selection.transition()

Work Status

License

MIT

Other definitions for d3.js 4.x