有谁知道如何为Kendo-UI数据viz饼图创建点击事件?
我想获取点击部分的模板信息。
这是指定的剑道代码:
@(Html.Kendo().Chart<Kendo.Mvc.Examples.Models.ScreenResolutionRemoteDataViewModel>()
.Name("chart" + year)
.Title(year)
.HtmlAttributes(new { @class = "small-chart" })
.Legend(legend => legend
.Visible(false)
)
.DataSource(ds =>
{
ds.Read(read => read.Action("_SpainElectricityProduction", "Pie_Charts"));
ds.Filter(filter => filter.Add(model => model.Year).IsEqualTo(year));
ds.Sort(sort => sort.Add(model => model.Year).Ascending());
}
)
.Series(series => series
.Pie(model => model.Share, model => model.Resolution, model => model.Color)
.Padding(0)
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0:N0}")
.Template("#= category # - #= kendo.format('{0:P}', percentage)#")
)
)