|
Start Linear Meter with a minor tick |
Posted by Dean D. on Aug-29-2012 06:52 |
|
I'm setting up a vertical linear meter to show temperature.
The minimum value will be -5 and the Max will be 105.
My major ticks will be 10 degree increments with minor ticks at 5 degrees.
When I set this all up using setScale(-5,105,10,5) I close to what I want but what I really
want is for -5 to be a minor tick and 0 to be a major tick so my major ticks are
0,10,20,30, etc...
Then 105 at the top would be a minor tick.
You'd only see labels for the 0,10,20,30 etc...
I'be been playing around with all sorts of parameters but can't produce the results I'm
looking for.
Any suggestions out there?
Thanks. |
Re: Start Linear Meter with a minor tick |
Posted by Peter Kwan on Aug-30-2012 00:40 |
|
Hi Dean,
One method is to simply supply the labels you want to use as an array, using "-" to represent minor ticks. It is like (in Java):
String[] labels = {"-", "0", "-", "10", "-", "20", "-", "30", "-", "40", "-", "50",
"-", "60", "-", "70", "-", "80", "-", "90", "-", "100", "-"};
m.setScale(-5, 105, labels);
Hope this can help.
Regards
Peter Kwan |
|