1.1.7 • Published 4 years ago

d3-react-container v1.1.7

Weekly downloads
5
License
none
Repository
github
Last release
4 years ago

d3-react-container

NPM version npm download

Maintainer

Muhammad Usman

Installation

npm install d3-react-container

Usage

Using NPM

1 . Require d3-react-container after installation

import D3Container from 'd3-react-container'

2 . Add parent element = "html element" to D3Container component

<D3Container element="div" />

3 . Include d3 implementation in D3Callback props

<D3Container element="div"
        d3Callback={selection => {
          //d3 code
        }/>

Options

propsTypeDescriptionDefault Value
elementStringHTML element'div'
D3CallbackFunctionD3 Implementation(selection)=> {}

Example of using d3-react-container:

import D3Container from 'd3-react-container'

<D3Container
        element="div"
        d3Callback={selection => {

          const div = selection.attr('class', 'App')
          .style('width', '500px')
          .style('height', '500px')

          const header = div.append('header').attr('class', 'App-header')}/>

Contributing

We welcome your contribution! Fork the repo, make some changes, submit a pull-request!.

License

none

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago