MPAndroidChart
MPAndroidChart copied to clipboard
Scatter shape size treated as pixels, not dp
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