Dynamically change Chart Data

2 posts, 0 answers
  1. Tong
    Tong avatar
    8 posts
    Member since:
    Feb 2016

    Posted 10 Mar 2016 Link to this post

    I want to change chart data based on selection from TreeView or other controls. I have tried to search all solutions on internet, including here...the following seems the right approach but not working for me...

    First, I get selected ID from TreeView, then try to use it as parameter to call an Action by URL..

    Anything wrong here? Thanks

        function onSelect(e) {
            var data = $('#MarketDrivers').data('kendoTreeView').dataItem(e.node);
            var ds = new kendo.data.dataSource({
                transport: {
                    read: {
                        type: "GET",
                        url: "/Blotter/getUserViewHist",
                        data: { factorID_: data.id },
                        dataType: "json"
            var chart = $("#PersonalSummary").data("kendoChart");


    I have an Action from Blotter controller as below

     public ActionResult getUserViewHist(int factorID_)

  2. Tong
    Tong avatar
    8 posts
    Member since:
    Feb 2016

    Posted 11 Mar 2016 in reply to Tong Link to this post

    I figured out...

    First, there is a typo: it's kendo.data.DataSource not kendo.data.dataSource

    Second, the type need to be "POST", not "GET". because I call a controller instead of getting from real url?

    Anyway, good for now


Back to Top