How to set y axis (yDomain) value to max in D3 Js
问题 In My D3 chart, How to set yDomain to the max value. Any suggestions ? If we see on nov 10 my line and area is going out of the box. My Code sandbox here I am calculating the two domains separately for yDomainMagnitude and yDomainStartupMagnitude, but now how to consolidate or take the union of both and assign to yDomain. var yDomainMagnitude = d3.extent(data, function(d) { return d.magnitude; }); var yDomainStartupMagnitude = d3.extent(data, function(d) { return d.startupMagnitude; }); var