N
N
Ninja Mate2016-04-06 19:38:51
JavaScript
Ninja Mate, 2016-04-06 19:38:51

How to push visualization in React D3?

I came across the fact that all D3 React libraries (I tried 5 today) do not perform even half of the necessary functions, even if it is written that they do, they simply do not work. You can't simply set colors.
I decided to use my native D3.js.
The question arose of how to turn it around. D3 Dom mutates, but React doesn't... Create a separate js for d3 and include it using require.insere?
If you have such an experience, please share.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Gushchin, 2016-04-06
@victorzadorozhnyy

Create a react element that will be a container. After didMount work with DOM inside this component

class MyD3Component extends Component {
  componenDidMount() {
    ReactDOM.findDOMNode(this.refs.container) // для d3
  }
  
  render() {
    return <div ref="container" />
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question