in packages/showcase/sankey/energy-sankey.js [21:63]
render() {
const {modeIndex} = this.state;
return (
<div className="centered-and-flexed">
<div className="centered-and-flexed-controls">
<ShowcaseButton
onClick={this.updateModeIndex(false)}
buttonContent={'PREV MODE'}
/>
<div> {MODE[modeIndex]} </div>
<ShowcaseButton
onClick={this.updateModeIndex(true)}
buttonContent={'NEXT MODE'}
/>
</div>
<Sankey
animation
margin={50}
nodes={Energy.nodes}
links={Energy.links}
width={960}
align={MODE[modeIndex]}
height={500}
layout={24}
nodeWidth={15}
nodePadding={10}
style={{
links: {
opacity: 0.3
},
labels: {
fontSize: '8px'
},
rects: {
strokeWidth: 2,
stroke: '#1A3177'
}
}}
/>
</div>
);
}