小编use*_*969的帖子

意外的命名空间导入导入/无命名空间

我正在尝试在 React 中导入 D3v4 来生成 Dash 组件。到目前为止,这是我的代码:

import React, {Component} from 'react';
import PropTypes from 'prop-types';
import * as d3 from 'd3';

function createBox(divId) {
    var svgContainer = d3.select(divId).append('svg')
                                     .attr('width', 200)
                                     .attr('height', 200);

 //Draw the Circle
   svgContainer.append('circle')
                        .attr('cx', 30)
                        .attr('cy', 30)
                        .attr('r', 20);
}

/**
 * ExampleComponent is an example component.
 * It takes a property, `label`, and
 * displays it.
 * It renders an input with the property `value`
 * which is editable by the user.
 */
export default …
Run Code Online (Sandbox Code Playgroud)

d3.js reactjs plotly plotly-dash

6
推荐指数
1
解决办法
2734
查看次数

标签 统计

d3.js ×1

plotly ×1

plotly-dash ×1

reactjs ×1