Là một dự án mã nguồn mở, kevinzhow/PNChart đã đạt 9.6k sao trên GitHub, ngôn ngữ Objective-C. A simple and beautiful chart lib used in Piner and CoinsMan for iOS
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
You can also find swift version at here https://github.com/kevinzhow/PNChart-Swift
A simple and beautiful chart lib with animation used in Piner and CoinsMan for iOS
Requirements
PNChart works on iOS 7.0+ and is compatible with ARC projects.
If you need support for iOS 6, use PNChart <= 0.8.1. Note that 0.8.2 supports iOS 8.0+ only, 0.8.3 and newer supports iOS 7.0+.
It depends on the following Apple frameworks, which should already be included with most Xcode templates:
Foundation.framework
UIKit.framework
CoreGraphics.framework
QuartzCore.framework
You will need LLVM 3.0 or later in order to build PNChart.
Usage
Cocoapods
CocoaPods is the recommended way to add PNChart to your project.
Add a pod entry for PNChart to your Podfile pod 'PNChart'
Install the pod(s) by running pod install.
Include PNChart wherever you need it with #import "PNChart.h".
You can set different colors for the same PNLineChartData item. for instance you can use "color" red for values less than 50 and use purple for values greater than 150.
Legend has been added to PNChart for Line and Pie Charts. Legend items position can be stacked or in series.
#import "PNChart.h"
//For Line Chart
//Add Line Titles for the Legend
data01.dataTitle = @"Alpha";
data02.dataTitle = @"Beta Beta Beta Beta";
//Build the legend
self.lineChart.legendStyle = PNLegendItemStyleSerial;
UIView *legend = [self.lineChart getLegendWithMaxWidth:320];
//Move legend to the desired position and add to view
[legend setFrame:CGRectMake(100, 400, legend.frame.size.width, legend.frame.size.height)];
[self.view addSubview:legend];
//For Pie Chart
//Build the legend
self.pieChart.legendStyle = PNLegendItemStyleStacked;
UIView *legend = [self.pieChart getLegendWithMaxWidth:200];
//Move legend to the desired position and add to view
[legend setFrame:CGRectMake(130, 350, legend.frame.size.width, legend.frame.size.height)];
[self.view addSubview:legend];
Grid Lines
Grid lines have been added to PNChart for Line Chart.
//For DelegateMethod
-(void)userClickedOnLineKeyPoint:(CGPoint)point lineIndex:(NSInteger)lineIndex pointIndex:(NSInteger)pointIndex{
NSLog(@"Click Key on line %f, %f line index is %d and point index is %d",point.x, point.y,(int)lineIndex, (int)pointIndex);
}
-(void)userClickedOnLinePoint:(CGPoint)point lineIndex:(NSInteger)lineIndex{
NSLog(@"Click on line %f, %f, line index is %d",point.x, point.y, (int)lineIndex);
}
License
This code is distributed under the terms and conditions of the MIT license.
SpecialThanks
@lexrus CocoaPods Spec
ZhangHang Pie Chart
MrWooj Scatter Chart
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/kevinzhow/PNChart là nguồn chính thức.
kevinzhow/PNChart có phải mã nguồn mở không?
Có — kevinzhow/PNChart phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/kevinzhow/PNChart.
kevinzhow/PNChart có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho kevinzhow/PNChart. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
kevinzhow/PNChart dùng license gì?
kevinzhow/PNChart phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
kevinzhow/PNChart là gì?
kevinzhow/PNChart (kevinzhow/PNChart) là dự án Objective-C trên GitHub. Theo mô tả gốc: A simple and beautiful chart lib used in Piner and CoinsMan for iOS
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về PNChart?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về PNChart.