feat: add volatility to candlestick plot#397
Conversation
|
This PR contains changes to files that affect the model layer and unit tests. Before merging, please ensure:
|
|
braille.ts & navigation.ts changes are a result of linter change |
|
This PR contains changes to files that affect the model layer and unit tests. Before merging, please ensure:
|
There was a problem hiding this comment.
Pull Request Overview
This pull request adds volatility as a first-class navigation segment in candlestick charts, allowing users to directly navigate to the volatility value (high - low) for each candle. The implementation treats volatility as the primary navigation stop when moving upward from the lower boundary, following a data-driven navigation order of [volatility, ...value-sorted OHLC].
- Added volatility property to CandlestickPoint interface and computed volatility values
- Implemented volatility-first navigation ordering with robust boundary handling
- Enhanced navigation logic to support null segment states for boundary management
Reviewed Changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/type/grammar.ts | Adds required volatility property to CandlestickPoint interface |
| src/model/candlestick.ts | Implements volatility navigation with computed values, updated segment ordering, and enhanced boundary handling logic |
jooyoungseo
left a comment
There was a problem hiding this comment.
Test B (Braille) representation between this branch and main. This PR has broken the B representation.
|
This PR contains changes to files that affect the model layer and unit tests. Before merging, please ensure:
|
|
@jooyoungseo Professor, I have added row based min/max for candlestick plots, please let me know if the functionality is fine. Thanks |
jooyoungseo
left a comment
There was a problem hiding this comment.
Let’s round the volatility values to two decimal places.
|
This PR contains changes to files that affect the model layer and unit tests. Before merging, please ensure:
|
|
This PR contains changes to files that affect the model layer and unit tests. Before merging, please ensure:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds volatility as a first-class navigation segment to candlestick charts, enabling users to directly access volatility values (high - low) alongside traditional OHLC data. The change implements data-driven navigation where volatility becomes the first segment in the navigation order, followed by value-sorted OHLC segments.
- Added volatility computation and navigation support to candlestick charts
- Updated type definitions to include required volatility property
- Modified braille service to support per-row min/max values for improved accessibility
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/type/grammar.ts | Added required volatility property to CandlestickPoint interface |
| src/service/braille.ts | Enhanced braille encoder to support array-based min/max values for better accessibility |
| src/model/candlestick.ts | Implemented volatility as navigable segment with data-driven navigation order |
| eslint.config.ts | Updated ignore patterns for GitHub directory |
|
This PR contains changes to files that affect the model layer and unit tests. Before merging, please ensure:
|
|
This PR contains changes to files that affect the model layer and unit tests. Before merging, please ensure:
|
|
🎉 This PR is included in version 3.20.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Pull Request
Description
Volatility as a First-Class Navigation Segment:
Volatility (high - low) is now included as a dedicated, accessible segment in candlestick chart navigation.
Users can directly navigate to the volatility value for each candle, just like OHLC segments.
Data-Driven Navigation Order:
Navigation order is now [volatility, ...value-sorted OHLC] for each candle.
Volatility is always the first stop when navigating UPWARD from the lower boundary.
Robust Boundary Handling:
When at the lower boundary, pressing UPWARD re-enters at the volatility segment.
When at the upper boundary, pressing DOWNWARD re-enters at the highest value segment (typically 'high').
Related Issues
Closes #394
Changes Made
src/model/candlestick.ts
Added volatility as a computed property for each candle and included it as the first segment in the navigation order.
Updated navigation logic to treat volatility as a first-class, accessible stop: UPWARD from the lower boundary always lands on volatility, and all navigation is data-driven.
Implemented robust boundary handling and re-entry logic, ensuring volatility is always accessible and navigation is symmetric at both boundaries.
src/type/grammar.ts
Updated the CandlestickPoint type to include a required volatility: number property, ensuring type safety and consistent access to volatility values throughout the codebase.
Checklist
ManualTestingProcess.md, and all tests related to this pull request pass.