目录
目录README.md

SimpleLineChart

Releases Versions Platform License

Description

SLC SLC Styled

SimpleLineChart is a simple, lightweight line chart library for iOS. It provides an easy-to-use interface to create customizable line charts with a few lines of code. The library supports customizable styles. It’s a great option for developers who need to quickly add line charts to their iOS apps without the overhead of a larger, more complex charting library.

Usage

Setting up the chart

    let values: [SLCData] = [SLCData(x: 0, y: 5),
                             SLCData(x: 1, y: 7),
                             SLCData(x: 2, y: 9)]

    let lineChart = SimpleLineChart()

    let dataSet = SLCDataSet(graphPoints: values)
    lineChart.loadPoints(dataSet: dataSet)

Styling the chart background

    let chartStyle = SLCChartStyle(backgroundGradient: false,
                                   solidBackgroundColor: .white)
    lineChart.setChartStyle(chartStyle: chartStyle)

Styling the chart line

    let lineStyle = SLCLineStyle(lineColor: .blue,
                                 lineStroke: 3.0,
                                 circleDiameter: 5.0,
                                 lineShadow: true,
                                 lineShadowgradientStart: .blue,
                                 lineShadowgradientEnd: .white)
    dataSet.setLineStyle(lineStyle)

Installation

Swift Package Manager
dependencies: [
    .package(url: "https://github.com/augarte/SimpleLineChart.git", .upToNextMajor(from: "1.0.0"))
]
CocoaPods
pod 'SimpleLineChart'

Example

Example app can be found on the following repository SLCExampleApp

License

SimpleLineChart is available under the GPL license. See the LICENSE for more info.

关于
157.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号