Accepted answer

You can provide specific tick values to be displayed on a d3 chart.

Firstly, correct your date parser:

var parseDate = d3.time.format("%e-%b-%y %H:%M").parse;  // %e instead of %d

First, you need to get the list of tick values you want to display. After you've loaded the csv and processed it, extract the tick values and assign them to your xAxis:

d3.csv("data.csv", function(error, data) {
    data.forEach(function(d) { = parseDate(;
        d.close = +d.close;
    var tickValues = { return; });


Do not forget to remove the ticks on your current xAxis definition.

Related Query

More Query from same tag