Add Layer and Rectangle components to Recharts#6729
Conversation
Wrap the Recharts Layer (SVG <g> grouping) and Rectangle (SVG shape) components, which are used as building blocks for constructing custom node elements. Exposed as rx.recharts.layer and rx.recharts.rectangle. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XqtAPUo84EBNq6c8Ext3mC
Greptile SummaryThis PR adds Recharts wrappers for custom SVG node construction. The main changes are:
Confidence Score: 5/5This looks safe to merge after a small API-doc cleanup.
packages/reflex-components-recharts/src/reflex_components_recharts/general.py Important Files Changed
Reviews (1): Last reviewed commit: "feat(recharts): add Layer and Rectangle ..." | Re-trigger Greptile |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a5ebe831e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Type of change
New Feature Submission
This PR adds two new Recharts components to support constructing custom node elements:
Layer: A wrapper around the RechartsLayercomponent that renders an SVG<g>element for grouping other SVG elements.Rectangle: A shape component for rendering rectangles with full support for positioning, sizing, styling, and animation properties.Changes
packages/reflex-components-recharts/src/reflex_components_recharts/general.py:Layerclass with tag"Layer"and alias"RechartsLayer"Rectangleclass with comprehensive properties:x,ywidth,height,radiusfill,fill_opacity,stroke,stroke_widthis_animation_active,is_update_animation_active,animation_begin,animation_duration,animation_easinglayerandrectanglefactory functionspackages/reflex-components-recharts/src/reflex_components_recharts/__init__.py:Layer,layer,Rectangle, andrectangleto the public APItests/units/components/recharts/test_general.py(new file):LayerrenderingLayerwith children (nestingRectangle)RectanglerenderingRectanglewith all supported propertiespackages/reflex-components-recharts/news/+layer_rectangle.feature.md(new file):Testing
test_general.pycovering component creation, rendering, and property handlingChecklist
pyi_hashes.jsonupdated for modified.pyifileshttps://claude.ai/code/session_01XqtAPUo84EBNq6c8Ext3mC