Hey guys. I'm new to Kendo UI and basically to MVC framework but that is the tool I have to use so... :)
In the example below IEnumerable is used to simply enumerate over entire data stored in Close.
But if I send data as a List
and later would like to access specific data(not all data like here
http://demos.kendoui.com/dataviz/bar-charts/grouped-data.html
In the example below IEnumerable is used to simply enumerate over entire data stored in Close.
But if I send data as a List
@model List<Kendo.Mvc.Examples.Models.StockDataPoint>
and later would like to access specific data(not all data like here
series.Column(model => model.Close)
) how could I do that exactly ?
http://demos.kendoui.com/dataviz/bar-charts/grouped-data.html
@model IEnumerable<Kendo.Mvc.Examples.Models.StockDataPoint><div class="chart-wrapper"> @(Html.Kendo().Chart(Model) .Name("chart") .Title("Stock Prices") .DataSource(dataSource => dataSource .Read(read => read.Action("_StockData", "Scatter_Charts")) .Group(group => group.Add(model => model.Symbol)) .Sort(sort => sort.Add(model => model.Date).Ascending()) ) .Series(series => { series.Column(model => model.Close) .Name("#= group.value # (close)"); }) .Legend(legend => legend .Position(ChartLegendPosition.Bottom) ) .ValueAxis(axis => axis.Numeric() .Labels(labels => labels .Format("${0}") .Skip(2) .Step(2) ) ) .CategoryAxis(axis => axis .Categories(model => model.Date) .Labels(labels => labels.Format("MMM")) ) ) </div>