We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to use the background colour as gradient in stacked area chart. Is it possible?
The text was updated successfully, but these errors were encountered:
Found a workaround. Insert a linearGradient element inside svg by using the callback attribute in chart and apply the following css:
.nv-area { fill: url(#grad3) !important; }
chart: { type: 'stackedAreaChart', height: 350, ... ... callback: function (chart) { // Add gradient color to graph. var linearGrad = d3.select("svg").append("linearGradient"); linearGrad.attr('id', 'grad3'); linearGrad.attr("x1", "0%"); linearGrad.attr("x2", "100%"); linearGrad.attr("y1", "0%"); linearGrad.attr("y2", "100%"); linearGrad.html( '<stop offset="0%" style="stop-color:rgb(255,255,0);stop-opacity:1"/>' + '<stop offset="100%" style="stop-color:rgb(255,0,0);stop-opacity:1"/>' ); } }
Sorry, something went wrong.
No branches or pull requests
I want to use the background colour as gradient in stacked area chart. Is it possible?
The text was updated successfully, but these errors were encountered: