in my case is: first you just override getOffset() in your customMarkerView class and return MPPointF(-(width / 2f), -height.toFloat())
after that, set chart view into MarkerView.chartView.
in my case like this.
val marker=CustomMarkerView(requireContext(),R.layout.custom_market_view,dataMarker) marker.chartView = binding.chartDiscover