cancel
Showing results for 
Search instead for 
Did you mean: 

​ Gantt chart for SAPUI5

yakov
Discoverer
0 Kudos

Is it possible to mark weekends or holidays in gantt chart time axis? and if yes? how to do this?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Yakov,

Yes you can! However, there is no automatic feature to toggle on/off for weekends and load a table of holidays per year.
By using adhocLines, you can make the Gantt graph display information based a timestamp in different color and description.

Here is a sample, considering your model data has the color, date and description to be displayed:

<gantt:GanttChartContainer id="chart1">
  <gantt:ganttCharts>
      <gantt:GanttChartWithTable
        id="idGanttChart" 
        rows=.....
        adhocLines=.....
        shapes=.....
        chartClick=.....
        selectionMode=.....
        selectionPanelSize=.....
      >
        <gantt:columns>....</gantt:columns>
        <gantt:adhocLines>          
          <gantt:AdhocLine            
            stroke="{Chart>color}"            
            timeStamp="{Chart>date}"            
            description="{Chart>description}"/>        
        </gantt:adhocLines>
.....
    </gantt:GanttChartWithTable>
  </gantt:ganttCharts>
</gantt:GanttChartContainer>

Regards,
Ivan