watchOS 的圖表圖像框架:YOChartImageKit

jopen 9年前發布 | 12K 次閱讀 圖表/報表制作 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

watchOS 的圖表圖像框架:YOChartImageKit

項目主頁:http://www.baiduhome.net/lib/view/home/1437535258318

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!