Add title for Y axis
This commit is contained in:
parent
87f486c770
commit
7e8ac44078
3 changed files with 19 additions and 11 deletions
|
|
@ -117,3 +117,7 @@ hr {
|
||||||
.card-narrow {
|
.card-narrow {
|
||||||
padding: 5px !important;
|
padding: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-margin {
|
||||||
|
margin-bottom: 20px !important;
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="card card-default">
|
<div class="card card-default card-margin">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h5>Histogram</h5>
|
<h5>Histogram</h5>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -31,7 +31,6 @@ const DEFAULT_BIN_SIZE = 1;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Histogram',
|
name: 'Histogram',
|
||||||
props: ['title', 'dkey'],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null,
|
chart: null,
|
||||||
|
|
@ -80,19 +79,28 @@ export default {
|
||||||
data: {
|
data: {
|
||||||
labels: this.times,
|
labels: this.times,
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: this.title,
|
// label: 'Number of events',
|
||||||
data: this.values,
|
|
||||||
backgroundColor: "rgba(153,51,255,0.4)"
|
backgroundColor: "rgba(153,51,255,0.4)"
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
animation: false,
|
animation: false,
|
||||||
legend: {
|
legend: {
|
||||||
display: false
|
display: false,
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
xAxes: [{
|
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 {
|
.small {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="card card-default">
|
<div class="card card-default card-margin">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h5>Location</h5>
|
<h5>Location</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue