title: Morris Line Chart - X axis showing time (HH:MM) instead of date when there are only 1-6 days
body: <p>Good day!</p>
  
  <p>I've been using Morris Line Chart on creating my line graph and I'm currently experiencing some issues on the X-axis which is the date. I've already read and checked the net for any solutions on which I have failed.</p>
  
  <p>In my graph-page, I have a time variable (start_date) on which they are converted to milliseconds using</p>
  
  <p><code>var temp_time_i = new Date($scope.start_date *1000);</code></p>
  
  <p>Now from this variable, to get the Year, Month and Day and convert them to string, I used</p>
  
  <pre><code>var month = ('0' + (temp_time_c.getMonth()+ 1)).slice(-2);
  var day = ('0' + temp_time_c.getDate()).slice(-2);
  var year = temp_time_c.getFullYear();
  </code></pre>
  
  <p>I then push them in my data array</p>
  
  <pre><code>issued.push({ Date: year+"-"+month+"-"+day, Value: response.issued_numbers[a]});
  </code></pre>
  
  <p>note: please ignore the variable a because this  function is inside a for loop. </p>
  
  <p>As you can see, the "Date:" is formatted to year-month-day.However, when I call the chart and the number of days is less than 7, it displays on HH:MM format. You can view the image <a href="http://i.imgur.com/rPu8u8P.png" rel="nofollow">here</a>. But when there are more than 7 days on my "Date" variable, it shows the date shown <a href="http://i.imgur.com/EWbFFBo.png" rel="nofollow">here</a>. (Both are imgur files because I am not yet able to upload my own images.</p>
  
  <p>Any help or direct me to a reading is much appreciated. </p>