PhilJay / MPAndroidChart

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Other
37.62k stars 9.02k forks source link

smooth line ILineDataSet #3639

Open Itay-M opened 6 years ago

Itay-M commented 6 years ago

Hi, I'm using v3.0.2 for real-time plotting in android, and I need to smooth the chart's line (the noise from the sensors). I understand that I need to use lineDataSet.setDrawCubic(boolean enabled); or lineDataSet.setMode(LineDataSet.Mode.CUBIC_BEZIER); or lineDataSet.setCubicIntensity(0.2f); for that, but those methods does'nt exist when I try to access them on my ILineDataSet object. Any suggestion for how can I smooth my chart's line?

Itay-M commented 6 years ago

pleaseeee, any suggestions?

Phocacius commented 5 years ago

They exist in LineDataSet, not in the Interface ILineDataSet. Check if your dataSet is a LineDataSet, then cast and invoke the methods there.