This question is locked. New answers and comments are not allowed.
I'm newbie with the Telerik extensions for ASP.net MVC and I don't understand why the graph is not displaying the information...
My view (razor) has this code:
And my controller has this code:
but the graphic is not painted and no error is thrown...
Any idea about what could be the problem??
My view (razor) has this code:
@model TestDTO@using Telerik.Web.Mvc.UI@using TelerikTest.Models@{ ViewBag.Title = "Home";}<h2> Home</h2><div style="background: red; height: 300px; width: 250px">@{var colors = new[] { "#20bcd0", "#afd418", "#d42eca", "#ffa800" }; Html.Telerik().Chart<AmountPerMonth>(Model.Amounts) .SeriesColors(colors) .Series(series => series.Pie("Amount", "Month")) .HtmlAttributes(new { style = "background-color: yellow; width: 300px; height: 300px;" });}</div>AdiosAnd my controller has this code:
public ActionResult Index() { var dto = new TestDTO(); dto.Name = "Andoni"; dto.Amounts = new List<AmountPerMonth>() { new AmountPerMonth { Month = "Jan", Amount = 30 }, new AmountPerMonth { Month = "Feb", Amount = 27 } }; return View(dto); }but the graphic is not painted and no error is thrown...
Any idea about what could be the problem??