watchOS 的图表图像框架:YOChartImageKit

jopen 9年前

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.open-open.com/lib/view/home/1437535258318