Custom Attributes for ChartClickEventArgs args

Thread is closed for posting
2 posts, 0 answers
  1. Tim Chisholm
    Tim Chisholm avatar
    2 posts
    Member since:
    Aug 2008

    Posted 19 Jan 2010 Link to this post

    I would like to add a custom attribute to a RadChart so that I can use it when the user clicks on the series.

    Currently I have an exploded pie chart.  I can parse the data that is displayed.  But I would prefer to add an ID to the series and be able to parse the ID when I go to drill down on the click event.

  2. Ves
    Ves avatar
    2926 posts

    Posted 21 Jan 2010 Link to this post

    Hello Tim,

    You can use the ChartSeriesItem.Label or ChartSeriesItem.Name for this purpose. However, Label is shown next to the pie slice and Name is shown in the legend. If you use both of them and you do not want to show the ID you can use the ChartSeriesItem.ActiveRegion.Attributes instead:

    <telerik:ChartSeries Name="Series 1" Type="Pie">
        <Appearance LegendDisplayMode="ItemLabels">
            <telerik:ChartSeriesItem Name="Item 1" YValue="6">
                <ActiveRegion Attributes="id='a1'" />
            <telerik:ChartSeriesItem Name="Item 2" YValue="5">
                <ActiveRegion Attributes="id='a2'" />
            <telerik:ChartSeriesItem Name="Item 3" YValue="6">
                <ActiveRegion Attributes="id='a3'" />
            <telerik:ChartSeriesItem Name="MyItem3" YValue="7">
                <ActiveRegion Attributes="id='a4'" />

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top