Change Section height of Gantt Diagram [message #780516] |
Wed, 18 January 2012 12:29 |
Bobo xTreme Messages: 1 Registered: January 2012 |
Junior Member |
|
|
Halo folks,
I'm pleased to be a member of your community.
I work on an implementation of Nebula Gantt.
I've already created the Diagramm and imported Sections, Events and EventGroups and Scopes.
I've attached a picture of my Gantt Diagram.
As you can see in the section is too much free-space, caused by the calculation of the Nebula Gantt API.
Here is the function from for ganttSection height-calculation:
int getEventsHeight(final ISettings settings) {
if (_ganttEvents.size() == 0) {
return settings.getMinimumSectionHeight();
}
int height = settings.getEventsTopSpacer();
for (int i = 0; i < _ganttEvents.size(); i++) {
final IGanttChartItem event = (IGanttChartItem) _ganttEvents.get(i);
if (event.isAutomaticRowHeight()) {
height += settings.getEventHeight();
}
else {
height += event.getFixedRowHeight();
}
if (i != _ganttEvents.size() - 1) {
height += settings.getEventSpacer();
}
}
height += settings.getEventsBottomSpacer();
if (height < settings.getMinimumSectionHeight()) {
height = settings.getMinimumSectionHeight();
}
return height;
}
It adds for every event (24 Events at all) more height, but I just need the groupEvents (in this case: 7 GroupEvents)
calculated = 24 * 12px (eventheight) + 26 * 12px (eventspace) = 600px
i need = 7*12 + 9*12 = 192px
I've tried to override the function, but it's private.
What can I do ?
greets.
[Updated on: Wed, 18 January 2012 12:35] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03101 seconds