0

So, I'm trying to make a bar chart that goes with this dataset that has nested hard brackets. It looks something like this:

dataset=[[5,13,23],[3,12,54],[34,23,43]];

I want d[1] or numbers 13, 12, and 23 to be the width of the bars. The problem is the bars end up overlapping themselves in a section or their spacing between them change. Any suggestion?

user2843235
  • 117
  • 1
  • 1
  • 8
  • Look up examples for stacked bar charts, and use the stacking approach to figure out the horizontal position of the bars based on the width you want each one to have (plus optional padding). [This question is similar](http://stackoverflow.com/questions/21610828/d3-js-how-can-i-generate-a-variable-width-stacked-chart); check out the example linked to in the answer. – AmeliaBR Feb 15 '14 at 00:10
  • Okay, I can see how the html is sectioned. But as a beginner, I'm having a hard time what I can do to make it work. But I know I don't need to worry about xtick. – user2843235 Feb 15 '14 at 03:33
  • Take a look at [**this**](http://bl.ocks.org/mbostock/3886208) – Unknown User Feb 15 '14 at 12:58

0 Answers0