I have been utilizing the NVD3 library along with bootstrap 3.0 for my project. I have two divs with the classes "col-md-6 col-sm-12" positioned side by side. My goal is to showcase charts in both of these divs. To ensure that the charts are displayed correctly, I need to specify height and width options for the angular-nvd3 library. Everything works well on desktop screens, but when I resize the window, the responsiveness gets lost.
Unfortunately, setting the width option in percentage results in the chart not being displayed at all.
// Chart Options
$scope.options = {
chart: {
type: 'multiBarChart',
height: 250,
width: 600,
staggerLabels: false,
transitionDuration: 1000,
tooltips: true,
tooltipContent: function(key, x, y, e, graph) {
return '<p>' + key + ': ' + y + '</p>';
},
stacked: false,
showControls: false,
xAxis: {
showMaxMin: false,
axisLabel: 'MockTests',
axisLabelDistance: -30
},
yAxis: {
axisLabel: 'Marks Comparison',
axisLabelDistance: 40,
ticks: 5,
tickFormat: function(d) {
return d3.format(',.f')(d);
}
}
}
};
Any assistance would be greatly appreciated.