Skip to content Skip to sidebar Skip to footer

How Can I Specify A Domain X-axis In Nvd3 Linechart

I am trying to define a lineChart in nvd3 with a domain scale on the x-axis. I can't get it to work. The first issue is that the voronoi code blows up. But even if I turn vorono

Solution 1:

I think the problem lies in these lines in the models.scatter definition:

  if ( isNaN(x.domain()[0])) {
      x.domain([-1,1]);
  }

  if ( isNaN(y.domain()[0])) {
      y.domain([-1,1]);
  }

Obviously this will disallow any ordinal scales for the x or y scales in this type of chart (which underlies the line chart and most of the other non-bar charts it seems).

Post a Comment for "How Can I Specify A Domain X-axis In Nvd3 Linechart"