I am using LineChart for plotting realtime data. I need to display custom value for the Range Tick labels. For example if the Range value is 600, I need to display it as 6mv. Could someone please suggest me a solution?
Asked
Active
Viewed 71 times
1 Answers
1
Assuming the conversion you want to use is simply value / 100:
plot.setRangeValueFormat(new Format() {
@Override
public StringBuffer format(Object object, StringBuffer buffer, FieldPosition field) {
Number value = (Number) object;
buffer.append(value.doubleValue() / 100 + "mv");
return buffer;
}
@Override
public Object parseObject(String string, ParsePosition position) {
return null;
}
});

Nick
- 8,181
- 4
- 38
- 63