Take the 2-minute tour ×

I am viewing the following svg http://pastebin.com/pNdNEQ6z in my Firefox and chome.

Can someone tell me why the two graphs are somewhere in der middle of y an not starting at the top? If you change the viewbox to "0 200 650 800" everything is fine. why 200? I have played with preserveAspectRatio="xMidYMin" but this is not doing anything.

At the end of the day I want to display both charts completely visible starting at the top? And I would like to understand why it is not doing so right now :-)

share|improve this question
sorry, I really have tried a lot but I could not see the typo ... shame on me ... –  KIC Sep 1 '13 at 15:56

1 Answer 1

up vote 0 down vote accepted

Your problem is that you had a typo on your first embedded <svg> element (you had hight="400" instead of height="400") and were not using a …YMin alignment on the outer.

Fixed, it looks like this:

<svg … preserveAspectRatio="xMidYMin">
  <svg … height="400">

Demo: http://jsfiddle.net/WAVZj/

share|improve this answer
omg what a shame ... sorry, I really have tried a lot but I could not see the typo. –  KIC Sep 1 '13 at 15:52

Your Answer


