JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<div id="graph1"></div>
JavaScript
const x = [0, 1, 2, 3, 4, 5];
const y = [3000, 2000, 5000, 2000, 1514, 5900];
Plotly.plot(
document.getElementById('graph1'),
[
{
x: x,
y: y,
type: 'bar',
text: y,
textposition: 'outside'
}
],
{
}, { staticPlot: true }
);