[PR #813] [MERGED] Pie and Donut render errors #2333

Open
opened 2026-01-29 18:18:19 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/813
Author: @paulo-rico
Created: 2/13/2023
Status: Merged
Merged: 2/14/2023
Merged by: @akorchev

Base: masterHead: master


📝 Commits (4)

  • 9467b38 Pie and Donut render errors
  • 073a687 Take into account negative values. Added property ItemsGreaterZero
  • 23f0f59 Moved ItemsGreaterZero to RadzenPieSeries
  • 111d485 Rename the property and set it once to avoid multiple allocations.

📊 Changes

5 files changed (+110 additions, -60 deletions)

View changed files

📝 Radzen.Blazor/CartesianSeries.cs (+1 -1)
📝 Radzen.Blazor/RadzenDonutSeries.razor (+21 -10)
📝 Radzen.Blazor/RadzenPieSeries.razor (+32 -22)
📝 Radzen.Blazor/RadzenPieSeries.razor.cs (+48 -22)
📝 Radzen.Blazor/RadzenSeriesDataLabels.razor (+8 -5)

📄 Description

As per issue Issue / Forum Entry

Working demo

Checks for instances where sum of data = 0 and draws an empty circle rather than nothing (this was causing rendering errors in the browser where some of the values were NaN).

Whilst looking at this, there were also render errors when drawing data labels. These have been resolved.

Also found an error during testing when Data was set to a null object, i.e. DataItem[] revenue; These will also render as an empty circle rather crashing (crashing, not browser rendering error).

Regards

Paul Ruston


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/813 **Author:** [@paulo-rico](https://github.com/paulo-rico) **Created:** 2/13/2023 **Status:** ✅ Merged **Merged:** 2/14/2023 **Merged by:** [@akorchev](https://github.com/akorchev) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (4) - [`9467b38`](https://github.com/radzenhq/radzen-blazor/commit/9467b384c85f4e397f962b36b64d5fdb93e5c4c0) Pie and Donut render errors - [`073a687`](https://github.com/radzenhq/radzen-blazor/commit/073a687b6da6d170a64ae9d585e11a8b31196db5) Take into account negative values. Added property ItemsGreaterZero - [`23f0f59`](https://github.com/radzenhq/radzen-blazor/commit/23f0f59298bd6b6c916e928c2b0d52c40f179f45) Moved ItemsGreaterZero to RadzenPieSeries - [`111d485`](https://github.com/radzenhq/radzen-blazor/commit/111d485dbe20f91c24090024f3624913054b3407) Rename the property and set it once to avoid multiple allocations. ### 📊 Changes **5 files changed** (+110 additions, -60 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/CartesianSeries.cs` (+1 -1) 📝 `Radzen.Blazor/RadzenDonutSeries.razor` (+21 -10) 📝 `Radzen.Blazor/RadzenPieSeries.razor` (+32 -22) 📝 `Radzen.Blazor/RadzenPieSeries.razor.cs` (+48 -22) 📝 `Radzen.Blazor/RadzenSeriesDataLabels.razor` (+8 -5) </details> ### 📄 Description As per issue [Issue](https://github.com/radzenhq/radzen-blazor/issues/810#issue-1581898242) / [Forum Entry](https://forum.radzen.com/t/radzendonut-series-display-error-when-items-in-collection-are-zero/13007) [Working demo](http://radzen.delaci.co.uk/) Checks for instances where sum of data = 0 and draws an empty circle rather than nothing (this was causing rendering errors in the browser where some of the values were NaN). Whilst looking at this, there were also render errors when drawing data labels. These have been resolved. Also found an error during testing when Data was set to a null object, i.e. DataItem[] revenue; These will also render as an empty circle rather crashing (crashing, not browser rendering error). Regards Paul Ruston --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:18:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2333