Reputation: 793
Is it possible to rotate Pie Chart of Primefaces?
Normal Pie chart generated with primefaces looks like this:
What if I want rotate the pie chart and make the start angle start from top of the pie like this?
Sorry for the link because I'm not able to insert image...
Thanks in advance.
Upvotes: 0
Views: 632
Reputation: 1410
Yes.
Add the attribute extender="ext1"
to your <p:pieChart/>
and add the following in your script file:
function ext1() {
this.cfg.seriesDefaults = {
renderer : $.jqplot.PieRenderer,
rendererOptions : {
// rotate the starting position of the pie around to 12 o'clock.
startAngle : -90
}
};
};
Primefaces Charts are generated with jqPlot. For more about it's functions and customization, check the website http://www.jqplot.com/index.php
Upvotes: 1