Reputation: 1096
Anybody know how to set zoom level for Kendo line chart from js code? I use asp .net mvc and my chart have this settings
.Pannable(p => p.Lock(ChartAxisLock.Y))
.Zoomable(z => z.Mousewheel(m => m.Lock(ChartAxisLock.Y)).Selection(s => s.Lock(ChartAxisLock.Y)))
and when I scroll up\down mouse chart change zoom. By I need to set default zoom when data loaded into chart.
Upvotes: 1
Views: 886
Reputation: 24738
Set the categoryAxis Min and Max to the limits of the desired zoom.
.CategoryAxis(axis => axis
.Min(0)
.Max(10)
)
See this demo which starts zoomed in to the first 10 items: http://demos.telerik.com/aspnet-mvc/bar-charts/pan-and-zoom
Upvotes: 2