Last active
January 6, 2023 06:05
-
-
Save JenniferFuBook/7e957fef761fec694a75fe76940b0e65 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: 'Scatter Chart', | |
width: 800, | |
height: 600, | |
}; | |
const dataArray = [ | |
{ | |
type: 'scatter', | |
y: [1, 2, 1, 4, 3, 6], | |
mode: 'lines', | |
}, | |
{ | |
type: 'scatter', | |
y: [2, 7, 0, 4, 6, 2], | |
mode: 'markers', | |
}, | |
]; | |
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