Say I have the following:
dataList = {{"One", 1}, {"Two", 2}};
PieChart[
#[[2]] & /@ dataList,
ChartLabels -> #[[1]] & /@ dataList,
PlotLabel -> "Test plot"
]
But while the pie chart is displayed with the correct distribution, the chart labels are not displayed. This is because the output of
#[[2]] & /@ dataList
is
{One, Two}
not
{"One", "Two"}
I have also tried the following:
ChartLabels -> ToString[#[[1]]] & /@ dataList
but the outcome is the same as before.
Thanks in advance for your help.