nvd3 line chart with string values on x-axis-open source projects novus/nvd3

i’m new to nvd3 charts. i need a line chart, with string-values on the x-axis the chart should be like this Bar Chart, but i need a line, instead of bars

my result looks like this Line Chart The values are all mapped to x=0

my code

nv.addGraph(function() {
    var chart = nv.models.lineChart()
    .x(function(d) { return d.x}) 
    .y(function(d) { return d.y}) 

    chart.xAxis.tickValues(["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]);

    d3.select(element + ' svg')


    return chart;

and my data


i tried a lot, but have no idea what to do.

any help or suggestions would be great

Solution like dcclassics mentioned i took number values instead of strings and then used tickValues and tickFormat:

var days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]

chart.xAxis.tickValues([0, 1, 2, 3, 4, 5, 6])
    return days[d]