Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can BarChartDataEntry with multiple Y values render icon once instead of for each Y value? #4225

Closed
1 task done
ben-r-cc opened this issue Nov 20, 2019 · 1 comment
Closed
1 task done

Comments

@ben-r-cc
Copy link

What did you do?

ℹ Created a BarChartDataEntry with multiple Y values and an icon.

What did you expect to happen?

BarChartView renders the icon once per BarChartDataEntry, something like this:
Simulator Screen Shot - iPhone 11 Pro Max - 2019-11-19 at 12 02 23

What happened instead?

BarChartView renders the icon once per Y value.
Simulator Screen Shot - iPhone 11 Pro Max - 2019-11-19 at 13 07 32

Charts Environment

Charts version/Branch/Commit Number:
3.4.0
Xcode version:
11.0
Swift version:
5
Platform(s) running Charts:
iPhone
macOS version running Xcode:
N/A

Demo Project

chartsTest.zip

@liuxuan30
Copy link
Member

liuxuan30 commented Mar 5, 2020

by default, draw icon and draw values are the same behavior. however, you can tweak the code so to only draw one icon. the function you should look for is open override func drawValues(context: CGContext)in BarChartRenderer

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

No branches or pull requests

2 participants