Styling to charts for better formatting of size for mobile.

This commit is contained in:
2020-01-23 00:21:36 +01:00
parent f103547e6b
commit 2a34a3e421
2 changed files with 19 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div>
<canvas ref="win-chart" width="100" height="50"></canvas>
<div class="chart">
<canvas ref="win-chart"></canvas>
</div>
</template>
@@ -64,6 +64,7 @@ export default {
type: "bar",
data: chartdata,
options: {
maintainAspectRatio: false,
title: {
display: true,
text: "Antall vinn"
@@ -94,9 +95,14 @@ export default {
<style lang="scss" scoped>
@import "../styles/media-queries.scss";
@include mobile {
canvas {
.chart {
height: 40vh;
@include mobile {
position: relative;
width: 90vw !important;
height: 50vh;
margin-bottom: 2rem;
}
}
</style>