Skip to content

Commit e64f399

Browse files
authored
FIREFLY-1627: Merge PR #1678 from FIREFLY-1627-filter-order-plot
FIREFLY-1627: filtering on spectral plots with >1 order causes chaos
2 parents 0503b27 + c8a38d5 commit e64f399

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/firefly/js/charts/ui/ChartPanel.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,20 @@ ChartPanelView.propTypes = {
6060
};
6161

6262

63+
64+
6365
const ResizableChartAreaInternal = React.memo((props) => {
64-
const {errors, Chart, size}= props;
66+
const {errors, Chart, size, chartData}= props;
6567
const {width:widthPx, height:heightPx}= size;
6668
const knownSize = widthPx && heightPx;
6769

6870
if (!knownSize) return <div/>;
6971

72+
const hasData = chartData?.data?.length > errors?.length;
73+
7074
return (
7175
<Stack id='chart-resizer' height={1} width={1} sx={{flexGrow:1, position:'absolute', overflow:'hidden', inset:0}}>
72-
{errors.length || isUndefined(Chart) ?
76+
{!hasData || isUndefined(Chart) ?
7377
<ErrorPanel errors={errors}/> :
7478
<Chart {...Object.assign({}, props, {widthPx, heightPx})}/>
7579
}

0 commit comments

Comments
 (0)