Skip to content

Commit

Permalink
Merge pull request #52 from openearth/feat/fix-metocean-svgs
Browse files Browse the repository at this point in the history
fix svg
  • Loading branch information
CindyvdVries authored Jan 22, 2020
2 parents fd1d576 + a33c237 commit 69680ee
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions components/graph-line.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
>
{{ title }}
</figcaption>
<div v-if="!isCollapsed" class="graph-line__aspect-ratio">
<div
v-if="!isCollapsed"
class="graph-line__aspect-ratio"
:class="{ image: type === 'images' }"
>
<v-chart
v-if="type === 'line' || type === 'scatter'"
:ref="title"
Expand All @@ -29,12 +33,11 @@
height="100%"
class="graph-line__chart"
/>
<object
<img
v-if="type === 'images'"
id="graphImage"
:data="imageUrl"
:src="imageUrl"
class="graph-line__chart"
type="image/svg+xml"
/>
<ui-button class="download-btn" kind="quiet" @click="download()"
>DOWNLOAD</ui-button
Expand Down Expand Up @@ -248,10 +251,14 @@ export default {
</script>

<style>
.graph-line__aspect-ratio.image {
height: 600px;
}
#graphImage {
background-image: url('../assets/not-found.png');
background-repeat: no-repeat;
background-size: 50% 100%;
height: 600px;
}
.echarts {
Expand All @@ -270,6 +277,7 @@ export default {
padding-top: 50%;
position: relative;
padding-top: 60%;
height: ;
}
.graph-line__chart {
Expand Down

0 comments on commit 69680ee

Please sign in to comment.