Improve chart
This commit is contained in:
@ -23,7 +23,8 @@ export default Vue.extend({
|
||||
methods: {
|
||||
render() {
|
||||
this.renderChart(this.data, mergeOptions({
|
||||
responsive: false,
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
xAxes: [{
|
||||
type: 'time',
|
||||
|
@ -30,7 +30,9 @@
|
||||
<a @click="span = 'day'">%i18n:@per-day%</a> | <a @click="span = 'hour'">%i18n:@per-hour%</a>
|
||||
</div>
|
||||
</header>
|
||||
<x-chart v-if="chart" :data="data[0]" :opts="data[1]" :width="720" :height="300"/>
|
||||
<div>
|
||||
<x-chart v-if="chart" :data="data[0]" :opts="data[1]"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -139,7 +141,7 @@ export default Vue.extend({
|
||||
return [{
|
||||
datasets: [{
|
||||
label: local ? 'Local Notes' : 'Remote Notes',
|
||||
fill: false,
|
||||
fill: true,
|
||||
borderColor: '#f6584f',
|
||||
borderWidth: 2,
|
||||
pointBackgroundColor: '#fff',
|
||||
@ -160,7 +162,7 @@ export default Vue.extend({
|
||||
return [{
|
||||
datasets: [{
|
||||
label: local ? 'Local Users' : 'Remote Users',
|
||||
fill: false,
|
||||
fill: true,
|
||||
borderColor: '#f6584f',
|
||||
borderWidth: 2,
|
||||
pointBackgroundColor: '#fff',
|
||||
@ -181,7 +183,7 @@ export default Vue.extend({
|
||||
return [{
|
||||
datasets: [{
|
||||
label: local ? 'Local Drive Usage' : 'Remote Drive Usage',
|
||||
fill: false,
|
||||
fill: true,
|
||||
borderColor: '#f6584f',
|
||||
borderWidth: 2,
|
||||
pointBackgroundColor: '#fff',
|
||||
@ -238,4 +240,9 @@ export default Vue.extend({
|
||||
> *:last-child
|
||||
margin-left auto
|
||||
|
||||
> div
|
||||
> *
|
||||
display block
|
||||
height 300px
|
||||
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user