I am having a hard time getting the Legend label values to equal the pie series NameField values.
<telerik:RadHtmlChart ID="rhcDiscountReasons" runat="server" DataSourceID="sqlDRRAlt" ChartTitle-Text="Discount Reasons">
<ChartTitle Text="Discount Reasons">
<Appearance Visible="True">
</Appearance>
</ChartTitle>
<Legend>
<Appearance Visible="True" BackgroundColor="WindowFrame" Align="Center" Position="Bottom" Orientation="Horizontal">
<TextStyle Color="White" FontSize="18" />
</Appearance>
<Item Visual="legendItemVisual" />
</Legend>
<PlotArea>
<Series>
<telerik:PieSeries DataFieldY="dtypecount" Name="Discount Reasons" VisibleInLegend="true" NameField="dtype">
<LabelsAppearance DataField="dtype">
</LabelsAppearance>
</telerik:PieSeries>
</Series>
</PlotArea>
</telerik:RadHtmlChart>
If I use the below code, It fills all the legend labels with "Discount Reasons", I want them to have the NameField values. I have tried everything I could think of to access those values but cannot. If I replace e.series.name with e.series.categoryField the legend lables all say "dtype", this is close but I want the dtype value.
var label = new drawing.Text(e.series.name, [0, 0], {
fill: {
color: legendLabelsColor
}
})
Can someone point me in the right direction?