feat: add smooth freehand drawing with continuous drawing mode#779
Open
benoist wants to merge 41 commits intoklinecharts:mainfrom
Open
feat: add smooth freehand drawing with continuous drawing mode#779benoist wants to merge 41 commits intoklinecharts:mainfrom
benoist wants to merge 41 commits intoklinecharts:mainfrom
Conversation
Feat (Flexible zoom behaviour): Implement flexible zoom anchor point behavior setting api
Flexible zoom behaviour
Feat support set barspace limit
…o allow parse to heikin_ashi
…urn hiekin ashi if required
Author
|
I left freePath option in as extension, as I believe these are on the same level as the other extension in this library and helps to test the code. |
Feat heikin ashi bars
…ay cause incorrect display
Co-authored-by: Abdulbasit Mamman <basttyy@gmail.com>
- Add continuous drawing mode for overlays (click-drag-release pattern) - Implement smooth freehand drawing with sub-pixel precision using float indices - Add precise timestamp interpolation for drawings to persist across timeframe changes - Support drawing beyond the last candle (extrapolation into future) - Add freePath overlay for freehand drawing - Add lineCap/lineJoin support for smooth stroke rendering New methods in Store: - floatIndexToTimestamp(): converts float indices to interpolated timestamps - timestampToFloatIndex(): converts precise timestamps back to float indices
156fdf3 to
b2ba3a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
freePathoverlay for freehand drawing with click-and-dragfloatIndexToTimestampandtimestampToFloatIndexmethods for precise timestamp interpolationChanges
src/component/Overlay.ts: AdddrawingModeproperty and continuous drawing methodssrc/view/OverlayView.ts: Handle continuous drawing events and float index renderingsrc/Store.ts: AddcoordinateToFloatIndex,floatIndexToTimestamp,timestampToFloatIndexsrc/extension/overlay/freePath.ts: New freehand drawing overlaysrc/extension/figure/line.ts: AddlineCapandlineJoinsupportTest plan