Skip to content
项目

关于

极其轻量的可动画化柱状图,使用 Swift 5.0 和 XCode 10.2 编写。

学习与教育

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

BarChart

This is an extremely light-weight, animatable bar chart. The main objective is to help iOS developers to learn how to create their own charts from scratch without using any third-party libraries.

It is created along with a tutorial on Medium: Tutorial on Medium

Demo

demo

Usage

let chart = BeautifulBarChart(frame: CGRect(x: 0, y: 0, width: 200, height: 300))
let dataEntries = [
    DataEntry(color: UIColor.red, height: 0.2, textValue: "20", title: "Some title"),
    DataEntry(color: UIColor.green, height: 0.7, textValue: "70", title: "Some title")
]
chart.updateDataEntries(dataEntries: dataEntries, animated: true)
self.view.addSubview(chart) // Assuming that you are writing this code inside a view controller

Authors

Minh Nguyen, [email protected]

License

BarChart is available under the MIT license. See the LICENSE file for more info.

探索相关项目

加载中…