title: D3 show linear color range in rect
body: <p>This may be a silly question but I can't seem to figure it out - is there a way in D3 to fill a rectangle based on a linear color scale? That is, I have a linear scale from white to green so I want to display a "legend" which is basically a rectangle with color transitioning from white to green. Is there a simple way to do this?</p>