accordionPanel with charts

UI Components for JSF
Post Reply
mhoekstra
Posts: 3
Joined: 15 Feb 2009, 14:24

15 Feb 2009, 14:33

I have a problem mixing the accordionPanel with the stackedColumnChart. The Chart remains visible when hiden the tab. I know the chart is in fact an flash component, so that could be the problem...

Is it at all posible to use the charts within the accordionPanel or Ajax components in general?

here's my example:


<p:accordionPanel speed="slow">
<p:tab title="Bedragen per maand">
some text works greet!!
</p:tab>
<p:tab title="Grafiek per maand">
<p:stackedColumnChart value="#{mutaties}" rendered="#{not empty mutaties}" var="mut"
xfield="#{mut.grootboekRekening.omschrijving}">
<p:chartSeries label="Bedrag" value="#{mut.bedrag}" style="blaauwStyle" rendered="false"/>
</p:stackedColumnChart>
</p:tab>
</p:accordionPanel>


Kind Regards,
Marcel Hoekstra
Java Software Architect at Quintor

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

17 Feb 2009, 23:24

I'm looking into this, we had a similar situation which is fixed with the wmode attribute. That fix may probably handle this case too.

mhoekstra
Posts: 3
Joined: 15 Feb 2009, 14:24

23 Feb 2009, 15:20

I have tried the primefaces 0.8.1, but it still doesn't work.

Could it have to do something with the style. I can see that the height of the tab is calculated when i click on it. After calculation the height is set to 10px wich is to small. When setting the height manually to 400px the Chart remains visible afther hiding the tab.

<div class="bd" id="yuievtautoid-0" style="height: 10px; opacity: 1;">

Kind Regards,
Marcel Hoekstra

mhoekstra
Posts: 3
Joined: 15 Feb 2009, 14:24

23 Feb 2009, 15:29

I've got it working now.

When putting the chart within a panelGrid and adding the new wmode option it works like expected. I don't know if it should work without the panelGrid, but i can live with this sollution.

<h:panelGrid id="panel" columns="1" border="0">
<p:pieChart wmode="transparent" value="#{totaalUitgavenPerCategorie.wrappedData}" var="uitgave" categoryField="#{uitgave.grootboekRekening.omschrijving}"
dataField="#{uitgave.bedrag}" />

</h:panelGrid>

Kind Regards,
Marcel Hoekstra

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests