I am trying to get a specific width value set on a nvd3 discrete bar chart. I can change the rect elements after the initial render, but it seems like there would be some way to designate a bar width in the set-up of the chart.
Here is 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 am assuming since I can't find any posted questions about this particular issue, it is probably so simple I am missing it. Thanks in advance.