I am trying to get a specific width value set on a nvd3 discrete histogram. I can change the rect elements after the initial rendering, but it looks like the bar width will be indicated in the chart setup.
Here are my current chart settings.
nv.addGraph -> chart = nv.models.discreteBarChart() .x (d) -> return d.label .y (d) -> return d.value .staggerLabels(false).showValues(false) .color(['#56bd78']).tooltips(false) .margin({top: 0, right: 0, bottom: 30, left: 0}) chart.tooltipContent (key, x, y, e, graph) -> return '<h3><span>' + parseFloat(y) + '</span><em>' + key + '</em></h3>' chart.xAxis.tickFormat (d) -> return d3.time.format('%b')(new Date('2013/'+d+'/01')) # chart.xAxis.tickPadding({top: 0, bottom: 0, left: 20, right:30}) d3.select(element).datum(data).transition().duration(500).call(chart) nv.utils.windowResize(chart.update) return chart
I assume that since I cannot find any published questions about this particular problem, it is probably so simple that I miss it. Thanks in advance.
nanno source share