Last active
January 5, 2023 05:41
-
-
Save JenniferFuBook/6f78ba4670c593812c86834838842b61 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Plot from 'react-plotly.js'; | |
| const layoutObj = { | |
| title: 'Bar Chart', | |
| width: 800, | |
| height: 600, | |
| }; | |
| const dataArray = [ | |
| { | |
| type: 'bar', | |
| y: [1, 2, 1, 4, 3, 6], | |
| }, | |
| { | |
| type: 'bar', | |
| y: [2, 7, 0, 4, 6, 2], | |
| }, | |
| ]; | |
| function App() { | |
| return <Plot layout={layoutObj} data={dataArray} />; | |
| } | |
| export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment