watchOS 的图表图像框架:YOChartImageKit
YOChartImageKit 是用于 watchOS 的图表图像框架。
Configuration
Followng section describes the way to draw charts.
If you want to try YOChartImageKit, openYOChartImageKit.xcodeproj. Eample applications are available for iOS and watchOS.
Line chart
solid
let image = YOLineChartImage() image.strokeWidth = 4.0 // width of line image.strokeColor = randomColor() // color of line image.values = [0.0, 1.0, 2.0] // chart values image.smooth = false // disable smooth line image.drawImage(frame, scale: scale) // draw a image
smooth
let image = YOLineChartImage() image.strokeWidth = 4.0 // width of line image.fillColor = randomColor() // color of area image.values = [0.0, 1.0, 2.0] // chart values // image.smooth = true // [default] draws a smooth line image.drawImage(frame, scale: scale) // draw a image
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!