Mitaksh Gupta
Mitaksh Gupta

Reputation: 1029

set maximum x and y axis range NVD3

I am trying to plot the line graph using NVD3. But the issue I am facing is that the maximum values of x and y axis get adjusted automatically depending on the data provided. But I don't want this default behavior, I want to preset the maximum values for X and Y axis. Is there an option to do so in NVD3?

Tried this domain approach but didn't work

Upvotes: 3

Views: 4744

Answers (1)

shabeer90
shabeer90

Reputation: 5151

You could try chart.forceY([minValue, maxValue]).

NVD3 is built on D3 so if you are to look deep, it's best to look into the D3 Api.

Upvotes: 5

Related Questions