This is a migrated thread and some comments may be shown as answers.
Custom Attributes for ChartClickEventArgs args
1 Answer 15 Views
This is a migrated thread and some comments may be shown as answers.
Tim Chisholm
Top achievements
Rank 1
Tim Chisholm asked on 19 Jan 2010, 01:01 PM
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.

Thanks

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 21 Jan 2010, 07:38 AM
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">
    </Appearance>
    <Items>
        <telerik:ChartSeriesItem Name="Item 1" YValue="6">
            <ActiveRegion Attributes="id='a1'" />
        </telerik:ChartSeriesItem>
        <telerik:ChartSeriesItem Name="Item 2" YValue="5">
            <ActiveRegion Attributes="id='a2'" />
        </telerik:ChartSeriesItem>
        <telerik:ChartSeriesItem Name="Item 3" YValue="6">
            <ActiveRegion Attributes="id='a3'" />
        </telerik:ChartSeriesItem>
        <telerik:ChartSeriesItem Name="MyItem3" YValue="7">
            <ActiveRegion Attributes="id='a4'" />
        </telerik:ChartSeriesItem>
    </Items>
</telerik:ChartSeries>


Sincerely,
Ves
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.
Asked by
Tim Chisholm
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or