Skip to content

1052437: Fixed blazor toolkit chart rendering issue in SSR - #66

Open
Yokesh-SF4393 wants to merge 2 commits into
mainfrom
1052437-SSR
Open

1052437: Fixed blazor toolkit chart rendering issue in SSR#66
Yokesh-SF4393 wants to merge 2 commits into
mainfrom
1052437-SSR

Conversation

@Yokesh-SF4393

@Yokesh-SF4393 Yokesh-SF4393 commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Bug description

With Blazor interactivity set to none (Static SSR), Syncfusion charts did not render correctly or at all. Interactive modes were fine.

Root cause

Static SSR has no OnAfterRenderAsync or reliable DOM measurement. Layout and child renderers depended on post-render hooks and JS, so the first (and only) server pass never finished size, series, axis, or decoration rendering.

Solution description

Detect SSR via IsStaticServerRendering(), set default SVG size (e.g. 600×450), run layout through SetDefaultRendererValues / HandleChartSizeChange from BuildRenderTree / Prerender, and keep all interactive-only behavior behind SSR checks.

Review Changes:

  • Updated marker renderer creation to respect Marker.Visible and DataLabel.Visible, preventing unnecessary SSR component instantiation.
  • Removed the unused SfChart parameter from CreateSeriesNestedElements and updated its call sites.
  • Removed SSR render-queue re-entry from ChartMarker.SetDefaultRendererValues().
  • Added explicit exception filters and DEBUG diagnostics for disposal/SSR exception handling.
  • Updated marker SSR rendering to allow only the initial static pass before honoring RendererShouldRender.
  • Documented synchronous ProcessData() and Prerender() ordering in static chart initialization.

Code Studio usage(Mandatory)

  • Code Studio used in this PR/MR?

    • Yes
    • No
  • If Yes: Primary use (choose one)

    • Generate new code
    • Refactor/improve existing code
    • Tests
    • Bug fix / debugging help
    • Docs / comments
    • Review assistance (explanations/summaries)
    • Other:
  • Outcome

    • Saved time
    • Neutral
    • Cost time
  • If “Cost time” explain in short (1 or 2 lines):

Impact assessment

  • Low - Affects a single feature with minimal user impact
  • Medium - Affects multiple features or has moderate user impact
  • High - Critical functionality or significant user impact

Reason for not identifying earlier

Previously the SSR support is given, but it was not working properly, now fixed.

Areas tested against this fix

Breaking changes

  • Yes (Tag breaking-issue)
  • No

If yes, provide breaking commit details link and migration guidance.

Regression testing

  • Verified fix doesn't reintroduce previous bugs
  • Checked edge cases and error scenarios

Action taken to prevent recurrence

  • Added/updated unit tests
  • Other (specify): _________________
  • NA

Automation status

  • BUnit (provide PR link: _________________)
  • Playwight (provide PR link: _________________)
  • NA

Cross-platform verification

  • Blazor Server
  • Blazor WASM
  • NA

Related issues

Is this issue present in EJ2 or other components?

  • Resolved in EJ2 (PR link: _________________)
  • Created task for EJ2 (Task link: _________________)
  • Needs attention in other components (tag needs-attention-coreteam)
  • NA

Output screenshots

image

API changes

  • New API added (API Review task link: _________________)
  • Existing API renamed/modified (API Review task link: _________________)
  • No API changes

Performance verification

  • Verified no memory leaks introduced
  • Verified no performance degradation
  • Not applicable

Reviewer Checklist

  • Reviewed the provided Code Studio usages related information.
  • Code changes follow component guidelines
  • All provided information reviewed and verified
  • Solution addresses the root cause effectively

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

CI Summary

Job Status
bUnit (.NET 8 / 9 / 10) ✅ Passed
Playwright ✅ Passed
NuGet vulnerability scan ✅ Passed
ESLint security ✅ Passed
XSS / unsafe markup scan ✅ Passed

Overall: ✅ All checks passed

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

CI Summary

Job Status
bUnit (.NET 8 / 9 / 10) ✅ Passed
Playwright ✅ Passed
NuGet vulnerability scan ✅ Passed
ESLint security ✅ Passed
XSS / unsafe markup scan ✅ Passed

Overall: ✅ All checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants