Akash Bisariya
Akash Bisariya

Reputation: 4754

Chart YAxis moving up and down in mpandroid line chart

I am getting stream of values with 10ms interval from the usb device. And I am setting the chart data by using buffer of 10 values from the sensor.

if (mFilterDataBuffer.size >= 10) {
     for (i in it.indices) {
         addEntry(mFilterDataBuffer[i])
     }
     mFilterDataBuffer = DoubleArray(0)
}

Its working fine when not using the setScaleMinima function but when i use it as below -

lineChart.setScaleMinima(1f, 30f)

The line chart start moving up down.

Please help me in resolving this issue. I have also tried setting min and max value for YAxis but there is no effect of that in chart.

Upvotes: 0

Views: 28

Answers (0)

Related Questions