JSFiddle - React, Tailwind, and code Playground

HTML

<head>
  <!-- Plotly.js -->
  <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>

<body>
  
  <div id="myDiv"><!-- Plotly chart will be drawn inside this DIV --></div>
  <script>
    <!-- JAVASCRIPT CODE GOES HERE -->
  </script>
</body>

JavaScript

var trace1 = {
  x: ['giraffes'],
  y: [20],
  name: 'SF Zoo',
  type: 'bar'
};
var trace2 = {
  x: ['giraffes'],
  y: [12],
  name: 'LA Zoo',
  type: 'bar'
};
var trace3 = {
  x: ['giraffes'],
  y: [13],
  name: 'T3',
  type: 'bar'
};


var data = [trace1, trace2,trace3];
//Create average line in shape
var layout = {

	barmode: 'stack'
};
Plotly.newPlot('myDiv', data, layout, {showSendToCloud:true});