Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change font size in Primefaces 5.2 <p:chart jqplot-xaxis-tick

How to change font size in p:chart bar jqplot-xaxis-tick? I use Primefaces 5.2 and overwrite style class not working.

enter image description here

like image 214
4Money Avatar asked Dec 22 '25 08:12

4Money


1 Answers

According to JQPlot you can change the Font Size and Font Family: http://www.jqplot.com/examples/rotated-tick-labels.php

So in PF you can use the Chart Extender feature and do this...

JAVA:

final LineChartModel model = new LineChartModel();
model.setExtender("chartExtender");

JAVASCRIPT:

function chartExtender() {
    this.cfg.axesDefaults = {
    tickOptions: {
      fontFamily: 'Georgia',
      fontSize: '10pt',
      angle: -30
    }
   };
}
like image 59
Melloware Avatar answered Dec 24 '25 10:12

Melloware



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!