Hello,
I have a donut chart that uses local data and I'm getting an error on my series of:
Cannot convert lambda expression to type 'System.Collections.IEnumerable' because it is not a delegate typeThe chart is being used in a partial view. Here is my source code.
Partial View
@model IEnumerable<MyProject.ViewModels.UtilisationViewModel> <div class="row"> <div class="col-md-6"> <div class="demo-section k-content wide"> @(Html.Kendo().Chart(Model) .Name("chart") .Title("Utilisation") .Legend(legend => legend .Position(ChartLegendPosition.Bottom)) .Series(series => { series.Donut( model => model.ahts ); }) ) </div> </div></div>The ViewModel
using System;using System.Collections.Generic;using System.ComponentModel.DataAnnotations;using System.Linq;using System.Data.Entity;using System.Web;using Spoton_Areas_Test.Models;namespace MyProject.ViewModels{ public class UtilisationViewModel { public int idx_index { get; set; } public Nullable<System.DateTime> applies_date { get; set; } public Nullable<decimal> ahts { get; set; } public Nullable<decimal> psv { get; set; } public Nullable<int> region_idx { get; set; } public string region_name { get; set; } }}Can anyone point me in the direction of what is going wrong?
Many thanks