Skip to content

fix(dashboard): restore ResponsiveContainer in ChartContainer#535

Merged
GenerQAQ merged 1 commit intodevfrom
fix/dashboard-chart-responsive
Apr 1, 2026
Merged

fix(dashboard): restore ResponsiveContainer in ChartContainer#535
GenerQAQ merged 1 commit intodevfrom
fix/dashboard-chart-responsive

Conversation

@GenerQAQ
Copy link
Copy Markdown
Contributor

@GenerQAQ GenerQAQ commented Apr 1, 2026

Why we need this PR?

After the tooltip sync changes in #534, dashboard overview charts stopped rendering. The root cause is that the dashboard's ChartContainer was missing Recharts' ResponsiveContainer wrapper (present in the OSS version), which gives charts their dimensions. The ChartWrapper had a cloneElement workaround injecting responsive: true and inline styles, but this conflicted with how Recharts expects to manage sizing.

Describe your solution

  • Restore ResponsiveContainer wrapper in dashboard/components/ui/chart.tsx to match the OSS implementation
  • Restore the aspect-video CSS class for proper container sizing
  • Fix the children type to match ResponsiveContainer's expected children type
  • Remove the cloneElement hack in ChartWrapper that is no longer needed

Implementation Tasks

  • Restore ResponsiveContainer in ChartContainer
  • Add back aspect-video class
  • Remove cloneElement workaround in ChartWrapper
  • Clean up unused cloneElement import

Impact Areas

  • Dashboard
  • Client SDK (Python)
  • Client SDK (TypeScript)
  • Core Service
  • API Server
  • CLI Tool
  • Documentation
  • Other: ...

Checklist

  • Open your pull request against the dev branch.
  • All tests pass in available continuous integration systems (e.g., GitHub Actions).
  • Tests are added or modified as needed to cover code changes.

The dashboard's ChartContainer was missing Recharts' ResponsiveContainer
wrapper and the aspect-video CSS class, causing charts to render with no
dimensions. The ChartWrapper was using a cloneElement hack to compensate,
but this broke after tooltip sync changes.

Restore ResponsiveContainer and aspect-video to match the OSS
implementation, and remove the now-unnecessary cloneElement workaround.
@GenerQAQ GenerQAQ requested a review from a team as a code owner April 1, 2026 09:09
@GenerQAQ GenerQAQ merged commit ccb9af4 into dev Apr 1, 2026
1 check passed
@GenerQAQ GenerQAQ deleted the fix/dashboard-chart-responsive branch April 1, 2026 09:12
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.

1 participant