The right scale was crowding: prior-day levels, session VWAP and five daily moving averages competing with the live price and hand-drawn intraday levels. Daily and session context moves left, and the right is left for intraday. A price scale takes its range from the series on it, so moving levels across would have drawn them against a different range and put them at the wrong height — the failure this codebase has already paid for once. A transparent candlestick mirror on the left scale gives it exactly the same input as the right. Verified in a browser: the same price maps to the identical y coordinate through both scales, a delta of zero pixels. Prior-day levels move; hand-drawn price levels stay on the right, since those are the intraday markers the space is being cleared for. priceScaleId is fixed when a series is created, so it is passed at construction and left out of the options reapplied afterwards. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app.js | ||
| chart.js | ||
| index.html | ||
| style.css | ||