Kendo Chart Ajax Binding - Autobind property

5 posts, 1 answers
  1. Jineesh
    Jineesh avatar
    11 posts
    Member since:
    Oct 2012

    Posted 22 Oct 2012 Link to this post


    Hi,
           I am using kendo chart with ajax binding.
           I need to prevent the ajax call (read) when chart initialization.
           Ajax call should occured only when firing from a button.
           Is it possible to set the Autobind property for chart?

          @(Html.Kendo().Chart<foo>()
                    .Name("foo")
                           
            .Legend(legend => legend.Position(Kendo.Mvc.UI.ChartLegendPosition.Right))
            .Title("foo| ")
            
            .SeriesDefaults(seriesDefaults =>
                seriesDefaults.Column().Stack(true)
            )
            .DataSource(dataSource => dataSource
              .Read(read => read.Action("foo", "foo").Data("foo")




              )
                       .Group(group => group.Add(model => model.id))
                       .Sort(sort => sort.Add(s => s.id))
             )


           .Series(series =>
            {




                series.Column(x => x.ExecutionTime).Name(string.Empty);


            })




            .CategoryAxis(axis => axis
                        .Categories(m => m.DayFormat)








            )
            .ValueAxis(axis => axis
                .Numeric().MajorUnit(10).Title("Minutes")
            )


                      .Events(events => events.SeriesHover("onSeriesHover").SeriesClick("onSeriesClick").AxisLabelClick("onAxisLabelClick"))
                        
            )
        
  2. Answer
    Daniel
    Admin
    Daniel avatar
    2231 posts

    Posted 25 Oct 2012 Link to this post

    Hello Jineesh,

    Currently, the Kendo MVC Chart does not support an AutoBind configuration method. We will include it for the next release. A workaround for now is to set the default value of the autoBind option to for the Chart to be false e.g.

    kendo.dataviz.ui.Chart.fn.options.autoBind = false;
    Regards,
    Daniel
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Jineesh
    Jineesh avatar
    11 posts
    Member since:
    Oct 2012

    Posted 25 Oct 2012 Link to this post

    Hi Daniel,

         Thank You very much. Its working fine.
  4. Jacques
    Jacques avatar
    138 posts
    Member since:
    Jun 2007

    Posted 10 Sep 2013 Link to this post

    Was this ever include in the next release? 

    And if it was, how do you then load the data when you need to? 
  5. Jacques
    Jacques avatar
    138 posts
    Member since:
    Jun 2007

    Posted 10 Sep 2013 Link to this post

    never mind, found it

    .AutoBind(false)
Back to Top