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

Scatter shape size treated as pixels, not dp #5370

Open
tgvoskuilen opened this issue Jan 3, 2023 · 0 comments
Open

Scatter shape size treated as pixels, not dp #5370

tgvoskuilen opened this issue Jan 3, 2023 · 0 comments

Comments

@tgvoskuilen
Copy link

Summary
The value passed to setScatterShapeSize on ScatterDataSet is not converted from dp to pixels in the shape renderers (e.g. CircleShapeRenderer) so the value is treated as a size in pixels, not dp. The scatter shape hole size, however, is correctly converted from dp to pixels. This is present in all the scatter shape renderers.

Expected Behavior
All sizes are in dp (as indicated in comments and documentation).

Possible Solution
Convert value from dp to pixels in the scatter shape renderers. e.g. change

final float shapeSize = dataSet.getScatterShapeSize();

to

final float shapeSize = Utils.convertDpToPixel(dataSet.getScatterShapeSize());

in all the renderers.

Device (please complete the following information):

  • Library Version 3.1.0

Additional Context
I will submit a PR for this

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

1 participant