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

Kendo Chart Ajax Binding - Autobind property

4 Answers 229 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Jineesh
Top achievements
Rank 2
Jineesh asked on 22 Oct 2012, 10:49 AM

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"))
                    
        )
    

4 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 25 Oct 2012, 08:52 AM
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!
0
Jineesh
Top achievements
Rank 2
answered on 25 Oct 2012, 09:13 AM
Hi Daniel,

     Thank You very much. Its working fine.
0
Jacques
Top achievements
Rank 2
answered on 10 Sep 2013, 09:28 AM
Was this ever include in the next release? 

And if it was, how do you then load the data when you need to? 
0
Jacques
Top achievements
Rank 2
answered on 10 Sep 2013, 09:55 AM
never mind, found it

.AutoBind(false)
Tags
Charts
Asked by
Jineesh
Top achievements
Rank 2
Answers by
Daniel
Telerik team
Jineesh
Top achievements
Rank 2
Jacques
Top achievements
Rank 2
Share this question
or