Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the replacement for setDrawCubic() which is deprecated for MPAndroidChart?

Answer: If you are using MPAndroidChart and still using setDrawCubic() method which is deprecated, the solution is to use :

public enum Mode {
    LINEAR,
    STEPPED,
    CUBIC_BEZIER,
    HORIZONTAL_BEZIER
 }

Which is defined in the LineDataSet.java class in the library.

mySet.setMode(LineDataSet.Mode.CUBIC_BEZIER);

So next time dont use mySet.setDrawCubic(true); just use the above and the desired enum value.

like image 428
Sijan Gurung Avatar asked Sep 15 '16 09:09

Sijan Gurung


1 Answers

Now you have to use:

dataSet.setMode(LineDataSet.Mode.CUBIC_BEZIER);
like image 200
Ricardo Avatar answered Nov 16 '22 14:11

Ricardo