Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Gantt Chart (Read 4053 times)
RJ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: Sep 4th, 2015
Gantt Chart
Oct 6th, 2015 at 4:41pm
Print Post  
I want to create a gantt chart looking like the picture in the attachment. Will i need two lanegrids? If so can i do it in the same diagram? Or can i do it using a single lane grid. I need to know the best way to achieve this.

Thanks,
RJ
  

test.png ( 107 KB | 85 Downloads )
test.png
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Gantt Chart
Reply #1 - Oct 6th, 2015 at 7:07pm
Print Post  
You can create only one grid in a diagram, but if you set the fill and border colors of 7th column to be same as diagram's background, it will look split in two as in the image. However if you need the right grid to scroll independently from left one (as is often the case with Gantt charts), you will need a second diagram.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
RJ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: Sep 4th, 2015
Re: Gantt Chart
Reply #2 - Oct 7th, 2015 at 2:42pm
Print Post  
Thanks Stoyan. I thik i'll do it two grids. Is it possible to have two grids in the same canvas or do i need separate canvas for each grid?

Thanks,
RJ
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Gantt Chart
Reply #3 - Oct 7th, 2015 at 3:47pm
Print Post  
There's only one built-in lane grid per diagram instance, so you'd need two diagrams backed by two <canvas> elements. Alternatively, use locked TableNodes in diagram background to draw as many grids as you'd like to.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
RJ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: Sep 4th, 2015
Re: Gantt Chart
Reply #4 - Oct 9th, 2015 at 4:08pm
Print Post  
Thanks Stoyan. I was able to achieve this with two diagrams. I have one question - how to increase the width of individual columns without increasing the height inside the Grid.

I tried
grid.setMinHeaderSize(30);

But it increases both width and height.

Thanks,
Raji
  
Back to top
 
IP Logged
 
RJ
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 27
Joined: Sep 4th, 2015
Re: Gantt Chart
Reply #5 - Oct 9th, 2015 at 4:40pm
Print Post  
Also how to enable text editing in individual cells in the grid?

Thanks,
Raji
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Gantt Chart
Reply #6 - Oct 9th, 2015 at 5:29pm
Print Post  
Call Header.setWidth() method for the columns headers, i.e. the ones you pass to grid.addColumnHeader() method to create columns.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Gantt Chart
Reply #7 - Oct 12th, 2015 at 2:16pm
Print Post  
Quote:
Also how to enable text editing in individual cells in the grid?


The lane-grid was used mostly for background graphics and did not support text editing. We've now implemented this here for upcoming release:
https://mindfusion.eu/_beta/jsdiag_edit_grid.zip

To enable editing cells' text, call diagram.getLaneGrid().setAllowInplaceEdit(true) and you will be able to enter text after double-click on a cell.

If you will need more data grid -like features such as sorting, selecting rows, filtering, etc, consider using an actual grid control as left part of the Gantt view.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint