score:1

Accepted answer

Use Date objects instead of strings in your reportData:

  var reportData = [{
    "key": "ActualElapsedTime",
    "color": "#d62728",
    "values": [{
      "x": new Date("2016-03-21T00:00:00"),
      "y": 100.00
    }, {
      "x": new Date("2016-03-22T00:00:00"),
      "y": 99.00
    }]
  }];

Additionally you can set tickValues based on your data:

var tickValues = reportData[0].values.map(function(p) { return p.x});
chart.xAxis.tickValues(tickValues);

Working example: http://jsfiddle.net/LukaszWiktor/rcL0uot9/

Result:

enter image description here

score:1

Read Time formating of d3js

you are missing parseDate function

var parseDate = d3.time.format("%Y-%m-%dT%H:%M:%S").parse

parseDate functions accept a string and convert strings to Date object.

so your data should look like below.

var reportData = [{
    "key": "ActualElapsedTime",
    "color": "#d62728",
    "values": [{
      "x": parseDate("2016-03-21T00:00:00"),
      "y": 100.00
    }, {
      "x": parseDate("2016-03-22T00:00:00"),
      "y": 99.00
    }]
}];

Related Query