FLCharts

1.4.0

Easy to use and highly customizable charts library for iOS
francescoleoni98/FLCharts

What's New

Release 1.4.0

2022-02-28T15:33:21Z
  • FEATURE: Added pie chart.
  • FEATURE: Added possibility to create your own FLLegend view.

FLCharts

FLCharts

Version Platforms License Carthage compatible Swift Xcode 11.0+ iOS 11.0+ SPM

FLCharts is an easy-to-use library to build highly customizable bar and line charts. It allows you to create your own chart bar UIView and use it to display data in the chart.
Additionally FLCharts allows you to provide a custom HighlightedView to show the highlighted bar contents on top of the chart.
Embed effortlessly your chart in a FLCard alogside with a title, an average vlue view and additional behaviours.

Table of Contents

Requirements

  • Xcode 11 / Swift 5
  • iOS >= 11.0

Installation

FLCharts is available through SPM, CocoaPods and Carthage

Swift Package Manager

In XCode go to File -> Add Packages...

Search for https://github.com/francescoleoni98/FLCharts and click Add Package.

Select to which target you want to add it and select Add Package.

CocoaPods

FLCharts is available through CocoaPods. To install it, add the following line to your Podfile:

pod 'FLCharts'

Then run pod install

Carthage

To install it with Carthage, in your Cartfile add:

github "francescoleoni98/FLCharts"

Then run carthage update

In XCode > Build phases click the plus button on top left > New Run Script Phases.
Then in Run Script > Shell script window > add /usr/local/bin/carthage copy-frameworks.
Run Script > Input file window > add $(SRCROOT)/Carthage/Build/iOS/FLCharts.framework.

Then, go to $project_dir/Carthage/Build/iOS and drag the folder FLCharts.framework into your Xcode Project > Your Target > Frameworks, Libraries and Embedded Content.

Example

Here you can find a guide about how to setup a bar chart using FLCharts:
https://medium.com/@leonifrancesco/set-up-a-basic-bar-chart-using-flcharts-swift-d2f615a10d0b

Features

  • Animations for chart bars
  • Customizable Axes (both x and y axis)
  • Dragging / Panning (with touch-gesture)
  • Highlighting values (with customizable popup-views)
  • Create custom cards with embedded chart and more features
  • Scroll through chart while highlighted to change highlighted bar
  • Fully customizable (bar colors, axes color, background, average value, dashed lines, ...)

Configurations

FLChart is highly customizable. You can choose which property to modify through the .config property.

let axisLabelConfig = FLAxisLabelConfig(color: .black,
                                        font: .preferredFont(forTextStyle: .body))

let config = ChartConfig(axesLabels: axisLabelConfig)
                         
chart.config.dashedLines.color = .darkGray

Docs

You can build FLCharts documentation directly in XCode.
In XCode go to Product -> Build Documentation, once XCode has finished building, the documentation will appear.

Examples

  • Bar Chart

bar chart

  • Multivalue Bar Chart

multivalue bar chart

  • Highlighted Bar

highlighted bar

  • Average view

average view

  • Bar chart embedded in FLCard

bar chart embedded in FLCard

  • Dark mode

dark mode

  • Line Chart

line chart

  • Scatter Chart

scatter chart

Animations

  • Panning while highlighted

alt tag

  • Chart animation

alt tag

  • Scrolling behaviour with average and highlighted views

alt tag

Author

Francesco Leoni | leoni.francesco98@gmail.it
francescoleoni98 | https://github.com/francescoleoni98

License

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

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Jun 29 2022 11:23:46 GMT-0500 (GMT-05:00)