我正在寻找js包,我想为我的React地图创建3d日历或3d热图(下面是R的rayshader ),我想知道一些d3.js是否适合这个,但d3.js似乎是不兼容的,因为它使用的是实际的,而不是像React那样的虚拟DOM。

发布于 2021-05-07 20:33:23
当然,您可以将D3与reach一起使用。有一些库可以让这一切变得简单,下面就是其中之一:
https://react-d3-library.github.io/
import React from 'react';
import node from './diagram';
import rd3 from 'react-d3-library';
const RD3Component = rd3.Component;
module.exports = React.createClass({
getInitialState: function() {
return {d3: ''}
},
componentDidMount: function() {
this.setState({d3: node});
},
render: function() {
return (
<div>
<RD3Component data={this.state.d3} />
</div>
)
}});
https://stackoverflow.com/questions/67431450
复制相似问题