title: Applying an array to Morris.js charts
body: <p>I have an array of data generated from a php db call:</p>
  
  <pre><code>boxData[0] = "period : 2012 W1";
  boxData[1] = "1:33"; 
  boxData[2] = "2:36"; 
  boxData[3] = "3:23"; 
  boxData[4] = "4:37";
  </code></pre>
  
  <p>I want to apply this to the data key of a morris bar chart by a parameter. If I hard-code it, it works... but i want to just slip the area data into the data field, as I have doens with the ykey and label fields, where I have slipped in arrays no problems.</p>
  
  <p>Hardcoded..</p>
  
  <pre><code>Morris.Bar({
    element : 'morris-bar-chart',
    data : [{
      period : "2012 W1",
      1: 33, 
      2: 34,
      3: 35,
      4: 32
    }],
    xkey : 'period',
    ykeys : boxKey,
    labels : boxLabels,
    hideHover : 'auto',
    resize : true
  });
  </code></pre>
  
  <p>What I want...</p>
  
  <pre><code>Morris.Bar({
    element : 'morris-bar-chart',
    data : boxData,
    xkey : 'period',
    ykeys : boxKey,
    labels : boxLabels,
    hideHover : 'auto',
    resize : true
  });
  </code></pre>
  
  <p>I see that data should be an array of objects so how do I get boxData to be that? </p>