Elger van Boxtel

Gantt: control height of rows (process, datatable, datacolumn)

Recommended Posts

Hi,

 

Is is possible to control the height of the Gantt chart dynamically? I'm using the Gantt chart with pagination, so one time I have multiple processes to show and the other time I have just 1 process to show.

 

In JavaScript I create the Gantt chart as follows:

var chart = new FusionCharts( "Gantt", "ganttID", "100%", "100%"); // height = 100%

 

When I have 12 processes (rows) then the chart will render at 611px, when I select only one row it will not alter the height. See attached screenshots to clarify my problem.

post-48633-0-23863600-1379323058_thumb.png

post-48633-0-79417200-1379323059_thumb.png

 

Is it possible to let the chart determine it's own height depending on it's content? So something like height: auto...

 

 

P.s. I know I can use some callbacks of the chart (like BeforeDataUpdate) where I can determine the number of rows myself and adjust the height of the chart manually. But I would like that to be some default functionality supported by FusionCharts...

Share this post


Link to post
Share on other sites

Hi,

 

Apologies for delay.

 

It is not possible to let the chart determine it's own height depending on it's content, as of now.

 

As you said, you need to use your mechanism to determine the number of rows and adjust the height of the chart before rendering the chart.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now