Radzen Blazor Chart Series when CategoryProperty not set chart axis rendering is not falling back to using Data row Index for X chart values (positions) #1056

Open
opened 2026-01-29 17:48:24 +00:00 by claunia · 0 comments
Owner

Originally created by @PRIMETSS on GitHub (Dec 9, 2023).

Describe the bug
Radzen Blazor Chart states that if

CategoryProperty - the name of the property which provides value for the X axis of the chart. The property can be string, Date or numeric. If not set RadzenChart will use the index of the data item as its X axis value.

Here

To Reproduce
Can reproduce easily from examples-docs page with the Chart example at https://blazor.radzen.com/line-chart
Remove the CategoryProperty or set to CategoryProperty=""

Expected behavior
Expect X values to be automatically generated as Index position value when Enumerating the Data array
As per below & screen shot.

This feature is convenient when the data set is a simple list of single property values

Screenshots
image
After Remove X values should fall back to using the 'Data Row' index for X and go in sequence 0, 1, 2, 3, 4, ..... 10 (etc)
image

Desktop (please complete the following information):

  • Dotnet v8
  • Version [4.23.1] Radzen Blazor Components
Originally created by @PRIMETSS on GitHub (Dec 9, 2023). **Describe the bug** Radzen Blazor Chart states that if `CategoryProperty - the name of the property which provides value for the X axis of the chart. The property can be string, Date or numeric. If not set RadzenChart will use the index of the data item as its X axis value.` [Here](https://blazor.radzen.com/chart-series#:~:text=CategoryProperty,X%20axis%20value.) **To Reproduce** Can reproduce easily from examples-docs page with the Chart example at [https://blazor.radzen.com/line-chart](https://blazor.radzen.com/line-chart) Remove the CategoryProperty or set to `CategoryProperty=""` **Expected behavior** Expect X values to be automatically generated as Index position value when Enumerating the Data array As per below & screen shot. This feature is convenient when the data set is a simple list of single property values **Screenshots** ![image](https://github.com/radzenhq/radzen-blazor/assets/11331370/672473d8-6b85-44a3-94a2-6ec9dd3ff974) After Remove X values should fall back to using the 'Data Row' index for X and go in sequence 0, 1, 2, 3, 4, ..... 10 (etc) ![image](https://github.com/radzenhq/radzen-blazor/assets/11331370/7b23f4ef-2a09-43b1-a97a-704f704046f9) **Desktop (please complete the following information):** - Dotnet v8 - Version [4.23.1] Radzen Blazor Components
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1056