2

I would like to generate a stacked bar chart (similar to http://bl.ocks.org/mbostock/1134768) where the total height of each bar is the same and the width varies. This kind of chart is also known as Marimekko chart.

So far my attempts to make the width vary based on a value in the csv file have failed. Any suggestions would be appreciated.

VividD
  • 10,456
  • 6
  • 64
  • 111
PatriciaW
  • 893
  • 1
  • 12
  • 30
  • Expression "where the total height of each bar is the same and the width varies" is not good, since it can be interpreted in different ways. OK, you are most likely new to the site, so its understandable that you make mistakes in asking, but I recommend practicing asking good question. – VividD Feb 06 '14 at 18:33
  • To add to @VividD's comment: do you want really want the height of each bar (individual rectangle) to be the same? Or do you mean that the height of each *stack* should be equal, so that the result is a [mosaic plot](http://www.theusrus.de/blog/understanding-mosaic-plots/)? – AmeliaBR Feb 06 '14 at 19:37
  • I am sorry if I was not clear. Basically, I want a bar chart where the TOTAL height of the stacks is the same, but the individual rectangles in the stack are not. I want the width of each stack to be determined by a value in the data. I'm not sure how other to state it. I am trying to create a chart similar to one developed by Andrew Smith during the Crimean war, where the area of each bar was proportional to the total deaths, and each stack was proportional to the percentage of diseases. The mosaic plot that AmeliaBR references is more or less what I want. – PatriciaW Feb 07 '14 at 14:19
  • The Marimekko chart is precisely what I was looking for. Thanks. – PatriciaW Feb 07 '14 at 22:00

1 Answers1

2

The Marimekko chart at http://bl.ocks.org/mbostock/1005090 is what I was looking for.

PatriciaW
  • 893
  • 1
  • 12
  • 30
  • Good example. It's a very useful chart layout, with the width, height, and area of the rectangles giving different information, but it's not well used and there doesn't seem to be a standard name for it. I'd never heard "Marimekko" before. But either way, it's not *too* much more complicated than a stacked bar chart -- you just have to use the stacking calculations for both horizontal and vertical axes,with the horizontal stack based on totals per group and the vertical stack being based on proportions per category. – AmeliaBR Feb 09 '14 at 19:55