enable chart canvas responsiveness
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class="chart-container">
|
||||
<canvas id={{elementID}} width="100%" height="100%"></canvas>
|
||||
<div class="chart-container" fxLayout="column" fxLayoutAlign="space-around">
|
||||
<canvas id={{elementID}} width="100px" height="100px"></canvas>
|
||||
<div class="center">{{count}}</div>
|
||||
</div>
|
||||
@@ -1,6 +1,8 @@
|
||||
.chart-container {
|
||||
position: relative;
|
||||
}
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.center {
|
||||
position: absolute;
|
||||
@@ -8,5 +10,5 @@
|
||||
top: 40%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-size:1.8rem;
|
||||
}
|
||||
@@ -49,8 +49,8 @@ export class DonutChartComponent {
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
cutoutPercentage: 70,
|
||||
responsive: false,
|
||||
cutoutPercentage: 75,
|
||||
responsive: true,
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
@@ -62,4 +62,4 @@ export class DonutChartComponent {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user