title: yii highcharts how to set date format in x-axis
body: <p>I have a line graph and I am trying to set date format in x-axis but it display time instead.</p>
  
  <pre><code>$this-&gt;Widget('ext.highcharts.HighchartsWidget', array(
      'options'=&gt;array(
          'type'=&gt;'spline',
          'title' =&gt; array('text' =&gt; 'Project Report'),
          'xAxis' =&gt; array(
              'type'=&gt; 'datetime',
              'dateTimeLabelFormats'=&gt;array( // don't display the dummy year
                  'month'=&gt; '%e %b',
                  'year'=&gt; '%y'
              ),
          ),
          'yAxis' =&gt;array(
              'title' =&gt; array('text' =&gt; 'Percent %'),
              'min'=&gt;0,
              'max'=&gt;100
          ),
          'series' =&gt;$series['series']                
      )
  ));
  </code></pre>
  
  <p>This displays the following picture<img src="https://i.stack.imgur.com/VqyQt.png" alt="enter image description here"></p>
  
  <p>My series array:</p>
  
  <pre><code>$date_from = date("Y, m, d",strtotime($data-&gt;StartDATE) - 2*86400);
          $date_to = date("Y, m, d",strtotime($data-&gt;ProjectEndDate) + 2*86400);
  
  $series['series'][] = array("name"=&gt;$data-&gt;PROJECT,"data"=&gt;array(array($date_from,0),array( date("Y, m, d",strtotime( date('Y-m-d') + + 2*86400) ) ,(int) 30),array( $date_to ,100 ))) ;
  </code></pre>
  
  <p>The output of this array is: <code>Array ( [name] =&gt; Fastnet OffshWest Shetland [data] =&gt; Array ( [0] =&gt; Array ( [0] =&gt; 2013, 06, 09 [1] =&gt; 0 ) [1] =&gt; Array ( [0] =&gt; 2013, 06, 20 [1] =&gt; 30 ) [2] =&gt; Array ( [0] =&gt; 2013, 12, 13 [1] =&gt; 100 ) ) )</code></p>
  
  <p>I have also tried</p>
  
  <pre><code>    $date_from = gmdate('d.m.Y H:i', strtotime($data-&gt;StartDATE) );
              $date_to = gmdate('d.m.Y H:i', strtotime($data-&gt;ProjectEndDate));
  $series['series'][] = array("name"=&gt;$data-&gt;PROJECT,"data"=&gt;array(array($date_from,0),array( gmdate('d.m.Y H:i', strtotime( date('Y-m-d') ) ) ,(int) 30),array( $date_to ,100 ))) ;
  </code></pre>
  
  <p>Does not work either</p>
  
  <p>Here is an example of what I want, however I am missing the enddate information. It is a gant chart. I would also like to include the <code>enddate</code>. Currently shows percentage complete from <code>startdate</code>.  I also want to show how much it should be complete using current date in another color if possible.</p>
  
  <p><img src="https://i.stack.imgur.com/MEfHJ.png" alt="enter image description here"></p>