I've got a chart, which I want to be able to dynamically set the theme for - based upon a value set in a ViewBag variable.
I can do this if the chart is defined in JavaScript, however I can't seem to set it when the chart is defined using the helper.
i.e.:-
If I do:-
.Theme(ViewBag.SelectedTheme) - the page returns an error. How can I do this?
I can do this if the chart is defined in JavaScript, however I can't seem to set it when the chart is defined using the helper.
i.e.:-
@(Html.Kendo().Chart<CMS_2013.Models.Temp_Data_Summary>() .Name("Chart") .Legend(false) .Title("Data in Temporary Pricing Table") .DataSource(dataSource => dataSource .Read(read => read.Action("GetSummaryChartData", "Pricing")) ) .Series(series => { series.Column(d => d.Records).Tooltip(true) ; }) .CategoryAxis(axis => axis .Categories(model => model.Class) ) .HtmlAttributes(new { style = "width:350px; height:250px;"})).Theme(ViewBag.SelectedTheme) - the page returns an error. How can I do this?