Skip to content

Corrected touch target boundaries for various chart types#791

Open
venkatbhoogarbh wants to merge 3 commits into
AppDevNext:masterfrom
venkatbhoogarbh:fix/stacked-bar-highlighter
Open

Corrected touch target boundaries for various chart types#791
venkatbhoogarbh wants to merge 3 commits into
AppDevNext:masterfrom
venkatbhoogarbh:fix/stacked-bar-highlighter

Conversation

@venkatbhoogarbh

Copy link
Copy Markdown
Contributor

Fix: Corrected touch target boundaries and stack selection logic for Bar charts, Pie charts, Stack charts, and many more

@hannesa2

Copy link
Copy Markdown
Collaborator

Hm, I'm not sure if we bump minSdk to 24 only because of this. Please give me an argument to do so.

/home/runner/work/AndroidChart/AndroidChart/chartLib/src/main/kotlin/info/appdev/charting/renderer/BarChartRenderer.kt:60: Error: Call requires API level 24, or core library desugaring (current min is 23): java.lang.Iterable#forEach [NewApi]
        barData?.dataSets?.forEach {
                           ~~~~~~~

@hannesa2

Copy link
Copy Markdown
Collaborator

according to https://apilevels.com/
image

@venkatbhoogarbh

Copy link
Copy Markdown
Contributor Author

I changed it appropriately to use a standard for-in loop, preserving full API 23 compatibility. Thank you for pointing that out!

@hannesa2

hannesa2 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Thanks a lot for your afford. As forks can't makes screenshot compare test, I made a copy of this PR #794 to enable this.
Additional I'll invite you, then you can push to upstream and you can make pull requests with screenshot compare mechanism

@venkatbhoogarbh

Copy link
Copy Markdown
Contributor Author

Hello,

I have replaced the .forEach loops in both BubbleChartRenderer.kt and CandleStickChartRenderer.kt with standard for-in loops to ensure full backwards compatibility with API 23.

@hannesa2 hannesa2 force-pushed the fix/stacked-bar-highlighter branch from 492f046 to 793eb42 Compare June 22, 2026 13:54
@hannesa2

Copy link
Copy Markdown
Collaborator

I rebased it to recent master

@hannesa2

Copy link
Copy Markdown
Collaborator

Additional I'll invite you, then you can push to upstream and you can make pull requests with screenshot compare mechanism

Maybe this will simplify the pull request process

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.

2 participants