Android Shinobi crash because of Date DataPoint


#1

Hi,

I have the following code. Every time the code crash when i use Date DataPoint.  

DataAdapter<Date, Double> dataAdapter = new SimpleDataAdapter<Date, Double>();

Date resultdate = new Date(Long.parseLong(“1410341576000”));

Double val2 = Double.parseDouble(“90”);

Data<Date,Double> dataPoint = new DataPoint<Date,Double>

(resultdate, val2);

dataAdapter.add(dataPoint);

The error is:

Caused by: java.lang.IllegalStateException: Data invalid for assigned x/y axes.

What is the root cause?

Regards,

Victor


#2

Hi,

The problem is resolved. It happens because i was using NumberAxis instead of DateTimeAxis.

Regards,

Victor