show warning when too many points in status grid (#34456)

This commit is contained in:
Ryan McKinley 2021-05-19 23:46:39 -07:00 committed by GitHub
parent 812dac140e
commit a9c0b08ac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,18 @@ export const StatusGridPanel: React.FC<TimelinePanelProps> = ({
);
}
// Status grid requires some space between values
if (frames[0].length > width / 2) {
return (
<div className="panel-empty">
<p>
Too many points to visualize properly. <br />
Update the query to return fewer points. <br />({frames[0].length} points recieved)
</p>
</div>
);
}
return (
<TimelineChart
theme={theme}