I'm having trouble formatting the values inside the Donut chart, see from the photo that the other models the code I added in javascript made the perfect formatting, but I can not do the same for the Donut chart.
https://imgsafe.org/image/80a57c7d2f
Javascript code:
Code: Select all
function skinDonut() {
this.cfg.shadow = false;
this.cfg.title = '';
this.cfg.seriesColors = ['#3984B8', '#39B8B6', '#7E8DCD', '#F5A213', '#DC6061'];
this.cfg.grid = {
background: '#ffffff',
borderColor: '#ffffff',
gridLineColor: '#dce2e7',
shadow: false
};
this.cfg.axesDefaults = {
rendererOptions: {
textColor: '#757575',
}
};
this.cfg.seriesDefaults = {
renderer: $.jqplot.DonutRenderer,
shadow: false,
lineWidth: 1,
markerOptions: {
shadow: false,
size: 7,
style: 'circle'
}
}
}
//Format value chart PrimeFaces.
$.jqplot.sprintf.thousandsSeparator = '.';
$.jqplot.sprintf.decimalMark = ',';
Code: Select all
private void LegendaGraficoInvestidoEstoque() {
graficoInvestidoEstoque = criarGraficoInvestidoEstoque();
graficoInvestidoEstoque.setExtender("skinDonut");
//graficoInvestidoEstoque.setLegendPosition("w");
}
private DonutChartModel criarGraficoInvestidoEstoque() {
DonutChartModel model = new DonutChartModel();
Double realizado = getDao().valorInvestidoEstoque();
Map<String, Number> circle1 = new LinkedHashMap<String, Number>();
circle1.put("INVESTIDO R$", realizado);
model.addCircle(circle1);
return model;
}