We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1afa801 commit ee9f1c8Copy full SHA for ee9f1c8
1 file changed
apps/webapp/app/components/primitives/charts/ChartRoot.tsx
@@ -140,7 +140,8 @@ function ChartRootInner({
140
}
141
142
/**
143
- * Hook to check if all data in the visible range is empty (zero or null).
+ * Hook to check if all data in the visible range is empty (null or undefined).
144
+ * Zero values are considered valid data and will render.
145
* Useful for rendering "no data" states.
146
*/
147
export function useHasNoData(): boolean {
@@ -152,7 +153,7 @@ export function useHasNoData(): boolean {
152
153
return data.every((item) => {
154
return dataKeys.every((key) => {
155
const value = item[key];
- return value === 0 || value === null || value === undefined;
156
+ return value === null || value === undefined;
157
});
158
159
}, [data, dataKeys]);
0 commit comments