All Projects → lminhtm → LMGraphView

lminhtm / LMGraphView

Licence: MIT license
LMGraphView is a simple and customizable graph view for iOS.

Programming Languages

objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to LMGraphView

Caroline
A simple Cairo Chart Library for GTK and Vala
Stars: ✭ 41 (-32.79%)
Mutual labels:  chart, line
android-charts
A curated list of Android Chart libraries.
Stars: ✭ 69 (+13.11%)
Mutual labels:  chart, line
Android Linechart
📈一个简单的折线,贝塞尔曲线图表控件,高度可扩展,支持动态显示。
Stars: ✭ 157 (+157.38%)
Mutual labels:  chart, line
Hxcharts
📊 Chart for iOS 仪表盘、柱状图、圆形图、折线图、环形图
Stars: ✭ 301 (+393.44%)
Mutual labels:  chart, line
Laue
🖖📈 Modern charts for Vue 2.0
Stars: ✭ 245 (+301.64%)
Mutual labels:  chart, line
HTML-Crypto-Currency-Chart-Snippets
💹 Simple HTML Snippets to create Tickers / Charts of Cryptocurrencies with the TradingView API 💹
Stars: ✭ 89 (+45.9%)
Mutual labels:  chart
britecharts-react
Britecharts-react is a React wrapper for the Britecharts charting library. It allows the use of Britecharts charts within a React application.
Stars: ✭ 110 (+80.33%)
Mutual labels:  chart
skills-chart-widget
Integrate skills chart from your CodersRank profile to your personal website
Stars: ✭ 25 (-59.02%)
Mutual labels:  chart
OrgChart
Organization chart layout library
Stars: ✭ 16 (-73.77%)
Mutual labels:  chart
plotters-iced
📈 Iced backend for Plotters
Stars: ✭ 30 (-50.82%)
Mutual labels:  chart
bar-horizontal
Create beautiful horizontal charts, that fit your terminal.
Stars: ✭ 36 (-40.98%)
Mutual labels:  chart
ONE-ReactNative
As a practicing project, ONE - ReactNative contains many of the features we often use, such as Axios,Fetch, Redux, Charts, etc. It is also worth learning that the project contains a complete mall module.
Stars: ✭ 71 (+16.39%)
Mutual labels:  chart
HCLineChartView
HCLineChartView is a beautiful iOS library for drawing line charts. It is highly customizable and easy to use.
Stars: ✭ 22 (-63.93%)
Mutual labels:  chart
jscharting-vue
Official JSCharting Vue.js Plugin & Examples
Stars: ✭ 41 (-32.79%)
Mutual labels:  chart
ucollage
An extensible command line image viewer inspired by vim
Stars: ✭ 161 (+163.93%)
Mutual labels:  line
line-sdk-unity
Provides a modern way of implementing LINE APIs in Unity games, for iOS and Android.
Stars: ✭ 84 (+37.7%)
Mutual labels:  line
WTKit
HTTP Codable Request/Swift extensions
Stars: ✭ 48 (-21.31%)
Mutual labels:  chart
clova-cek-sdk-nodejs
SDK of the Clova CEK for Node.js
Stars: ✭ 35 (-42.62%)
Mutual labels:  line
react-liff
A react context provider for LIFF (LINE Front-end Framework)
Stars: ✭ 22 (-63.93%)
Mutual labels:  line
ahr999-mixin
一个提供实时更新的Ahr999指数的mixin机器人,与一个提供历史ahr999指数的web页面。
Stars: ✭ 23 (-62.3%)
Mutual labels:  chart

LMGraphView

LMGraphView is a simple and customizable graph view for iOS.

Features

  • Display a scrollable line graph view with mutiple graph plots.
  • Show popover when touch on every graph points.
  • Allow for a large amount of customization.

Requirements

  • iOS 8.0 or higher
  • ARC

Installation

From CocoaPods

pod 'LMGraphView'

Manually

  • Drag the LMGraphView folder into your project.
  • Add #import "LMLineGraphView.h" to the top of classes that will use it.

Usage

You can easily integrate the LMGraphView with a few lines of code. For an example usage look at the code below.

LMLineGraphView *graphView = [[LMLineGraphView alloc] initWithFrame:frame];
graphView.xAxisValues = @[@{ @1 : @"JAN" },
                          @{ @2 : @"FEB" },
                          @{ @3 : @"MAR" },
                          @{ @4 : @"APR" },
                          @{ @5 : @"MAY" },
                          @{ @6 : @"JUN" },
                          @{ @7 : @"JUL" },
                          @{ @8 : @"AUG" },
                          @{ @9 : @"SEP" },
                          @{ @10 : @"OCT" },
                          @{ @11 : @"NOV" },
                          @{ @12 : @"DEC" }];
graphView.yAxisMaxValue = 90;
graphView.yAxisUnit = @"(customer)";
graphView.title = @"MONTHLY CUSTOMER";
[self.view addSubview:graphView];

LMGraphPlot *plot = [[LMGraphPlot alloc] init];
plot.strokeColor = [UIColor brownColor];
plot.fillColor = [UIColor clearColor];
plot.graphPointColor = [UIColor brownColor];
plot.graphPoints = @[LMGraphPointMake(CGPointMake(1, 47), @"1", @"47"),
                     LMGraphPointMake(CGPointMake(2, 69), @"2", @"69"),
                     LMGraphPointMake(CGPointMake(3, 77), @"3", @"77"),
                     LMGraphPointMake(CGPointMake(4, 60), @"4", @"60"),
                     LMGraphPointMake(CGPointMake(5, 59), @"5", @"59"),
                     LMGraphPointMake(CGPointMake(6, 40), @"6", @"40"),
                     LMGraphPointMake(CGPointMake(7, 60), @"7", @"60"),
                     LMGraphPointMake(CGPointMake(8, 45), @"8", @"45"),
                     LMGraphPointMake(CGPointMake(9, 50), @"9", @"50"),
                     LMGraphPointMake(CGPointMake(10, 70), @"10", @"70"),
                     LMGraphPointMake(CGPointMake(11, 56), @"11", @"56"),
                     LMGraphPointMake(CGPointMake(12, 30), @"12", @"30")];
graphView.graphPlots = @[plot];

Customization

You can customize the following properties of LMGraphView in LMGraphLayout:

@property (nonatomic, assign) BOOL startPlotFromZero;
@property (nonatomic, assign) BOOL drawMovement;

@property (nonatomic, assign) BOOL xAxisScrollableOnly;
@property (nonatomic, assign) BOOL xAxisGridHidden;
@property (nonatomic, assign) BOOL xAxisGridDashLine;
@property (nonatomic, assign) CGFloat xAxisIntervalInPx;
@property (nonatomic, assign) CGFloat xAxisMargin;

@property (nonatomic, assign) BOOL xAxisZeroHidden;
@property (nonatomic, assign) BOOL xAxisZeroDashLine;
@property (nonatomic, assign) CGFloat xAxisLinesWidth;
@property (nonatomic, strong) UIColor *xAxisLinesStrokeColor;
@property (nonatomic, assign) CGFloat xAxisLabelHeight;
@property (nonatomic, strong) UIFont *xAxisLabelFont;
@property (nonatomic, strong) UIColor *xAxisLabelColor;

@property (nonatomic, assign) NSUInteger yAxisSegmentCount;
@property (nonatomic, assign) BOOL yAxisZeroHidden;
@property (nonatomic, assign) BOOL yAxisZeroDashLine;
@property (nonatomic, assign) BOOL yAxisGridHidden;
@property (nonatomic, assign) BOOL yAxisGridDashLine;
@property (nonatomic, strong) UIColor *yAxisLinesStrokeColor;
@property (nonatomic, assign) CGFloat yAxisLinesWidth;
@property (nonatomic, assign) CGFloat yAxisLabelWidth;
@property (nonatomic, assign) CGFloat yAxisLabelHeight;
@property (nonatomic, strong) UIFont *yAxisLabelFont;
@property (nonatomic, strong) UIColor *yAxisLabelColor;

@property (nonatomic, strong) UIFont *yAxisUnitLabelFont;
@property (nonatomic, strong) UIColor *yAxisUnitLabelColor;

@property (nonatomic, assign) CGFloat titleLabelHeight;
@property (nonatomic, strong) UIFont *titleLabelFont;
@property (nonatomic, strong) UIColor *titleLabelColor;

@property (nonatomic, assign) CGFloat movementLineWidth;
@property (nonatomic, strong) UIColor *movementLineColor;
@property (nonatomic, strong) UIColor *movementDotColor;

(See sample Xcode project in /LMGraphViewDemo)

License

LMGraphView is licensed under the terms of the MIT License.

Contact

Minh Luong Nguyen

Donations

paypal

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].