Skip to content

Commit 6bfe379

Browse files
authored
Merge pull request #1888 from colinl/remove_wasted_title_space
Remove wasted space above chart title and adjust legend and grid
2 parents e578b20 + 8298445 commit 6bfe379

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ui/src/widgets/ui-chart/UIChart.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ export default {
206206
const options = {
207207
title: {
208208
text: this.props.label,
209+
top: 0,
209210
textStyle: {
210211
color: textColor
211212
}
@@ -215,7 +216,7 @@ export default {
215216
},
216217
legend: {
217218
show: showLegend,
218-
top: this.hasTitle ? 40 : 0,
219+
top: this.hasTitle ? 30 : 0,
219220
textStyle: {
220221
color: textColor
221222
}
@@ -229,6 +230,7 @@ export default {
229230
const options = {
230231
title: {
231232
text: this.props.label,
233+
top: 0,
232234
textStyle: {
233235
color: textColor,
234236
fontSize: 12.5
@@ -242,11 +244,11 @@ export default {
242244
left: '3%',
243245
right: '4%',
244246
bottom: '0%',
245-
top: this.hasTitle ? (this.props.showLegend ? 70 : 40) : (this.props.showLegend ? 30 : 0)
247+
top: this.hasTitle ? (this.props.showLegend ? 70 : 30) : (this.props.showLegend ? 40 : 0)
246248
},
247249
legend: {
248250
show: showLegend,
249-
top: this.hasTitle ? 40 : 0,
251+
top: this.hasTitle ? 30 : 0,
250252
textStyle: {
251253
color: textColor
252254
}

0 commit comments

Comments
 (0)