Add area fill support to DataStreamer#5023
Merged
swharden merged 3 commits intoScottPlot:mainfrom Aug 8, 2025
manaruto:fill-area-datastreamer
Merged
Add area fill support to DataStreamer#5023swharden merged 3 commits intoScottPlot:mainfrom manaruto:fill-area-datastreamer
swharden merged 3 commits intoScottPlot:mainfrom
manaruto:fill-area-datastreamer
Conversation
- Add FillY properties matching Scatter class API (FillY, FillYValue, FillYAboveColor, FillYBelowColor) - Implement two-tone fill rendering for areas above/below baseline - Add GetSegments() method to IDataStreamerView interface - Update Wipe and Scroll renderers to expose segment structure - Handle partial buffers correctly during initial streaming BREAKING CHANGE: IDataStreamerView interface now requires GetSegments() method implementation
Member
|
Hi @manaruto, this is really complicated - thanks so much for this PR! The video is helpful too. Merging now 🚀 |
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.
This PR adds area fill functionality to the DataStreamer class, bringing it to feature parity with the Scatter plot type. Users can now visualize streaming data with filled areas above and below a baseline value.
Fix Filled curve with DataStreamer? #4948
1-DataStreamer Class
Added fill properties matching the Scatter class API:
2-Modified Render() method to:
Query the renderer for data segments via new GetSegments() method
Draw area fills for each segment before the renderer draws lines
Handle separate above/below coloring relative to the baseline
Properly handle partial buffers during initial data streaming
3-IDataStreamerView Interface
Added GetSegments() method that returns IReadOnlyList<Pixel[]>
This allows renderers to expose their segment structure for proper fill rendering
IReadOnlyList<Pixel[]> GetSegments(RenderPack rp);4-Wipe and Scroll Renderers
Implemented GetSegments() in both renderers to return pixel arrays representing the visual segments
Refactored Render()
BREAKING CHANGE: IDataStreamerView interface now requires GetSegments() method implementation
fill-stream.mp4