Fix timeline height rendering
This commit is contained in:
parent
19fdc17cce
commit
7cea365fb2
3 changed files with 23 additions and 19 deletions
|
@ -127,14 +127,14 @@ function within_dates( $role_start_date, $role_end_date ) {
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var rowHeight = 15;
|
var rowHeight = 15;
|
||||||
var chartHeight = dataTable.getNumberOfRows() * rowHeight + 50;
|
var chartHeight = (dataTable.getNumberOfRows() * rowHeight) + 50;
|
||||||
var options = {
|
var options = {
|
||||||
tooltip: {isHtml: true},
|
tooltip: {isHtml: true},
|
||||||
timeline: {
|
timeline: {
|
||||||
showRowLabels: true,
|
showRowLabels: true,
|
||||||
},
|
},
|
||||||
height: chartHeight,
|
height: chartHeight,
|
||||||
width: window.innerWidth - 200,
|
width: window.innerWidth - 200,
|
||||||
};
|
};
|
||||||
|
|
||||||
chart.draw(dataTable, options);
|
chart.draw(dataTable, options);
|
||||||
|
|
|
@ -514,6 +514,10 @@ html {
|
||||||
#organisation-body > .org-items .index .item:nth-child(4) {
|
#organisation-body > .org-items .index .item:nth-child(4) {
|
||||||
grid-area: item4;
|
grid-area: item4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#organisation-body div.org_items {
|
||||||
|
align-items: self;
|
||||||
|
}
|
||||||
|
|
||||||
#split-page > #comments {
|
#split-page > #comments {
|
||||||
grid-area: comments;
|
grid-area: comments;
|
||||||
|
@ -1291,7 +1295,7 @@ a:hover, a:focus {
|
||||||
#timeline {
|
#timeline {
|
||||||
display: block;
|
display: block;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
min-height: 200px;
|
min-height: 95px;
|
||||||
max-width: 950%;
|
max-width: 950%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,19 +75,19 @@
|
||||||
endwhile;
|
endwhile;
|
||||||
?>
|
?>
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Draws the table, then resizes the element height and re-draws it
|
// Draws the table, then resizes the element height and re-draws it
|
||||||
// to avoid needing to scroll vertically.
|
// to avoid needing to scroll vertically.
|
||||||
var rowHeight = 15;
|
var rowHeight = 45;
|
||||||
var chartHeight = dataTable.getNumberOfRows() * rowHeight + 50;
|
var chartHeight = (dataTable.getDistinctValues(0).length * rowHeight) + 50;
|
||||||
var options = {
|
var options = {
|
||||||
tooltip: {isHtml: true},
|
tooltip: {isHtml: true},
|
||||||
timeline: {
|
timeline: {
|
||||||
showRowLabels: true,
|
showRowLabels: true,
|
||||||
},
|
},
|
||||||
height: chartHeight,
|
height: chartHeight,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
};
|
};
|
||||||
|
|
||||||
chart.draw(dataTable, options);
|
chart.draw(dataTable, options);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue