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

Bind bulletchart to datatable

1 Answer 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
WILLIAM
Top achievements
Rank 1
WILLIAM asked on 15 May 2013, 03:55 PM
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.

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 18 May 2013, 01:11 PM
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). 

Regards,
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!
Tags
General Discussions
Asked by
WILLIAM
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or