This is a migrated thread and some comments may be shown as answers.

[Solved] The graphic doesn't appears...

0 Answers 7 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andoni
Top achievements
Rank 1
Andoni asked on 05 Feb 2013, 07:56 PM
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:
@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>
Adios


And 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??



Tags
General Discussions
Asked by
Andoni
Top achievements
Rank 1
Share this question
or