title: How to list dates (day-by-day) on xAxis using HighCharts
body: <p>I'm trying to display dates (i.e., by day) along the xAxis using HighCharts. I'm using the <a href="https://github.com/michelson/lazy_high_charts" rel="nofollow noreferrer">Lazy High Charts</a> gem w/ Rails to do so. For the HighCharts 'data' argument, I'm passing in a nested array with [[date, revenue], [date, revenue], [date, revenue]...etc].</p>
  
  <p>The yAxis with the revenue is working correctly, but the corresponding date in the xAxis is not.</p>
  
  <p>Here's the controllers code :</p>
  
  <pre><code>def graph_orders
  
          sales_and_date_array = []
  
          Order.revenue_to_array(sales_and_date_array)
  
          puts sales_and_date_array.inspect
  
          # http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/series/data-array-of-arrays-datetime/
  
          @chart = LazyHighCharts::HighChart.new('graph') do |f|
            f.title(:text =&gt; "Lono Sales")
            f.xAxis(
              type: 'datetime'
             )
  
            f.series(:name =&gt; "Lono Sales Revenue", :yAxis =&gt; 0, :data =&gt; sales_and_date_array)
  
            f.yAxis [
              {:title =&gt; {:text =&gt; "Revenue", :margin =&gt; 70} },
              {:title =&gt; {:text =&gt; "Revenue"}, :opposite =&gt; true},
            ]
  
            f.legend(:align =&gt; 'right', :verticalAlign =&gt; 'top', :y =&gt; 75, :x =&gt; -50, :layout =&gt; 'vertical',)
            f.chart({:defaultSeriesType=&gt;"line"})
          end
  
      end
  </code></pre>
  
  <p>Here's what inpsecting 'sales_and_date_array' looks like:</p>
  
  <pre><code>[["2014-06-12", 208.28], ["2014-06-11", 416.56], ["2014-06-11", 624.84], ["2014-06-11", 833.12], ["2014-06-10", 1041.4], ["2014-06-09", 1249.68], ["2014-06-08", 1457.96], ["2014-06-08", 1666.24], ["2014-06-07", 1874.52], ["2014-06-07", 2082.8], ["2014-06-07", 2291.08],....etc
  </code></pre>
  
  <p>Here's what the graph output currently looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/NnADH.png" alt="enter image description here"></p>
  
  <p>Any thoughts?</p>