How to create Balloon Marker xib View in ios-charts?

1.7k views Asked by At

i have XIB to display multiple data show on chart. but i do't set ballon mark and when click last point screen cut in my XIB. here attach to screenshot to better understand my issue. enter image description here

Second image is here enter image description here

Thanks In Advance

1

There are 1 answers

4
Himanshu Patel On

enter image description here

Please use it BalloonMarker.swift https://github.com/danielgindi/Charts/blob/master/ChartsDemo-iOS/Swift/Components/BalloonMarker.swift

let marker:BalloonMarker = BalloonMarker(color: UIColor.black, font: UIFont(name: "Montserrat-Medium", size: 12)!, textColor: UIColor.white, insets: UIEdgeInsets(top: 7.0, left: 7.0, bottom: 7.0, right: 7.0))
 marker.chartView = lineChartView
 marker.minimumSize = CGSize(width: 75.0, height: 50.0)
 lineChartView.marker = marker
 lineChartView.drawMarkers = true