Update chart label when there are no docs (#217569)

Update chart label when there are no docs

Closes https://github.com/elastic/streams-program/issues/250

### Before
<img width="967" alt="image"
src="https://github.com/user-attachments/assets/2e26b631-4a8a-46a2-80d1-c29f77fec969"
/>


### After
<img width="943" alt="image"
src="https://github.com/user-attachments/assets/5e2cd7a2-4624-4c3a-9968-4121198fd3df"
/>
This commit is contained in:
Giorgos Bamparopoulos 2025-04-09 13:46:29 +01:00 committed by GitHub
parent 751e44d5da
commit 411aa9928a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -141,7 +141,7 @@ export function StreamChartPanel({ definition }: StreamChartPanelProps) {
};
const docCount = docCountFetch?.value?.details.count;
const formattedDocCount = docCount ? formatNumber(docCount, 'decimal0') : '-';
const formattedDocCount = docCount ? formatNumber(docCount, 'decimal0') : '0';
return (
<EuiPanel hasShadow={false} hasBorder>