Skip to content

Commit 39f507a

Browse files
committed
Restore displaying Y-axis label
Plotly.js version 3.0.0 dropped support for the deprecated options that we were using. Fixes 7006983
1 parent 3b4bd65 commit 39f507a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/munin-plot.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ $(document).ready(function () {
162162
size: 10,
163163
color: '#7f7f7f'
164164
},
165-
titlefont: {
166-
size: 10,
167-
color: '#7f7f7f'
165+
title: {
166+
font: {
167+
size: 10,
168+
color: '#7f7f7f'
169+
}
168170
},
169171
exponentformat: 'SI',
170172
hoverformat: '.4s'
@@ -427,7 +429,7 @@ $(document).ready(function () {
427429
// prepare the graph configuration
428430
const layout = JSON.parse(JSON.stringify(baseLayout))
429431
if (plot.graph.graph_vlabel) {
430-
layout.yaxis.title = plot.graph.graph_vlabel
432+
layout.yaxis.title.text = plot.graph.graph_vlabel
431433
}
432434
if (plot.graph.graph_args && plot.graph.graph_args.match(/--logarithmic/)) {
433435
layout.yaxis.type = 'log'

0 commit comments

Comments
 (0)