剑道ui饼图点击事件

时间:2015-08-22 18:30:41

标签: javascript jquery asp.net-mvc charts kendo-ui

有谁知道如何为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)#")
            )
        ) 

0 个答案:

没有答案