title: How to set category type with Highcharts and chartkick?
body: <p>Use Gem: <a href="https://github.com/ankane/chartkick" rel="nofollow noreferrer">https://github.com/ankane/chartkick</a> created charts</p>
  
  <p>the erb code:</p>
  
  <pre><code>&lt;%= line_chart [
     {name: "线上消费会员", data: @product_users_days_line_chart},
     {name: "线下消费会员", data: @pay_users_days_line_chart},
     {name: "会员数", data: @users_days_line_chart}] %&gt;
  </code></pre>
  
  <p>The generate javascript code: </p>
  
  <pre><code>new Chartkick.LineChart("chart-1", [{
   "name": "线上消费会员",
   "data": [
    ["10-21", 6],
    ["10-23", 1]
   ]
  }, {
   "name": "线下消费会员",
   "data": [
    ["09-27", 419],
    ["09-28", 534],
    ["09-29", 562],
    ["09-30", 750],
    ["10-01", 770],
    ["10-02", 631],
    ["10-03", 625],
    ["10-04", 600],
    ["10-05", 665],
    ["10-06", 977],
    ["10-07", 923],
    ["10-08", 384],
    ["10-09", 495],
    ["10-10", 486],
    ["10-11", 465],
    ["10-12", 678],
    ["10-13", 1304],
    ["10-14", 1222],
    ["10-15", 387],
    ["10-16", 457],
    ["10-17", 504],
    ["10-18", 432],
    ["10-19", 657],
    ["10-20", 1215],
    ["10-21", 1260],
    ["10-22", 15],
    ["10-23", 2]
   ]
  }, {
   "name": "会员数",
   "data": [
    ["09-27", 232],
    ["09-28", 454],
    ["09-29", 520],
    ["09-30", 679],
    ["10-01", 1097],
    ["10-02", 860],
    ["10-03", 886],
    ["10-04", 811],
    ["10-05", 903],
    ["10-06", 1307],
    ["10-07", 1053],
    ["10-08", 305],
    ["10-09", 358],
    ["10-10", 433],
    ["10-11", 361],
    ["10-12", 537],
    ["10-13", 1272],
    ["10-14", 1026],
    ["10-15", 310],
    ["10-16", 328],
    ["10-17", 412],
    ["10-18", 342],
    ["10-19", 500],
    ["10-20", 1191],
    ["10-21", 1031],
    ["10-22", 12]
   ]
  }], {});
  </code></pre>
  
  <p>some error like this</p>
  
  <p><a href="https://i.stack.imgur.com/t4oen.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t4oen.png" alt="enter image description here"></a></p>
  
  <p>but the chart xAxis not sort with datetime order </p>
  
  <p>I think the default xAxis type is datetime, but I format with ruby code <code>d.cal_at.strftime("%m-%d")</code>, the type is string,
  so, i read Highcharts docs, need set  Highcharts xAxis type to <code>category</code></p>
  
  <p>this <code>线上消费会员</code> line chart xAxis error, data example:</p>
  
  <pre><code> {
       "name": "线上消费会员",
       "data": [
        ["10-21", 6],
        ["10-23", 1]
       ]
      }
  </code></pre>