<RadzenSeriesDataLabels Visible="true" /> error #968

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

Originally created by @luzwales on GitHub (Aug 28, 2023).

if I set Visible set to ·true·, it will display error.
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] Unhandled exception in circuit 'CzdbmlPg68whS6aQvww29WMhlXqCGtgAGOaXesL9gZQ'. System.NullReferenceException: Object reference not set to an instance of an object. at Radzen.Blazor.CartesianSeries1.GetDataLabels(Double offsetX, Double offsetY)
at Radzen.Blazor.RadzenLineSeries1.GetDataLabels(Double offsetX, Double offsetY) at Radzen.Blazor.RadzenSeriesDataLabels.<Render>b__17_0(RenderTreeBuilder builder) at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment) at Radzen.Blazor.CartesianSeries1.<>c__DisplayClass71_0.b__0(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
at Radzen.Blazor.RadzenChart.b__113_2(RenderTreeBuilder __builder2)
at Microsoft.AspNetCore.Components.CascadingValue1.Render(RenderTreeBuilder builder) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)

if I set Visible="false", it is OK. and I set

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Alternatively link your repo with a sample project that can be run.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Originally created by @luzwales on GitHub (Aug 28, 2023). if I set <RadzenSeriesDataLabels Visible="true" /> Visible set to ·true·, it will display error. `fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] Unhandled exception in circuit 'CzdbmlPg68whS6aQvww29WMhlXqCGtgAGOaXesL9gZQ'. System.NullReferenceException: Object reference not set to an instance of an object. at Radzen.Blazor.CartesianSeries`1.GetDataLabels(Double offsetX, Double offsetY) at Radzen.Blazor.RadzenLineSeries`1.GetDataLabels(Double offsetX, Double offsetY) at Radzen.Blazor.RadzenSeriesDataLabels.<Render>b__17_0(RenderTreeBuilder builder) at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment) at Radzen.Blazor.CartesianSeries`1.<>c__DisplayClass71_0.<RenderOverlays>b__0(RenderTreeBuilder builder) at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment) at Radzen.Blazor.RadzenChart.<BuildRenderTree>b__113_2(RenderTreeBuilder __builder2) at Microsoft.AspNetCore.Components.CascadingValue`1.Render(RenderTreeBuilder builder) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)` if I set Visible="false", it is OK. and I set <RadzenSeriesDataLabels Visible="true" OffsetX="0" OffsetY="0"/> <!-- ![image](https://github.com/radzenhq/radzen-blazor/assets/56030373/d4ff5508-20d6-4a76-aaf8-b80a5b191c11) IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can report your issue or ask us a question via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. Specify all the steps required to reproduce the issue or link a project which reproduces it easily (without requiring extra steps such as restoring a database). --> **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error Alternatively link your repo with a sample project that can be run. **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] **Additional context** Add any other context about the problem here.
Author
Owner

@enchev commented on GitHub (Aug 28, 2023):

Tried here both declared statically and runtime and didn't get any error:
https://blazor.radzen.com/line-chart

@enchev commented on GitHub (Aug 28, 2023): Tried here both declared statically and runtime and didn't get any error: https://blazor.radzen.com/line-chart
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#968