Displaying decimal places on primefaces pie chart

后端 未结 2 1276
谎友^
谎友^ 2020-12-17 07:05

I would like to check how do I display decimals for primefaces ver 3.3 pie chart label?

Currently, there are two proportions in my chart. Label A and Label B. Label

2条回答
  •  不思量自难忘°
    2020-12-17 07:16

    Define an extender function like:

    function ext() {
        this.cfg.seriesDefaults.rendererOptions.dataLabelFormatString = '%#.4f';
        this.cfg.seriesDefaults.rendererOptions.dataLabelThreshold = 0;
    }
    

    in my case '%.4s%%' (PF 4.0) is not working so instead of I used'%#.4f' that work fine.

提交回复
热议问题