Skip to content

Instantly share code, notes, and snippets.

@JenniferFuBook
Last active January 5, 2023 05:41
Show Gist options
  • Select an option

  • Save JenniferFuBook/6f78ba4670c593812c86834838842b61 to your computer and use it in GitHub Desktop.

Select an option

Save JenniferFuBook/6f78ba4670c593812c86834838842b61 to your computer and use it in GitHub Desktop.
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