Skip to content

rnugraha/react-d3-interactome

Repository files navigation

react-d3-interactome

NPMJavaScript Style Guide

Pre-requisite

Install

yarn add react-d3-interactome

Usage

importReact,{Component}from'react'importInteractomefrom'react-d3-interactome'classExampleextendsComponent{componentDidMount(){constinteractomeColorRange=scaleLinear().domain([0,1]).range([rgb('#eed841'),rgb('#551a8b')])constnewColorScale=scaleLinear().domain([0,1]).range(interactomeColorRange.range())letoptions={data: __options__,el: document.getElementById('containerEl'),colorScale: newColorScale}if(options){InteractomePlot.create(options)}}render(){return(<div><divid='containerEl'/></div>)}}

Check the /example for more details.

Development

Local development is broken into two parts (ideally using two tabs). First, run rollup to watch your src/ module and automatically recompile it into dist/ whenever you make changes.

yarn start # runs rollup with watch flag

The second part will be running the example/ create-react-app that's linked to the local version of your module.

# (in another tab)cd example yarn start # runs create-react-app dev server

License

GPL-3.0-or-later © thehyve

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript98.8%
  • Other1.2%