Skip to content
Snippets Groups Projects
Commit 0f7bf21e authored by Jonathan Foucher's avatar Jonathan Foucher
Browse files

tweak display

parent 54f68a00
No related branches found
No related tags found
No related merge requests found
Pipeline #30288 failed
<template> <template>
<div class="graph-element row"> <div class="graph-element row">
<div class="graph-legend col-3 mr-0 pr-0"> <div class="graph-legend col-3 mr-0 pr-0 text-muted">
<span :title="fullLabel">{{singleData.labels[0]}}</span> <span :title="fullLabel">{{singleData.labels[0]}}</span>
</div> </div>
<div class="col-9 ml-0 pl-0"> <div class="col-9 ml-0 pl-0">
<Bar :height="200" :width="150" :chart-data="singleData" :chart-options="options" /> <Bar :height="180" :width="150" :chart-data="singleData" :chart-options="options" />
</div> </div>
</div> </div>
</template> </template>
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
x: { x: {
grid: { grid: {
display: false, display: false,
drawBorder: false,
}, },
ticks : { ticks : {
display: false, display: false,
...@@ -46,6 +47,7 @@ export default { ...@@ -46,6 +47,7 @@ export default {
y: { y: {
grid: { grid: {
display: false, display: false,
drawBorder: false,
}, },
ticks : { ticks : {
display:false, display:false,
...@@ -60,11 +62,11 @@ export default { ...@@ -60,11 +62,11 @@ export default {
return this.chartData.labels[this.index] return this.chartData.labels[this.index]
}, },
singleData() { singleData() {
let label = this.chartData.labels[this.index].match(/.{1,50}(\s|$)/g) let label = this.chartData.labels[this.index].match(/.{1,45}(\s|$)/g)
if (label.length > 1) { if (label.length > 1) {
label = label[0] + '...' label = label[0].trim() + '...'
} else { } else {
label = label[0]; label = label[0].trim();
} }
return { return {
...@@ -90,6 +92,8 @@ export default { ...@@ -90,6 +92,8 @@ export default {
} }
.graph-legend { .graph-legend {
writing-mode:vertical-rl; writing-mode:vertical-rl;
max-height: 200px; max-height: 180px;
margin-right: -0.5em !important;
text-align: center;
} }
</style> </style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment