Feature/indicator horizontal line#1902
Open
PhilippHGerber wants to merge 2 commits intoimaNNeo:mainfrom
Open
Conversation
- Added `showHorizontalLine` and `indicatorHorizontalLine` to `TouchedSpotIndicatorData` - Fallback: if `indicatorHorizontalLine` is null, it defaults to `indicatorBelowLine` - Updated `LineChartPainter.drawTouchedSpotsIndicator` to render horizontal line - Added unit test in `line_chart_painter_test.dart` - Updated example in `line_chart_sample12.dart` to demonstrate new feature
Owner
|
Hi, such a coincidence! So I suggest to use the same approach that we have in CandlestickChart |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1902 +/- ##
==========================================
+ Coverage 92.43% 92.46% +0.03%
==========================================
Files 46 46
Lines 3344 3358 +14
==========================================
+ Hits 3091 3105 +14
Misses 253 253
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
This PR adds support for an optional horizontal indicator line in
LineChart.What's included
TouchedSpotIndicatorData:showHorizontalLine: enables horizontal indicator line renderingindicatorHorizontalLine: defines the horizontal line's appearanceindicatorHorizontalLineis null,indicatorBelowLineis usedLineChartPainter.drawTouchedSpotsIndicatorline_chart_sample12.dartline_chart.mdScreenshot
Line Chart Sample 12 with horizontal indicator line
Let me know if anything should be adjusted.