Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kubatruhlar/JTChartView
JTChartView is the new lightweight and fully customizable solution to draw a chart.
https://github.com/kubatruhlar/JTChartView
Last synced: 2 months ago
JSON representation
JTChartView is the new lightweight and fully customizable solution to draw a chart.
- Host: GitHub
- URL: https://github.com/kubatruhlar/JTChartView
- Owner: kubatruhlar
- License: mit
- Created: 2015-07-03T06:58:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-18T14:00:15.000Z (about 8 years ago)
- Last Synced: 2024-10-21T00:03:04.900Z (2 months ago)
- Language: Objective-C
- Homepage:
- Size: 145 KB
- Stars: 124
- Watchers: 7
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[![Version](https://img.shields.io/cocoapods/v/JTChartView.svg)](http://cocoapods.org/pods/JTChartView)
[![License](https://img.shields.io/cocoapods/l/JTChartView.svg)](http://cocoapods.org/pods/JTChartView)
[![Platform](https://img.shields.io/cocoapods/p/JTChartView.svg)](http://cocoapods.org/pods/JTChartView)# JTChartView
**JTChartView** is the new **lightweight and fully customizable solution** to **draw a curve** and fill the space underneath it with a **gradient**. The result is a **beautiful chart**.
## Installation
There are two ways to add the **JTProgressHUD** library to your project. Add it as a regular library or install it through **CocoaPods**.`pod 'JTChartView'`
You may also quick try the example project with
`pod try JTChartView`
**Library requires target iOS 7.0 and above**
> **Works in both - Portrait and Landscape modes**
## Usage and Customization
**JTChartView** is designed to be created in one initialization line of code. Core logic creates all layers and draws them into final **JTChartView**. You **MUST** create a **parent view** for that **JTChartView** to keep it working correctly.
### Simple example:
```objective-c
// Parent view (Whatever you need)
UIView *baseChartView = [[UIView alloc] initWithFrame:CGRectMake(30.0, 30.0, self.view.frame.size.width - 60.0, self.view.frame.size.width - 60.0)];
baseChartView.layer.masksToBounds = true;
baseChartView.backgroundColor = [UIColor whiteColor];// JTChartView
JTChartView *chartView = [[JTChartView alloc] initWithFrame:baseChartView.bounds
values:@[@15, @5, @10]
curveColor:[UIColor grayColor]
curveWidth:5.0
topGradientColor:[UIColor redColor]
bottomGradientColor:[UIColor orangeColor]
minY:0.5
maxY:1.0
topPadding:10.0];
[baseChartView addSubview:chartView];
```## Author
This library is open-sourced by [Jakub Truhlar](http://kubatruhlar.cz).
## License
The MIT License (MIT)
Copyright © 2015 Jakub Truhlar