Add finance charting surface - #427
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Greptile SummaryThe PR adds a composable finance-charting surface across the Python API, binary payload pipeline, Reflex adapter, and browser renderer.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the prior pane-overflow issue is fixed by allocating the main plot, collapsed gaps, and lower panes from one bounded height budget, with a browser regression covering the reported three-pane case.
|
| Filename | Overview |
|---|---|
| js/src/50_chartview.ts | Adds finance-layer rendering and a bounded pane allocator; the previous three-pane short-chart overflow is fixed by shrinking gaps and pane heights within the available budget. |
| js/src/40_gl.ts | Adds dedicated WebGL candlestick/OHLC shaders and fixed attribute bindings. |
| js/src/57_layers.ts | Adds finance-layer rendering for studies, drawings, volume panes, and oscillators. |
| python/xy/finance.py | Implements finance components, indicators, risk calculations, and serializable layer specifications. |
| python/xy/_payload.py | Extends binary payload emission for the new finance mark geometry and layer metadata. |
| python/reflex_xy/assets/XYChart.jsx | Preserves and forwards finance chart layers and tool payloads through the Reflex client adapter. |
| tests/test_ui_issue_regressions.py | Adds a browser regression proving three lower panes remain ordered, visible, and contained in a 150 px plot budget. |
Reviews (3): Last reviewed commit: "Keep finance panes within short charts" | Re-trigger Greptile
bced203 to
92e092e
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
Why
XY needs a Python-native finance surface that composes with the existing chart and Reflex APIs without overloading the base candlestick mark. Studies, drawings, panes, and tool state remain independent layers over the same renderer and binary transport.
User and developer impact
Python users can compose finance charts from the public XY component API. Reflex users can publish state-dependent finance figures while keeping large market arrays out of Reflex state.
The pre-existing example applications are unchanged from
main; this PR contains no example-app or notebook changes.Validation
Draft scope
The core Tier-1 finance surface is present. Interactive drawing creation/editing, persistence, session-aware axes, finance-bar streaming, and broader indicator/alternative-chart coverage remain follow-up work documented in
docs/quant-finance-roadmap.md.This supersedes #1, which GitHub could not reopen after its head branch was force-pushed/recreated.