简体   繁体   English

d3.js 在 React 中用于 3d 图表

[英]d3.js in React for 3d charts

I'm searching for js package, I want to create 3d calendar or 3d heatmap like below (below it's rayshader from R) for my React map, I wonder if some d3.js would be suitable for this, but d3.js seems to be incompatible, as it uses actual, not virtual DOM like React. I'm searching for js package, I want to create 3d calendar or 3d heatmap like below (below it's rayshader from R) for my React map, I wonder if some d3.js would be suitable for this, but d3.js seems to be incompatible, as它使用实际的,而不是像 React 那样的虚拟 DOM。

在此处输入图像描述

Of course, you can use D3 with reach.当然,您可以使用 D3 与范围。 Ther are libraries which makes this easy and here is one:有一些库可以让这变得简单,这里有一个:

https://react-d3-library.github.io/ 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>
    )
  }

}); });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM