Add title for Y axis

This commit is contained in:
Darko Lukic 2018-03-26 23:54:08 +02:00
parent 87f486c770
commit 7e8ac44078
3 changed files with 19 additions and 11 deletions

View file

@ -116,4 +116,8 @@ hr {
.card-narrow {
padding: 5px !important;
}
.card-margin {
margin-bottom: 20px !important;
}

View file

@ -1,5 +1,5 @@
<template>
<div class="card card-default">
<div class="card card-default card-margin">
<div class="card-header">
<h5>Histogram</h5>
<div class="row">
@ -31,7 +31,6 @@ const DEFAULT_BIN_SIZE = 1;
export default {
name: 'Histogram',
props: ['title', 'dkey'],
data() {
return {
chart: null,
@ -80,19 +79,28 @@ export default {
data: {
labels: this.times,
datasets: [{
label: this.title,
data: this.values,
// label: 'Number of events',
backgroundColor: "rgba(153,51,255,0.4)"
}]
},
options: {
animation: false,
legend: {
display: false
display: false,
},
scales: {
xAxes: [{
display: false
display: false,
scaleLabel: {
display: true,
labelString: 'Time',
}
}],
yAxes: [{
scaleLabel: {
display: true,
labelString: 'Number of events'
}
}]
},
},
@ -105,8 +113,4 @@ export default {
.small {
font-size: 12px;
}
.card {
margin-bottom: 20px;
}
</style>

View file

@ -1,5 +1,5 @@
<template>
<div class="card card-default">
<div class="card card-default card-margin">
<div class="card-header">
<h5>Location</h5>
</div>