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

How to generate dataSource for Chart

1 Answer 93 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Leonid
Top achievements
Rank 1
Leonid asked on 25 Sep 2012, 09:05 AM
I do not know as to copy following code from Kendo UI Fluent to write in JavaScript

Code Kendo UI Fluent

@(Html.Kendo().Chart() .Name("Chart") 
           .DataSource(ds => ds.Read(read => read.Action("ActionName", "ControllerName")
           .Data("filterFunction")))

Code JavaScript
jQuery(document).ready(function($)
{
$("#chart").kendoChart({
   dataSource: {
     transport: {
         read: "ControllerName/ActionName",
      parameterMap: filterFunction
}
},

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 28 Sep 2012, 09:05 AM

Not work!
Where here an error?
Does not address at all to the controller

ds = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: '@Url.Action("Action", "Controller")',
                        dataType: "json",
                        data:{
                            id: function() {
                                return $("#field").val();
                            }
                           
                           
                        }        
                    }
                }
            });
Tags
Charts
Asked by
Leonid
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or