• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Android GraphView show double

Akamecyan

Lurker
Hello guys, i trying to show in graph view double data in Y axis and when i put for example 4.65 in graph i see only 65 like integer.
the following commands i tryed.
Double Voltage = cursor.getDouble( cursor.getColumnIndex("Voltage") );
series.appendData(new DataPoint(xLastVlue, Voltage * 10d), true, 40);
series.appendData(new DataPoint(xLastVlue, Voltage), true, 40);

Thanks you alot.
 
which line is Y-axis?
private void startTimer() {
handler = new Handler();
handler.postDelayed(timer = new Runnable() {
@override
public void run() {
Cursor cursor = databaseHelper.GetLastParameters();
cursor.moveToLast();
try {
xLastVlue++;
Double Voltage = cursor.getDouble( cursor.getColumnIndex("Voltage") );
Double Current = cursor.getDouble(cursor.getColumnIndex("FlowCurrent"));
series.appendData(new DataPoint(xLastVlue, Voltage * 10d), true, 40);
series2.appendData(new DataPoint(xLastVlue, Current * 10d), true, 40);

} catch (Exception e) {
e.printStackTrace();
}

handler.postDelayed(this, Delay_Timer);



}
}, Delay_Timer);
}
 
Back
Top Bottom