I am trying to use AccumulationDataLabelSettings.Template with a pie chart. I have a few questions
- What is the TemplateData property, how do we use it?
- If I set Template, I lose the text alignment. How do I simply change text without changing anything else.
- And I set the Template property as below, I can't set the AccumulationChartConnector , there will be a compile error:
Error Unrecognized child content inside component 'AccumulationDataLabelSettings'. The component 'AccumulationDataLabelSettings' accepts child content through the following top-level items: 'ChildContent', 'Template'.
<SfAccumulationChart EnableSmartLabels="true">
<AccumulationChartEvents Load="BeforeRender"/>
<AccumulationChartLegendSettings Visible="false"></AccumulationChartLegendSettings>
<AccumulationChartTooltipSettings Enable="true" Format="${point.x} : <b>${point.y}</b>"></AccumulationChartTooltipSettings>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@_grouped" XName="GroupName" YName="Total"
InnerRadius="40%" GroupTo="5%"
StartAngle="0" EndAngle="360">
<AccumulationDataLabelSettings Name="GroupName" Visible="true" Position="AccumulationLabelPosition.Outside"
>
<Template>
@{
var data =(IAccumulationChartTemplate) context ;
<span> @data.X @data.Percentage%</span>
}
</Template>
@* <AccumulationChartConnector Length="10%"></AccumulationChartConnector> *@
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>