using System;
﻿using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Kendo.Mvc.Extensions;
using Kendo.Mvc.UI;
using ChartBoundToModel.Models;

namespace ChartBoundToModel.Controllers
{
	public partial class ChartController : Controller
    {
		public ActionResult DisplayChart([DataSourceRequest]DataSourceRequest request)
		{
            var result = Enumerable.Range(0, 50).Select(i => new Chart
            {
                ChartNumber1 = 10 + i,
                ChartNumber2 = 20 + i,
                ChartNumber3 = 30 + i,
                Year = "201" + i.ToString()
            });

            return Json(result);
        }
	}
}
