gantt icon indicating copy to clipboard operation
gantt copied to clipboard

Can't seem to find a way to enable view mode

Open zeddysoft opened this issue 6 years ago • 1 comments

Screenshot 2019-10-20 at 1 11 06 PM Hi, i'm trying out gantt chart in my angular app but i can't seem to get the view mode to display as attached, only the gantt displayed.

Please help.

zeddysoft avatar Oct 20 '19 12:10 zeddysoft

Drop this below the gantt target div:

<div class="btn-group" role="group">
	<button type="button" class="btn btn-sm btn-light">Quarter Day</button>
	<button type="button" class="btn btn-sm btn-light">Half Day</button>
	<button type="button" class="btn btn-sm btn-light">Day</button>
	<button type="button" class="btn btn-sm btn-light active">Week</button>
	<button type="button" class="btn btn-sm btn-light">Month</button>
</div>

...and into your JS...

gantt_chart.change_view_mode('Week');
$('.btn-group').on('click', 'button', function() {
      $btn = $(this);
      var mode = $btn.text();
      gantt_chart.change_view_mode(mode);
      $btn.parent().find('button').removeClass('active');
      $btn.addClass('active');
});

mikeott avatar Apr 15 '21 14:04 mikeott

This is only for the demo - not part of the framework.

safwansamsudeen avatar Apr 14 '24 13:04 safwansamsudeen