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
}
| var dataset = [ | |
| "No", "one", "can", "tell", "me,", | |
| "Nobody", "knows,", | |
| "Where", "the", "wind", "comes", "from,", | |
| "Where", "the", "wind", "goes."]; | |
| var width = 900; | |
| var height = 900; | |
| var margin = 100; |
callback function, delay in milliseconds