diff --git a/page-experience-timeline.php b/page-experience-timeline.php index 36fca03..59c7b1e 100644 --- a/page-experience-timeline.php +++ b/page-experience-timeline.php @@ -127,14 +127,14 @@ function within_dates( $role_start_date, $role_end_date ) { ]); var rowHeight = 15; - var chartHeight = dataTable.getNumberOfRows() * rowHeight + 50; + var chartHeight = (dataTable.getNumberOfRows() * rowHeight) + 50; var options = { - tooltip: {isHtml: true}, - timeline: { - showRowLabels: true, - }, - height: chartHeight, - width: window.innerWidth - 200, + tooltip: {isHtml: true}, + timeline: { + showRowLabels: true, + }, + height: chartHeight, + width: window.innerWidth - 200, }; chart.draw(dataTable, options); diff --git a/style.css b/style.css index f16a4bb..66d499b 100644 --- a/style.css +++ b/style.css @@ -514,6 +514,10 @@ html { #organisation-body > .org-items .index .item:nth-child(4) { grid-area: item4; } + + #organisation-body div.org_items { + align-items: self; + } #split-page > #comments { grid-area: comments; @@ -1291,7 +1295,7 @@ a:hover, a:focus { #timeline { display: block; margin: auto; - min-height: 200px; + min-height: 95px; max-width: 950%; } diff --git a/taxonomy-company.php b/taxonomy-company.php index c3eeb06..dbfc278 100644 --- a/taxonomy-company.php +++ b/taxonomy-company.php @@ -75,19 +75,19 @@ endwhile; ?> ]); - + // Draws the table, then resizes the element height and re-draws it // to avoid needing to scroll vertically. - var rowHeight = 15; - var chartHeight = dataTable.getNumberOfRows() * rowHeight + 50; - var options = { - tooltip: {isHtml: true}, - timeline: { - showRowLabels: true, - }, - height: chartHeight, - width: '100%', - }; + var rowHeight = 45; + var chartHeight = (dataTable.getDistinctValues(0).length * rowHeight) + 50; + var options = { + tooltip: {isHtml: true}, + timeline: { + showRowLabels: true, + }, + height: chartHeight, + width: '100%', + }; chart.draw(dataTable, options); }