Skip to content

Commit d3b7d70

Browse files
committed
Fix chart height by wrapping canvas in sized container
1 parent 0e3c13d commit d3b7d70

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

bench/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,12 @@ <h2>Performance Over Time</h2>
234234
title.textContent = groupName;
235235
card.appendChild(title);
236236

237+
var wrapper = document.createElement('div');
238+
wrapper.style.position = 'relative';
239+
wrapper.style.height = '260px';
237240
var canvas = document.createElement('canvas');
238-
canvas.height = 260;
239-
card.appendChild(canvas);
241+
wrapper.appendChild(canvas);
242+
card.appendChild(wrapper);
240243
container.appendChild(card);
241244

242245
var labels = entries.map(function (e) {

0 commit comments

Comments
 (0)