I want to create custom labels on my PieChart. Currently, the type of my labels is PieLabelType.Value
but I need to format the value to display a currency symbol (€) and the thousands separator.
Usually, I use the String.Format
method with C0
as an argument, but I can't use PieLabelType.Value.Format("C0")
.
Code sample:
PieItem oTempPie1 = oGraphPane.AddPieSlice(oGerCosts._CNQ_, RedColor, 0, "blabla");
oTempPie1.LabelType = PieLabelType.Value;
PieItem oTempPie2 = oGraphPane.AddPieSlice(oGerCosts._CTQ_, BlueColor, 0, "blabla");
oTempPie2.LabelType = PieLabelType.Value;
oGraphPane.Title.Text = "RDV " + sScenarioReference;
oGraphPane.Legend.Position = LegendPos.Right;
oGraphPane.Legend.IsVisible = true;
// Font:
oGraphPane.Title.FontSpec.Size = c_fDefaultFontSize;
oGraphPane.Title.FontSpec.IsBold = true;
oGraphPane.Legend.FontSpec.Size = c_fDefaultFontSize;
How can I solve this problem?