From c338445363ec3e99a682961a11501110b8cf336a Mon Sep 17 00:00:00 2001
From: Frank Sauerburger <frank@sauerburger.com>
Date: Thu, 7 Jan 2021 18:15:30 +0100
Subject: [PATCH] Make ratio plot conditional

---
 uhepp-js/src/components/UheppHist.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/uhepp-js/src/components/UheppHist.jsx b/uhepp-js/src/components/UheppHist.jsx
index 5185d41..d15e1c0 100644
--- a/uhepp-js/src/components/UheppHist.jsx
+++ b/uhepp-js/src/components/UheppHist.jsx
@@ -757,6 +757,7 @@ const UheppHist = ({width, height, uhepp}) => {
 					/>
 				</Group>
 
+    { (post_uhepp.ratio && post_uhepp.ratio.length > 0) &&
 		<Group top={margin.top + margin.sep + yMax} left={margin.left}>
          <g clipPath="url(#ratio-clip)">
            <Ratio
@@ -852,7 +853,7 @@ const UheppHist = ({width, height, uhepp}) => {
             tickLength={4}
 						tickTransform="translate(0, 4)"
 					/>
-        </Group>
+        </Group> }
 			</svg>
   </div>
 	)
-- 
GitLab