title: .csv-file in Highstocks
body: <p>I don't understand why this data doesn't plot in Highstocks:</p>
  
  <p>foo.csv:</p>
  
  <blockquote>
    <p>1391380000000,58.15,58.48,56.08,56.15,2929300
    1391470000000,56.32,57.88,56.09,57.81,2911900
    1391550000000,57.58,57.70,56.96,57.43,2283900
    1391640000000,57.51,58.35,57.46,58.29,1609500
    1391730000000,58.46,59.47,58.13,59.42,1966800
    1391990000000,59.27,59.44,58.29,59.01,1760500
    1392070000000,59.00,60.00,58.88,59.73,2135800
    1392160000000,60.00,60.46,59.67,59.89,2346800
    1392250000000,59.45,60.38,59.37,60.08,3092700
    1392330000000,57.15,57.77,54.87,55.25,17844700
    1392680000000,55.38,56.04,54.96,55.15,6553300
    1392760000000,55.01,56.65,54.90,55.94,4838800
    1392850000000,56.14,57.54,56.05,57.29,4629100
    1392940000000,57.25,57.40,56.32,56.34,2407200
    1393200000000,56.45,56.98,56.40,56.75,2392800
    1393280000000,56.80,57.57,56.75,56.89,3375100
    1393370000000,56.98,57.62,56.75,57.10,2400900</p>
  </blockquote>
  
  <p>My code:`<br>
         
         
         </p>
  
  <pre><code>  $.get('foo.csv', function(data) {
  
          // Split the lines
       var lines = data.split('\n');
  
  // Iterate over the lines
       $.each(lines, function(lineNo, line) {
         var items = line.split(',');
       });
  
  // create the chart
  // split the data set into ohlc and volume
  var ohlc = [],
    volume = [],
    dataLength = data.length;
  
  for (i = 0; i &lt; dataLength; i++) {
    ohlc.push([
      data[i][0], // the date
      data[i][1], // open
      data[i][2], // high
      data[i][3], // low
      data[i][4] // close
    ]);
  
    volume.push([
      data[i][0], // the date
      data[i][5] // the volume
    ])
  }
  
  // set the allowed units for data grouping
  var groupingUnits = [[
    'week',                         // unit name
    [1]                             // allowed multiples
  ], [
    'month',
    [1, 2, 3, 4, 6]
  ]];
  
  
  // create the chart
  $('#container').highcharts('StockChart', {
  
      rangeSelector: {
      inputEnabled: $('#container').width() &gt; 480,
          selected: 1
      },
  
      title: {
          text: 'Historical data'
      },
  
      xAxis: {
        ordinal: false
      },
  
      yAxis: [{
          labels: {
          align: 'right',
          x: -3
        },
          title: {
              text: 'OHLC'
          },
          height: '60%',
          lineWidth: 2
      }, {
        labels: {
          align: 'right',
          x: -3
        },
          title: {
              text: 'Volume'
          },
          top: '65%',
          height: '35%',
          offset: 0,
          lineWidth: 2
      }],
  
      series: [{
          type: 'candlestick',
          name: 'Stock',
          data: ohlc,
          dataGrouping: {
        units: groupingUnits
          }
      }, {
          type: 'column',
          name: 'Volume',
          data: volume,
          yAxis: 1,
          dataGrouping: {
        units: groupingUnits
          }
      }]
   });
  });
  </code></pre>
  
  <p>`
  All I get is a blank chart beginning at 1970-01-01. I've read this <a href="https://stackoverflow.com/questions/16934844/highstock-with-data-csv-starts-with-01-01-1970">thread</a>, but it doesn't really help me since they haven't really converted their dates to timestamps. Is there anything wrong with the format of the .csv-file? I don't get any errors in the console of the web browser.</p>
  
  <p>EDIT:</p>
  
  <p>In fact there were several issues with my code. This code now works:</p>
  
  <pre><code>var data = "1393280000000,56.80,57.57,56.75,56.89,3375100\n1393370000000,56.98,57.62,56.75,57.10,2400900"; 
  var lines = data.split('\n');
  
  var ohlc = []; var volume = [];
  
  for(var i = 0; i &lt; lines.length; i++){
  
  var items = lines[i].split(',');
  
  ohlc.push([parseFloat(items[0]),
      parseFloat(items[1]),
      parseFloat(items[2]),
      parseFloat(items[3]),
      parseFloat(items[4])
  ]);
  
  volume.push([parseFloat(items[0]),
      parseFloat(items[5])
  ]);
  
  
  // set the allowed units for data grouping
  var groupingUnits = [[
    'week',                         // unit name
    [1]                             // allowed multiples
  ], [
    'month',
    [1, 2, 3, 4, 6]
  ]];
  
         // create the chart
  $('#container').highcharts('StockChart', {
  
  
      rangeSelector: {
      inputEnabled: $('#container').width() &gt; 480,
          selected: 1
      },
  
      title: {
          text: 'Historical data'
      },
  
      yAxis: [{
          labels: {
          align: 'right',
          x: -3
        },
          title: {
              text: 'OHLC'
          },
          height: '60%',
          lineWidth: 2
      }, {
        labels: {
          align: 'right',
          x: -3
        },
          title: {
              text: 'Volume'
          },
          top: '65%',
          height: '35%',
          offset: 0,
          lineWidth: 2
      }],
  
      series: [{
          type: 'candlestick',
          name: 'Stock',
          data: ohlc,
          dataGrouping: {
        units: groupingUnits
          }
      }, {
          type: 'column',
          name: 'Volume',
          data: volume,
          yAxis: 1,
          dataGrouping: {
        units: groupingUnits
          }
      }]
  });
  }
  </code></pre>