SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a webpart with a JS Grid control with gantt enabled. I want the gantt view to display months instead of weekdays. Anyone have an idea how to do this?

Update: The following link is what I used to create the gantt webpart. What I need is to zoom out gantt.

I have found SetZoomLevelInternal and SetZoomLevel in JsGrid.Gantt.js but cant see how to get it working.

share|improve this question
Is this a third-party gantt control? If so, can you send a link to it for us to take a look at? – John Chapman Apr 26 '12 at 21:42
Does anybody know how to change the width of each row in Gantt chart? – Nitin Chhabra Jan 17 '13 at 22:44

Combining SharePoint 2010 – Autozoom Gantt Chart Web Part with my own code, i get this:

<script src="" type="text/javascript"></script><script type="text/javascript">
// By Cees Timmerman, 24oct12.
    for (var i = 0; i < 3; ++i) WebPartWPQ2_JSGridController.ZoomOutGantt()
  }, 2000)

Put that in a Content Editor's HTML source and enjoy.

If you want to get all fancy, try this:

  var oldGanttControl = SP.GanttControl
  SP.GanttControl = function(){
    var oldInit = this.Init
    this.Init = function(jsGridControl, jsRawGridData, params){, jsGridControl, jsRawGridData, params)
}, "SPGantt.js")
function DoCustomizations(grid){
  var columns = grid.GetColumns()
  $.each(columns, function(key, value){value.width=200})
share|improve this answer
Will the 1st script work with OOB Gantt Chart view? – George Sep 8 '15 at 9:10
If you can correct the zoomOut function, it will work with the default Gantt chart. – Cees Timmerman Sep 9 '15 at 13:41
It worked perfectly..Thanks – George Sep 9 '15 at 13:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.