Open ShadSterling opened 9 years ago
That's kind of a neat concept, though I think it should probably be more of a CSS thing than anything else... i.e. set the background of the svg's containing div and make sure the svg plays nice with that. Feel free to submit a pull request for us to review with a concept for this :)
For the time being I'm too busy to figure out how to add it myself, unless you can point me to exactly where in the code to paste in my workaround from http://stackoverflow.com/a/29807357/776723 . If you have a working example using CSS, please post an answer to the same SO question.
I was able to get this working for line charts in 1.8.1 by using this selector: .nvd3.nv-lineChart g rect and setting an !important on the opacity
unfortunately, none of the other charts have a rectangle for the background
It may also break in the next release as the rect has been wrapped in a g with a class of nv-background
It would be helpful to be able to set a background behind a chart area.
In this SE question, I describe a case where it's useful, and my workaround to impose one: http://stackoverflow.com/questions/29659507/nvd3-set-background-fill-behind-line-chart