Skip to content

Commit a7ed4b2

Browse files
committed
Provide width and height for sparkline
1 parent e4ef8d3 commit a7ed4b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/web_app/lib/src/widget/weekly_sparkline/widget.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ void create(HTMLElement element, Map<String, String> options) {
1515
}
1616

1717
final svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
18+
19+
// Safari needs these to render the svg.
20+
svg.setAttribute('height', '100%');
21+
svg.setAttribute('width', '100%');
22+
1823
element.append(svg);
1924

2025
final toolTip = HTMLDivElement()

0 commit comments

Comments
 (0)