From 0cb1aac8b90dee07929390e56a5394cad5e6610b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Fri, 15 Feb 2019 11:50:41 +0100 Subject: [PATCH] Fix logic used to show legend total block (https://github.com/woocommerce/woocommerce-admin/pull/1559) --- .../packages/components/src/chart/d3chart/legend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/legend.js b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/legend.js index 5dbaa1ccaae..3e8f63f8c38 100644 --- a/plugins/woocommerce-admin/packages/components/src/chart/d3chart/legend.js +++ b/plugins/woocommerce-admin/packages/components/src/chart/d3chart/legend.js @@ -61,7 +61,7 @@ class D3Legend extends Component { } = this.props; const { isScrollable } = this.state; const numberOfRowsVisible = data.filter( row => row.visible ).length; - const showTotalLabel = legendDirection === 'column' && data.length > numberOfRowsVisible && totalLabel; + const showTotalLabel = legendDirection === 'column' && data.length > selectionLimit && totalLabel; const visibleKeys = data.filter( key => key.visible );