Black Lives Matter. Please consider donating to Black Girls Code today.

Trouble plotting CSV data from local machine

I’m attempting to plot some OCHL data from a CSV in the same directory as my JavaScript file. I am following the example:

While I have gotten it to work with the example data, using my own has caused the plotly widget to not render any bar data:

This is what my JavaScript code looks like:

 function(err, rows){
function unpack(rows, key) {
  return { 
    return row[key]; 

var x_time = [];
for (var i = 0; i < rows.length; i++) {
  row = rows[i];
  x_time.push( row['Local Time'] );
var trace = {
  x: unpack(rows, 'Local Time'),
  close: unpack(rows, 'Close'), 
  high: unpack(rows, 'High'),  
  low: unpack(rows, 'Low'), 
  open: unpack(rows, 'Open'),

  // cutomise colors 
  increasing: {line: {color: 'black'}},
  decreasing: {line: {color: 'red'}},
  type: 'ohlc', 
  xaxis: 'x', 
  yaxis: 'y'

var data = [trace];
var layout = {
  dragmode: 'zoom', 
  showlegend: false, 
  xaxis: {
    autorange: true, 
    title: 'Date'
  yaxis: {
    autorange: true, 

Plotly.plot('myDiv', data, layout); 

And this is a sample of my CSV file.

Can someone help me debug this problem?