New to Kendo UI for jQuery? Start a free 30-day trial
Views
The time-line of the Gantt enables you to display its tasks in different views.
The Gantt supports the following views:
day
—The timeline is divided into separate days and hours.week
—The timeline is divided into weeks and days.month
—The timeline is divided into months and weeks.year
—The timeline is divided into months.
To enable, disable, or further configure individual views, use the views
option.
The following example demonstrates how to enable all scheduler views.
html
<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
views: [
"day", // A view configuration can be a string (the view type) or an object (the view configuration).
{ type: "week", selected: true }, // The Week view will appear as initially selected.
"month",
"year"
],
dataSource: [
{
id: 1,
orderId: 0,
title: "Task1",
start: new Date("2014/6/17 9:00"),
end: new Date("2014/6/17 11:00")
},
{
id: 2,
orderId: 1,
title: "Task2",
start: new Date("2014/6/17 12:00"),
end: new Date("2014/6/17 13:00")
}
],
dependencies: [
{
id: 1,
predecessorId: 1,
successorId: 2,
type: 1
}
]
});
</script>