How to change font size in p:chart bar jqplot-xaxis-tick? I use Primefaces 5.2 and overwrite style class not working.
Asked
Active
Viewed 964 times
1 Answers
3
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
}
};
}

Melloware
- 10,435
- 2
- 32
- 62
-
Thanks for answer. Where paste Javascript code? In external file? How to include to managedbean? – 4Money Dec 10 '18 at 11:25
-
Javascript goes in your XHTML page where you p:chart is being used. – Melloware Mar 09 '19 at 12:34