Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1k
Can I use @stdlib/plot in React application?#1037
Unanswered
romanstetsyk asked this question instdlib-bot Q&A
-
Can I use @stdlib/plot in React application? If so, could you provide a sample component? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment
-
Yes, you can use @stdlib/plot in a React application. The following example shows a React component which renders a rug plot: importReactfrom'react';import{Rug}from'@stdlib/plot/components/svg/rug';classRugPlotextendsReact.Component{constructor(props){super(props);this.state={data:[1,2,3,4]};this.handleChange=this.handleChange.bind(this);}handleChange(){this.setState({data:[5,6,7,8]});}render(){return(<Rugdata={this.state.data}onChange={this.handleChange}/>);}} ReferencesDisclaimer
|
BetaWas this translation helpful?Give feedback.
All reactions
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment