Asp.net mvc 4 剑道图;。MajorUnit();来自控制器端的值绑定

Asp.net mvc 4 剑道图;。MajorUnit();来自控制器端的值绑定,asp.net-mvc-4,kendo-chart,Asp.net Mvc 4,Kendo Chart,我无法从控制器端绑定“.MajorUnit”值。我在谷歌上搜索了很多,但没有找到正确的答案。我给了静态值“100”(.MajorUnit(100)),即ok。但如何绑定从控制器返回的动态值,比如.MajorUnit(ViewBag.MyCountValue) @(Html.Kendo().Chart()) .Name(“用户图表”) .HtmlAttributes(新的{style=“宽度:100%;高度:150pxpx”,id=“ExtDataChart”+extid}) //.标题(“提取详

我无法从控制器端绑定“.MajorUnit”值。我在谷歌上搜索了很多,但没有找到正确的答案。我给了静态值“100”(.MajorUnit(100)),即ok。但如何绑定从控制器返回的动态值,比如.MajorUnit(ViewBag.MyCountValue)

@(Html.Kendo().Chart())
.Name(“用户图表”)
.HtmlAttributes(新的{style=“宽度:100%;高度:150pxpx”,id=“ExtDataChart”+extid})
//.标题(“提取详情”)
.Legend(Legend=>Legend
.位置(ChartLegendPosition.Top)
)
.DataSource(ds=>ds.Read(Read=>Read.Action(“GetExtractionCount”,“DashboardStatistics”,新的{allotId=allotId,extid=extid})))
.系列(系列=>
{
series.Line(model=>model.ExtCompletedCount).Name(“按分配提取”);
series.Line(model=>model.IssueReportedCount).Name(“已报告的问题”);
})
.CategoryAxis(轴=>轴
.Categories(model=>model.ExtractionDate).可见(false)
.Labels(Labels=>Labels.Rotation(-40))
.十字线(c=>c.可见(真))
)
.ValueAxis(axis=>axis.Numeric()
.Labels(Labels=>Labels.Format(“{0:N0}”))
MajorUnit(100)
)
.工具提示(工具提示=>工具提示
.可见(真实)
.共享(真实)
.Format(“{0:N0}”)
)
)

是否有任何错误消息?如果是,请将其附加到您的问题中。请编辑您的问题以包含此可行的详细信息。不要只是把它作为评论发布。是否有任何错误消息?如果是,请将其附加到您的问题中。请编辑您的问题以包含此可行的详细信息。不要仅仅把它作为评论发布。
@(Html.Kendo().Chart<ExtractorWiseExtractionCount>()
        .Name("userchart")
        .HtmlAttributes(new { style = "width: 100%; height:150pxpx", id = "ExtDataChart_" + extid })
         //.Title("Extraction Details")
        .Legend(legend => legend
        .Position(ChartLegendPosition.Top)
        )
        .DataSource(ds => ds.Read(read => read.Action("GetExtractionCount", "DashboardStatistics", new { allotId = allotId, extid = extid })))
        .Series(series =>
        {
            series.Line(model => model.ExtCompletedCount).Name("Allocation Wise Extraction");
            series.Line(model => model.IssueReportedCount).Name("Issue Reported");
        })
        .CategoryAxis(axis => axis
        .Categories(model => model.ExtractionDate).Visible(false)
        .Labels(labels => labels.Rotation(-40))
        .Crosshair(c => c.Visible(true))
        )
        .ValueAxis(axis => axis.Numeric()
        .Labels(labels => labels.Format("{0:N0}"))
        .MajorUnit(100)
        )
        .Tooltip(tooltip => tooltip
        .Visible(true)
        .Shared(true)
        .Format("{0:N0}")
        )
     )