medusa
medusa copied to clipboard
BarSkin and BulletChartSkin draw incorrectly when min value is not zero
Bar skin always draws does not set the origin of the arc bar in the min value but in the zero value. The problem is in the following code line:
https://github.com/HanSolo/Medusa/blob/master/src/main/java/eu/hansolo/medusa/skins/BarSkin.java#L265
The following code line fixes the issue:
double angle = (gauge.getCurrentValue() - gauge.getMinValue()) * angleStep;
The same issue with BulletChartSkin. Here the code line with the issue:
https://github.com/HanSolo/Medusa/blob/master/src/main/java/eu/hansolo/medusa/skins/BulletChartSkin.java#L331
And here one possible way to fix it:
double currentValue = gauge.getCurrentValue() - gauge.getMinValue();