I am using the NVD3 lineChart model.
I need to force the min and max y values to be relative to the actual ones, for example:
chart.lines.forceY ([min / 1.1, not more than 1.1 *]);
How to get current min / max y-axis values?
You can get the current domain through chart.yAxis.scale().domain().
chart.yAxis.scale().domain()
If you have already set the y axis domain as follows:
var yAxis = d3.svg.axis().scale(y) .orient("left").ticks(5); y.domain([0, d3.max(yourData)]);
You can access the values through y. y[0]- minimum y[1]- max.
y
y[0]
y[1]