How to get zoomed chart width?
I want the width of my view to be equal to the real line chart width (with zoom). I set visible x range. And try to get width with many ways. I tried:
chartBitmap.width * scaleX.toInt() and
viewPortHandler.contentWidth() * scaleX.toInt() and
val coefficient = xChartMax / visibleXRange val chartWidth = resources.displayMetrics.widthPixels * coefficient
But I can't make my horizontal scroll bar content width to be equal with my line chart witdh. How can I do this trick?
PS: Cant't upload image. You can see it in my question on stackoverflow: https://stackoverflow.com/questions/64317308/mpandroidchart-how-to-get-zoomed-chart-width
@pesiik did you find a way to achieve this?