I'm trying to find the prefect solution for what i need, both labels on the pie and labels at the bottom (legend).
i read a lot and i understand that newchartjs can give me the options to add the labels at the chart but not legend. while i succeeded to add legend on chartjs but not the labels.
any chance i can add both?
which one of the plugins is capable to give labels and legend?
var options = {
tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>%",
legendTemplate: '<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li class="legend_label legend_<%=segments[i].label%>"><span style="color:<%=segments[i].fillColor%>"><%=segments[i].label%></span><span style="color:<%=segments[i].fillColor%>"> : </span><span style="color:<%=segments[i].fillColor%>"><%= Math.floor(((segments[i].value/total)*100)+0.5) %>% </span></li><%}%></ul>',
showTooltips: false
};
var ctx = $('#chart_'+index).find('canvas').get(0).getContext('2d');
var myPieChart = new Chart(ctx).Pie(chart_data,options);
var helpers = Chart.helpers;
myPieChart.showTooltip(myPieChart.segments, true);
var legend = myPieChart.generateLegend();
$('#chart_'+index).find('.legend').html(legend);
myPieChart.chart.canvas.parentNode.parentNode.appendChild(legend.firstChild);