Customize primefaces chart

前端 未结 1 555
遥遥无期
遥遥无期 2020-11-29 12:04

I using of primefaces\'s chart on my project.

I know be primefaces\'s chart use of jqplot .

on jqplot\'s site exist example of customizing jqplot chart.

相关标签:
1条回答
  • 2020-11-29 12:22

    When you use extender you can change everything by js.

    Here is an example

    <p:lineChart ... extender="chartExtender"/>
    

    And on js file or in the page under Tag:

    function chartExtender() {        
     // this = chart widget instance        
     // this.cfg = options        
     this.cfg.grid = {             
            background: 'transparent',
             gridLineColor: '#303030',
             drawBorder: false,
        };
      }
    

    This is just an example.. This will help you to do the rest.

    For more recent PF versions, check What is the alternative for the chart extender attribute in PrimeFaces 5.2 and newer Hope that helps :)

    0 讨论(0)
提交回复
热议问题