Dc.js yAxis ticks line chart

I am creating a line chart with dc.js. The line chart can display successfully, but the y-axis overlaps. I want to decrease the number of ticks along the y-axis value with yAxis().ticks()

but failed. Can anyone help me with this issue? Many thanks.

var DateD = ndx.dimension(function(d){return d.parsedDate});
var DateGroup = DateD.group().reduceCount();

var DatelineCharts = dc.lineChart("#chart-line")
    .width(1000).height(100)
    .dimension(DateD)
    .group(DateGroup)
    .x(d3.time.scale().domain([minDate,maxDate]))
    .elasticX(true)
    .elasticY(true)
    .xAxis().ticks(15);

    DatelineCharts.yAxis().ticks(15);

      

+3


source to share





All Articles