【问题标题】:Customize storm-react-diagrams with react-vis使用 react-vis 自定义storm-react-diagrams
【发布时间】:2018-02-09 12:32:54
【问题描述】:

我有一个自定义的storm-react-diagram 节点:

this.engine.registerNodeFactory(new ExampleNodeFactory());

const node2 = new ExampleNodeModel();
const port2 = node2.addPort( new ExamplePortModel("left") );

我在 Widget 中的渲染方法如下所示:

render() { 
    return (
        <div className="grid-node" style={{textAlign: 'center', width: '140px'}}>            
            <ExampleIcon style={{width: '80px', height: '80px', position: 'relative', color: '#0d84b7'}} />            
        </div>
    );
}

我的问题:是否可以将 react-vis 仪表图元素添加到我的自定义节点?

结果将是渲染的节点,在我的节点周围有 react-vis 仪表元素。

不知道怎么做...

【问题讨论】:

    标签: javascript reactjs typescript react-native react-vis


    【解决方案1】:

    我认为您可能没有为您的用例使用正确的库。 React-vis 是一个在浏览器上使用 react 进行 html 和 dom 操作的库。听起来您正在为一个 react-native 应用程序拍摄,我建议您使用类似victory-native for (https://github.com/FormidableLabs/victory-native) 的东西。

    【讨论】:

      猜你喜欢
      • 2020-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-19
      • 1970-01-01
      相关资源
      最近更新 更多