Bind bulletchart to datatable

2 posts, 0 answers
    WILLIAM avatar
    2 posts
    Member since:
    Jul 2011

    Posted 15 May 2013 Link to this post

    I'm relatively new  to MVC and Kendo controls, so please bear with me.
    I have a datatable with one row and five values (columns). How can I bind this datatable to the mmHg bulletchart in the dataviz chart demo?
    My HomeController.cs looks like this. How would my complete index.schtml look like?
    namespace RfPrMvcKendo.Controllers
        public class HomeController : Controller
            // GET: /Home/
            public ActionResult Index()
                DataTable table = new DataTable();
                table.Columns.AddRange(new DataColumn[] {
                    new DataColumn("Counter1", typeof(int)),
                    new DataColumn("Counter2", typeof(int)),
                    new DataColumn("Counter3", typeof(int)),
                    new DataColumn("Counter4", typeof(int)),
                    new DataColumn("Counter5", typeof(int)) });
                table.Rows.Add(10, 25, 31, 45, 80);
                return View(table);
    Thanks for the help.
  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 18 May 2013 Link to this post

    Hi William,

    Generally speaking, Kendo UI Bullet Chart is designed to show two values per point Current and Target (the sequence of numbers in the provided configuration is not expected from the Bullet Graph). Hence it is recommended to create a new object which contains both Current and Target values (as shown in this online demo). 

    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top