title: Change format and data of datetime X-axis in a line chart with d3 Javascript library
body: <p>I have to create a Line chart using D3 and dimple library with JavaScript. The Y-axis represent the measure of a pyranometer (Example: 530) and the X-axis represent the instant of time of this measure (last 24hours). (Example: Tue Dec 31 17:40:00 CET 2013)
  This chart is a dinamic chart. I take the data of a database and I refresh the chart every 5 minut.</p>
  
  <p>I have this problem: There are so many data in the X-axis and i can't watch nothing in the x-axis. This is a picture of my chart:</p>
  
  <p><img src="https://i.stack.imgur.com/OkqGF.png" alt="enter image description here"></p>
  
  <p>I need to reorganize the data of X-axis. I only have to put a tick every 4 hour. The x-axis have to be like this:</p>
  
  <p><img src="https://i.stack.imgur.com/UmS5c.png" alt="enter image description here"></p>
  
  <p>So, I have to change the format of the X-axis and only put a tick every 4 hours of the last 24 hours. Moreover, I have to put the day below.</p>
  
  <p>Do you have any idea of How could I do this?</p>
  
  <p>This is the code of my chart:</p>
  
  <pre><code>var svg = dimple.newSvg("#container", 500, 500);
  var myChart = new dimple.chart(svg, data2);
  var x = myChart.addCategoryAxis("x", "time");
  x.addOrderRule(Date);
  var y1 = myChart.addMeasureAxis("y", "Piranometro");
  var piranometro = myChart.addSeries("Piranom.", dimple.plot.line,[x,y1]);               
  myChart.draw();
  </code></pre>
  
  <p>Thanks in advance</p>