RadzenDonut chart display error when items in serie are zero #729

Closed
opened 2026-01-29 17:42:21 +00:00 by claunia · 1 comment
Owner

Originally created by @Shinigami9000 on GitHub (Feb 13, 2023).

Bug Description:

The radzen donut series throws a errors in the dev tool each time the given series (collection) has a value of 0 (zero).
Chart is trying to be drawn but has no default fall back method when the given series is empty. Bug was discoverd when building my own application. But the given bug is fully repreducible on the radzen demo components as shown in the below pictures.
demo error

demo variables

To reproduce the BUG

  1. go to https://blazor.radzen.com/donut-chart
  2. Click on 'Edit Source'
  3. Scroll down to '@code' and to the collection 'DataItem[]'
  4. Edit all 'Revenue' values in collection to 0 (Zero) (as shown in the above pictures)
  5. Select 'Run' in top left corner
  6. Wait for example page to load in
  7. Open Browser Dev Tool
  8. Navigate in Browser Dev Tool to 'console' tab to view errors

Expected behavior:
When all items in series have a value of 0 (zero) show an empty circle with no fill in (color) to indicate that the given series is empty.

Current behavior:
No circle is drawn and only the circle body text is shown and errors are displayed in browser dev tool

Reference to original Radzen forum Post:
https://forum.radzen.com/t/radzendonut-series-display-error-when-items-in-collection-are-zero/13007/5

Originally created by @Shinigami9000 on GitHub (Feb 13, 2023). Bug Description: The radzen donut series throws a errors in the dev tool each time the given series (collection) has a value of 0 (zero). Chart is trying to be drawn but has no default fall back method when the given series is empty. Bug was discoverd when building my own application. But the given bug is fully repreducible on the radzen demo components as shown in the below pictures. ![demo error](https://user-images.githubusercontent.com/58690140/218408175-856cd09e-9aa8-4ec7-b9d9-7ff16152776f.PNG) ![demo variables](https://user-images.githubusercontent.com/58690140/218406112-6736e32a-0c0c-4559-92ac-7e3a827052fe.PNG) To reproduce the BUG 1. go to https://blazor.radzen.com/donut-chart 2. Click on 'Edit Source' 3. Scroll down to '@code' and to the collection 'DataItem[]' 4. Edit all 'Revenue' values in collection to 0 (Zero) (as shown in the above pictures) 5. Select 'Run' in top left corner 6. Wait for example page to load in 7. Open Browser Dev Tool 8. Navigate in Browser Dev Tool to 'console' tab to view errors Expected behavior: When all items in series have a value of 0 (zero) show an empty circle with no fill in (color) to indicate that the given series is empty. Current behavior: No circle is drawn and only the circle body text is shown and errors are displayed in browser dev tool Reference to original Radzen forum Post: https://forum.radzen.com/t/radzendonut-series-display-error-when-items-in-collection-are-zero/13007/5
Author
Owner

@akorchev commented on GitHub (Feb 16, 2023):

Should be fixed in #813

@akorchev commented on GitHub (Feb 16, 2023): Should be fixed in #813
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#729