Navaneeth
Navaneeth

Reputation: 2584

SVG is rendering differently in Firefox


I am working on SVG to render a chart. click here to view my SVG chart

When we view this chart in Google chrome or Internet Explorer we are getting two groups as expected. but when we render this on Mozilla Firefox, only the first group is getting rendered.
I am unable to trace this out. Pleas help me
Thanks :)

Upvotes: 2

Views: 1963

Answers (1)

Boris Zbarsky
Boris Zbarsky

Reputation: 35054

Your problem is setting no useful width and height on the <svg> and also no viewbox. The result is that it ends up 150px tall by 300px wide (the default replaced elements size in CSS) and clips off everything outside that. At least that's what happens in browsers that are actually following the SVG spec here, which IE and Chrome are not.

Upvotes: 4

Related Questions