3 Answers, 1 is accepted
0
Accepted
Hi Andrew,
It is not possible to wrap an anchor around a Donut series, but you can handle the OnSeriesClick event and navigate to the desired URL depending on the series.name/series.data.
For example, you can keep the desired urls into an additional dataField in the passed data source in a similar way:
<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Width="600">
<ClientEvents OnSeriesClick="onSeriesClick" />
<PlotArea>
<Series>
<telerik:DonutSeries DataFieldY="valueField" NameField="nameField">
</telerik:DonutSeries>
</Series>
</PlotArea>
</telerik:RadHtmlChart>
<script>
function onSeriesClick(e) {
var url = e.dataItem.urlField;
window.location.href = url;
}
</script>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
RadHtmlChart1.DataSource = GetData();
RadHtmlChart1.DataBind();
}
}
private DataTable GetData()
{
DataTable dt = new DataTable();
dt.Columns.Add("valueField");
dt.Columns.Add("nameField");
dt.Columns.Add("urlField");
dt.Rows.Add(30, "google", "http://google.com");
dt.Rows.Add(10, "bing", "http://bing.com");
dt.Rows.Add(50, "bing", "http://msn.com");
return dt;
}
Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0

Andrew
Top achievements
Rank 1
answered on 14 Aug 2019, 12:15 PM
Thanks, That worked.
0
Hi,
You are welcome, Andrew - I am glad the proposed solution served its purposes.
Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.