MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

Fix scatter shape size bug

Open tgvoskuilen opened this issue 3 years ago • 1 comments

Scatter shape sizes were not converted from dp to pixels in the shape renderers so they were drawn at inconsistent size on different density screens.

PR Checklist:

  • [x] I have tested this extensively and it does not break any existing behavior.
  • [x] I have added/updated examples and tests for any new behavior.
  • [x] If this is a significant change, an issue has already been created where the problem / solution was discussed: [issue link]

PR Description

Scatter shape size was treated as pixels instead of dp. This is a bug and leads to inconsistent appearance on different density screens. This is also inconsistent with other places (e.g. scatter hole size or line chart marker size) where values were properly treated as dp.

This change fixes the scatter shape renderers so they scale the user-specified size from dp to pixels before drawing the marker.

Using pixels in just one place is a bug. This may cause existing chart markers to change size - and users who were pre-scaling this one dimension by density manually will have to remove that.

tgvoskuilen avatar Jan 03 '23 04:01 tgvoskuilen

It's included in https://github.com/AppDevNext/AndroidChart/releases/tag/3.1.0.15

hannesa2 avatar Jan 09 '23 14:01 hannesa2