replace the static integer assigned to x to an anonymous function. Use the index value i. Multiply it by the width of each bar plus a margin.
function(d, i){
return ADD_THING_TO_RETURN_HERE
}
Change the above formula to use the length of the dataset array.
Try with 24 array values.
Try with 5 array values.
Create variable for barPadding.
.attr("width", w / dataset.length - barPadding)

