更改Infragistics XamDoughnutChart上的LabelTemplate

时间:2017-12-14 13:12:33

标签: wpf xaml infragistics

我有一个Infragistics WPF XamDoughnutChart,它显示来自名为ObservableCollection的{​​{1}}绑定的数据,并在其图表标签上显示DataData.Value

Data.Label

我正在尝试更改此处提到的<Grid> <ig:XamDoughnutChart x:Name="MyDonut" CenterData="{Binding TotalItemCount}"> <ig:XamDoughnutChart.Series> <ig:RingSeries ItemsSource="{Binding Data}" ValueMemberPath="Value" LabelMemberPath="Label"> </ig:RingSeries> </ig:XamDoughnutChart.Series> </ig:XamDoughnutChart> </Grid> https://www.infragistics.com/help/wpf/16.2/infragisticswpf.controls.charts.xamdatachart~infragistics.controls.charts.hierarchicalringseries_members

但是我没有尝试过。这是我新尝试的XAML:

LabelTemplate

如何实际更改此标签模板?

1 个答案:

答案 0 :(得分:0)

解决

<ig:RingSeries.LabelTemplate>
    <DataTemplate>
        <StackPanel Orientation="Vertical">
            <TextBlock Text="{Binding Item.Label}" Foreground="White"/>
        </StackPanel>
    </DataTemplate>
</ig:RingSeries.LabelTemplate>