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");
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.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
please try;
For location of legends, please change the value of parameter;
pieModelPorcentual.setLegendPosition("w"); // "e" etc.
Code: Select all
<style type="text/css">
table.jqplot-table-legend {
font-size: 18px;
}
</style>
pieModelPorcentual.setLegendPosition("w"); // "e" etc.
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 10 guests