Skip to content

fix(market): show min/max markers on share chart#6410

Merged
crossle merged 3 commits into
masterfrom
fix/market-share-chart-min-max-markers
May 26, 2026
Merged

fix(market): show min/max markers on share chart#6410
crossle merged 3 commits into
masterfrom
fix/market-share-chart-min-max-markers

Conversation

@SeniorZhai
Copy link
Copy Markdown
Member

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.

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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 showMinMaxMarkers parameter to LineChart and 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)
@crossle crossle merged commit 61e4d72 into master May 26, 2026
2 checks passed
@crossle crossle deleted the fix/market-share-chart-min-max-markers branch May 26, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants