Skip to content
Snippets Groups Projects
Commit 029e8e1e authored by Naab, Daniel James's avatar Naab, Daniel James
Browse files

Set width/height to container's size - fixes IE sizing bug

parent 98db6d62
No related branches found
No related tags found
No related merge requests found
......@@ -266,7 +266,11 @@ const timeSeriesGraph = function (elem) {
.append('svg')
.attr('xmlns', 'http://www.w3.org/2000/svg')
.classed('hydrograph-svg', true)
.call(link((elem, layout) => elem.attr('viewBox', `0 0 ${layout.width + layout.margin.left + layout.margin.right} ${layout.height + layout.margin.top + layout.margin.bottom}`), layoutSelector))
.call(link((elem, layout) => {
elem.attr('viewBox', `0 0 ${layout.width + layout.margin.left + layout.margin.right} ${layout.height + layout.margin.top + layout.margin.bottom}`);
elem.attr('width', layout.width);
elem.attr('height', layout.height);
}, layoutSelector))
.call(link(addSVGAccessibility, createStructuredSelector({
title: titleSelector,
description: descriptionSelector,
......
......@@ -40,7 +40,7 @@ const renderToRespone = function (res, {siteID, parameterCode, compare, renderer
</script>
</head>
<body>
<div class="wdfn-component" data-component="hydrograph" data-options=${JSON.stringify(componentOptions)}>
<div class="wdfn-component" data-component="hydrograph" data-options='${JSON.stringify(componentOptions)}'>
<div class="graph-container"></div>
</div>
<script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment