Layout Ultima - pie chart show datalabels - change fontsize and location of leyends

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
yian.manjarres
Posts: 10
Joined: 21 Nov 2016, 04:32

21 Aug 2017, 13:30

Hi everybody, please help me, i can't show data labels using pie chart, Increase the text size of the legend and change the location of the legend below the graph.

Page:
<p:chart type="pie" model="#{beanReportesEstadisticosRecaudo.pieModelPorcentualRecaudoValores}" responsive="true" />

Javascript on jsf page :

function skinPie() {
this.cfg.shadow = false;
this.cfg.title = '';
this.cfg.seriesColors = ['#5cceae','#3db3c5'];

this.cfg.grid = {
background: '#ffffff',
borderColor: '#ffffff',
gridLineColor: '#F5F5F5',
shadow: false
};
this.cfg.axesDefaults = {
rendererOptions: {
textColor: '#666F77',
}
};
this.cfg.seriesDefaults = {
renderer: $.jqplot.PieRenderer,
shadow: false,
lineWidth: 1,
markerOptions: {
shadow: false,
size: 14,
style: 'circle'
}
}
}

Java code:

pieModelPorcentualRecaudoValores.setTitle("Custom Pie");
pieModelPorcentual.setLegendPosition("w");
pieModelPorcentual.setFill(true);
pieModelPorcentual.setShowDataLabels(true);
pieModelPorcentual.setDiameter(300);
pieModelPorcentual.setExtender("skinPie");

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

13 Sep 2017, 09:42

please try;

Code: Select all

<style type="text/css">
table.jqplot-table-legend {
   font-size: 18px;
}
</style>
For location of legends, please change the value of parameter;
pieModelPorcentual.setLegendPosition("w"); // "e" etc.

Post Reply

Return to “Ultima - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests