Androidplot: How can have integer data labels?

280 views Asked by At

This is probably very simple, but I cannot find it in the online documentation. I have a data plot with integer range values on a floating point domain (Integer function of time). Using

plot.setRangeValueFormat(new DecimalFormat("#"));

I obtain integer labels on the side of the graph. But I still get one decimal place in the label on the data points instead of integers, e.g. "100.0". How can I obtain integer values only, e.g. "100" ?

1

There are 1 answers

0
eduardo92 On

For me it works like this:

  • If you want data with floating point—i.e., 100.0—then DELETE that line plot.setRangeValueFormat(new DecimalFormat("#")); from your code.

  • If you just want integer data—i.e., 100—then keep (include) that line plot.setRangeValueFormat(new DecimalFormat("#")); in your code.