fix(market): show min/max markers on share chart#6410
Merged
Conversation
Decouple min/max marker rendering from gesture handling so the non-interactive share chart shows high/low circles and labels just like the details page. Also bump entry/latest price font size on the perps position share poster from 13sp to 14sp for better legibility.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the market share chart rendering so min/max markers (circles + labels) can be displayed even when the chart is non-interactive, and slightly increases font size on the perps position share poster for readability.
Changes:
- Add a
showMinMaxMarkersparameter toLineChartand use it to control min/max marker rendering independently of gesture handling. - Enable min/max markers for the non-interactive market share chart call site.
- Increase entry/latest price text size from 13sp to 14sp on the perps position share poster layout.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/src/main/res/layout/item_perps_position_share_poster.xml | Bumps entry/latest price font sizes for improved poster legibility. |
| app/src/main/java/one/mixin/android/ui/home/market/Market.kt | Passes showMinMaxMarkers = true when rendering the chart from the Market screen. |
| app/src/main/java/one/mixin/android/ui/home/market/LineChart.kt | Introduces showMinMaxMarkers and gates min/max marker drawing/labels on it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| onHighlightChange: ((Int) -> Unit)? = null, | ||
| showMinMaxMarkers: Boolean = onHighlightChange != null, | ||
| ) { | ||
| val (dataPoints, minIndex, maxIndex) = normalizeValues(dataPointsData, normalizedMaxRange = if (showMinMaxMarkers) null else 1f) |
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.
Decouple min/max marker rendering from gesture handling so the non-interactive share chart shows high/low circles and labels just like the details page.
Also bump entry/latest price font size on the perps position share poster from 13sp to 14sp for better legibility.