diff --git a/plugins/woocommerce-admin/client/components/chart/index.js b/plugins/woocommerce-admin/client/components/chart/index.js index acf380b0097..4168f5727bd 100644 --- a/plugins/woocommerce-admin/client/components/chart/index.js +++ b/plugins/woocommerce-admin/client/components/chart/index.js @@ -7,7 +7,7 @@ import classNames from 'classnames'; import { Component, createRef, Fragment } from '@wordpress/element'; import { decodeEntities } from '@wordpress/html-entities'; import { formatDefaultLocale as d3FormatDefaultLocale } from 'd3-format'; -import { get, isEmpty, isEqual, partial } from 'lodash'; +import { get, isEqual, partial } from 'lodash'; import Gridicon from 'gridicons'; import { IconButton, NavigableMenu, SelectControl } from '@wordpress/components'; import { interpolateViridis as d3InterpolateViridis } from 'd3-scale-chromatic'; @@ -263,7 +263,6 @@ class Chart extends Component { yFormat = '.0f'; break; } - const showChart = ! isRequesting && ! isEmpty( visibleData ); return (
@@ -308,7 +307,7 @@ class Chart extends Component { ref={ this.chartBodyRef } > { isViewportWide && legendDirection === 'column' && legend } - { ! showChart && ( + { isRequesting && ( { __( 'Your requested data is loading', 'wc-admin' ) } @@ -316,7 +315,7 @@ class Chart extends Component { ) } - { showChart && + { ! isRequesting && width > 0 && (