How to change the legend of a Primefaces line chart?

0

I'm looking to change the font size and legend square of a Primefaces chart via JavaScript.

My code:

<script type="text/javascript">
    function alterarGrafico() {
        this.cfg.highlighter = {
            tooltipAxes : 'y'
        };

        this.cfg.axes.yaxis.tickOptions = {
            textColor : '#000000',
            formatString : "%.0f"
        };
        this.cfg.axes.yaxis.labelOptions = {
            textColor : '#000000'
        };

        this.cfg.axes.xaxis.labelOptions = {
            textColor : '#000000'
        };
    }
</script>
    
asked by anonymous 27.09.2018 / 15:44

1 answer

0

I managed, I just added the code:

this.cfg.legend = {               
    how : false,
    show : true,
    border : 'none',
    location : 'n',
    fontSize: '150%',
    renderer : $.jqplot.EnhancedLegendRenderer
} 
    
27.09.2018 / 16:01