Michel Peixoto
Michel Peixoto

Reputation: 3

JSF - SVG doesn't align inside panelGrid

I'm working on a project that was necessary to use SVG to build a chart, cause primefaces doesn't have the specs that I need to use. So, what I did to make that is basically use that tag $ xmlns:xlink="http://www.w3.org/1999/xlink"

and that code:

<h:panelGrid columns="3" >
                <h:panelGroup layout="block">

                    <svg version="1.2" xmlns="http://www.w3.org/2000/svg" 
class="graph" aria-labelledby="title" role="img"> 

                    </svg>
                </h:panelGroup>

                <h:panelGrid style="width: 100px; ">

                </h:panelGrid>

                <h:panelGroup  id="graficoTeste">

                    <svg version="1.2" xmlns="http://www.w3.org/2000/svg" 
class="graph" aria-labelledby="title" role="img"> 

                    </svg>
                </h:panelGroup>
</h:panelGrid>

The svg works fine. The problem is that when i put the svg inside the panelGroup, my panelGrid stop to align my content side by side and put everything like if it was columns="1".

Anybody has an idea?

Upvotes: 0

Views: 92

Answers (1)

Michel Peixoto
Michel Peixoto

Reputation: 3

I found what's going on. If you are having the same issue, try to delete this "xmlns="http://www.w3.org/2000/svg" for the properties of the svg tag.

Upvotes: 0

Related Questions