Setting TPie number digits percentage

Dear root support,
I made a TPie histogram. I managed to manipulate the number of digits when plotting the values. When I want to plot the percetages, it seems what I set is stored correctly in the data member, but it doesn’t have any effect on the final result. I like to draw the percentages without digits after the comma…

Am I doing something wrong?
Cheers and many thanks,

void piechart_ScaleError_minimal()

Float_t vals[] = {10,10,5,7.5};
Int_t colors[] = {2,3,4,5};
Int_t nvals = sizeof(vals)/sizeof(vals[0]);
const char * labels[]={“HF Scale”,“Model dep.”,“Castor Non Comp.”,“Castor pos.”,“Gain Correction”};

TCanvas *cpie = new TCanvas(“cpie”,“TPie test”,500,500);
TPie *pie4 = new TPie(“pie4”,
"#splitline{Contributions to Error Energy Scale Castor Run 2}{Total error 17 %}",nvals,vals,colors,labels);
pie4->SetPercentFormat("%1.0f"); //this doesn’t work
//pie4->SetValueFormat("%10.2f"); //this does work if we plot the values instead…

TLegend *pieleg = pie4->MakeLegend();
pie4->Draw(“nol <”);

cout<<"pie4->GetPercentFormat "<GetPercentFormat()<<endl;


The percentage is drawn with a fixed format. See line 989 here: … tml#l00802