From f16127a356ea8e307426b299f35bbafb0eabb99e Mon Sep 17 00:00:00 2001 From: Iliya Katueshenock Date: Sun, 26 Jan 2025 08:54:44 +0100 Subject: [PATCH] Tests: Add scroll to view long benchmark graph legend Pull Request: https://projects.blender.org/blender/blender/pulls/128339 --- tests/performance/api/graph.template.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/performance/api/graph.template.html b/tests/performance/api/graph.template.html index a69c5936328..7f54796ba12 100644 --- a/tests/performance/api/graph.template.html +++ b/tests/performance/api/graph.template.html @@ -119,6 +119,14 @@ var chart = new google.charts.Bar(chart_div); chart.draw(transposeDataTable(data), options); } + + /* Auto scale chart elements to display full SVG. */ + google.visualization.events.addListener(chart, 'ready', function () { + var allSvg = document.getElementsByTagName("svg"); + for (var index = 0; index < allSvg.length; index++) { + allSvg[index].setAttribute('height', allSvg[index].getBBox().height); + } + }); } }