如何在iOS图表中创建气球标记器xib视图?

huangapple go评论83阅读模式
英文:

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.
如何在iOS图表中创建气球标记器xib视图?

Second image is here
如何在iOS图表中创建气球标记器xib视图?

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
英文:

如何在iOS图表中创建气球标记器xib视图?

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

huangapple
  • 本文由 发表于 2020年1月6日 21:37:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/59613110.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定