Skip to content

Commit 5d9c3d5

Browse files
committed
fix(graph): fixed issue with y-axis labels overlapping with the yaxis, fixes grafana#4626
1 parent ed62822 commit 5d9c3d5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* **App Config**: Fixed app config issue showing content of other app config, fixes [#4575](https://github.com/grafana/grafana/issues/4575)
1010
* **Graph Panel**: Fixed legend option max not updating, fixes [#4601](https://github.com/grafana/grafana/issues/4601)
1111
* **Graph Panel**: Fixed issue where newly added graph panels shared same axes config, fixes [#4582](https://github.com/grafana/grafana/issues/4582)
12+
* **Graph Panel**: Fixed issue with axis labels overlapping Y-axis, fixes [#4626](https://github.com/grafana/grafana/issues/4626)
1213

1314
# 3.0.0-beta2 (2016-04-04)
1415

public/app/plugins/panel/graph/graph.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ function (angular, $, moment, _, kbn, GraphTooltip) {
151151
}
152152

153153
function processOffsetHook(plot, gridMargin) {
154-
if (panel.yaxis) { gridMargin.left = 20; }
155-
if (panel.rightYAxisLabel) { gridMargin.right = 20; }
154+
var left = panel.yaxes[0];
155+
var right = panel.yaxes[1];
156+
if (left.show && left.label) { gridMargin.left = 20; }
157+
if (right.show && right.label) { gridMargin.right = 20; }
156158
}
157159

158160
// Function for rendering panel

0 commit comments

Comments
 (0)