I'm working with amCharts and trying to create a Pie Chart where the legend displays the total before the nom_prenom. Currently, it's displaying nom_prenom: percentage.
I've tried modifying the legend settings, but I couldn't achieve the desired format. Here's the relevant part of my code:
chart.data = filteredData;
// chart.legend = new am4charts.Legend();
// // chart.legend.position = "right";
// // // chart.legend.maxHeight = 150;
// chart.legend.scrollable = true;
/* Create legend */
chart.legend = new am4charts.Legend();
/* Create a separate container to put legend in */
var legendContainer = am4core.create(legenddiv, am4core.Container);
legendContainer.width = am4core.percent(100);
legendContainer.height = am4core.percent(100);
chart.legend.parent = legendContainer;
chart.events.on("datavalidated", resizeLegend);
chart.events.on("maxsizechanged", resizeLegend);