英文:
How to create Balloon Marker xib View in ios-charts?
问题
我有一个XIB用来显示图表上的多个数据,但我没有设置气球标记,当点击最后一个点时,屏幕截取了我的XIB。这里附上截图以更好地理解我的问题。
第二张图片在这里。
谢谢提前帮助。
英文:
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.
Thanks In Advance
答案1
得分: 1
请使用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
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论