I wrote codes to plot stacked bar chart using NVD3. Everything looks perfect untill we resize the window. URL - https://jsfiddle.net/sujit77/45zg0yoe/2/
The issue is that the x-axis label moves up and merges along with axis ticks.
nv.addGraph(function() {
var chart = nv.models.multiBarChart()
.margin({top: 20, right: 20, bottom: 90, left: 50})
.stacked(true)
.reduceXTicks(false)
// .staggerLabels(true)
.color(d3.scale.category20().range())
.x(function(d){ return d.key })
.rotateLabels(-45)
.y(function(d){ return d.value })
chart.xAxis
.axisLabel('This is X Axix')
//.axisLabelDistance(80)
chart.yAxis
.axisLabel('This is Y Axix')
.axisLabelDistance(40)
.tickFormat(d3.format(",f"));
d3.select('#chart').append('svg')
.attr('width', 500)
.attr('height', 500)
.datum(chartData)
.call(chart)
d3.select(".nv-axislabel").attr("y", 76)
console.log(d3.select(".nv-axislabel").attr("y"))
nv.utils.windowResize(chart.update);
return chart;
});