diff --git a/src/ui/public/visualize/visualize.js b/src/ui/public/visualize/visualize.js
index 243cc9ffae4ef..33772b61e38a7 100644
--- a/src/ui/public/visualize/visualize.js
+++ b/src/ui/public/visualize/visualize.js
@@ -50,6 +50,7 @@ uiModules
 
       let getVisEl = getter('.visualize-chart');
       let getVisContainer = getter('.vis-container');
+      let getSpyContainer = getter('.visualize-spy-container');
 
       // Show no results message when isZeroHits is true and it requires search
       $scope.showNoResultsMessage = function () {
@@ -76,13 +77,16 @@ uiModules
 
       let applyClassNames = function () {
         let $visEl = getVisContainer();
+        const $spyEl = getSpyContainer();
         let fullSpy = ($scope.spy.mode && ($scope.spy.mode.fill || $scope.fullScreenSpy));
 
         $visEl.toggleClass('spy-only', Boolean(fullSpy));
+        $spyEl.toggleClass('only', Boolean(fullSpy));
 
         $timeout(function () {
           if (shouldHaveFullSpy()) {
             $visEl.addClass('spy-only');
+            $spyEl.addClass('only');
           };
         }, 0);
       };
diff --git a/src/ui/public/visualize/visualize.less b/src/ui/public/visualize/visualize.less
index 05858172b3d69..0819dd98b9996 100644
--- a/src/ui/public/visualize/visualize.less
+++ b/src/ui/public/visualize/visualize.less
@@ -95,8 +95,8 @@ visualize-spy {
     margin-right: 5px;
   }
 
-  &.only {
-    .visualize-spy-container {
+  .visualize-spy-container {
+    &.only {
       height: auto;
     }
   }