BarChart Graphic in PrimeFaces are not Displayed JSF 2.2

霸气de小男生 提交于 2019-12-04 20:47:11

Try to change the xmlns and put inside div a primefaces panel. I think this is a bug.

For instance, try this. It's work to me.

<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
       xmlns:f="http://java.sun.com/jsf/core"
      >
    <h:head>
    </h:head>
    <h:body>
<div>
   <p:panel>
                  <p:barChart id="basic" value="#{dashBoardBean.categoryModel}" legendPosition="ne" 
                                        title="FormularioUsuario" min="0" max="200" style="height:300px"/>
                                        </p:panel>
</div>                                        
    </h:body>
    </html>

I am writing in this topic because many of you will came here to find your solution about rendering Primefaces Charts. So:

-BEFORE starting implementing any suggestions

*** make an inspection first (if you are using Chrome for example - right click -> inspect -> console), so to be sure that the problem comes from the scope you are searching.

  • Many times the problem that many elements not rendering or jsf not working properly is that something before render generates a problem - maybe a false call of a command. With inspection you will have a better view.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!