-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
speedometer division control of values #35
Comments
Hello @EPapadopoulou , for ticks issue, it doesn't support ... it can be considered in the next version. |
Hi! Thanks for the quick reply. That's not what I meant. I did not explain it well enough. I understand how to setup the lowSpeedPercent and mediumSpeedPercent to reflect what I want and I've already done that. What I really want is to have the gauge to function in a logarithmic scale. i.e. I want the values between 0 and 2000 to cover most of the gauge. |
mmmm, unfortunately, this kind of speedometer doesn't supported 😞 . any suggestions !! |
Actually, that's what I was thinking of. I was going to create my own image so that the appropriate values are displayed and I was going to calculate the values with speedTo. However, I will not be able to control the value displayed in the center. |
After you build your own image, build costum speedometer by extends Image Speedometer and override @Override
protected float getDegreeAtSpeed(float speed) {
int maxDegree = getEndDegree() - getStartDegree();
// calculate your degree, must be between [0, maxDegree]
float degree = ....;
// we add startDegree to make sure our degree between startDegree and endDegree.
return degree + getStartDegree();
} I hope it will help... |
since version 1.1.6 you can change tick label as you wish use OnPrintTickLabel : speedometer.setOnPrintTickLabel(new OnPrintTickLabel() {
@Override
public String getTickLabel(int tickPosition, int tick) {
if(tick >= 1000)
return String.format(Locale.getDefault(), "%.1f Km", tick / 1000f);
return String.format(Locale.getDefault(), "%d M", tick);
}
}); this will show 1km instead of showing 1000m 👍 |
@anastr 1.4.0(kotlin) should open |
Hi @wenmin92 speedometer.setTicks(0, 2, 5, 10, 25, 50, 75, 150, 300) Or maybe you need Custom Tick Label |
this kind of behavior will not be implemented, since you can add it in ImageSpeedometer, Custom Ticks, Custom Tick Label and |
Hi, great work with the speedometers!
I have a question/request!
Example: Given the following: minSpeed=0, maxSpeed=20000, lowSpeedPercent=50, mediumSpeedPercent=35, can we have the low zone between the values 0 and 1000, the medium zone between 1000 and 2000 and the high zone between 2000 and 20000?
Also, is it possible to assign labels to the ticks? For example, instead of showing 1000m, I would like to show 1km!
Thanks in advance!
The text was updated successfully, but these errors were encountered: