ProductPromotion
Logo

Swift

made by https://0x3d.site

GitHub - francescoleoni98/FLCharts: Easy to use and highly customizable charts library for iOS
Easy to use and highly customizable charts library for iOS - francescoleoni98/FLCharts
Visit Site

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

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

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, line and pie 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:

FLCharts: Create Bar Chart easily

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))
                         
chart.config = ChartConfig(axesLabels: axisLabelConfig)

Prebuilt bar cells

  • FLPlainChartBar
  • FLMultipleValuesChartBar
  • FLHorizontalMultipleValuesChartBar

Use this bars when you configure your chart.

Eg. FLChart(data: ..., type: .bar(bar: FLMultipleValuesChartBar.self))

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.

Chart types

Plain Bar Chart Multi Value Bar Chart Horizontal Multi Value Bar Chart
Bar class: FLPlainChartBar Bar class: FLMultipleValuesChartBar Bar class: FLHorizontalMultipleValuesChartBar
Data type: SinglePlotable Data type: MultiPlotable Data type: MultiPlotable
Line Chart Multi Value Line Chart Scatter Chart
Data type: SinglePlotable Data type: MultiPlotable Data type: ScatterPlotable
Radar Chart Pie Chart
Data type: FLDataSet Data type: FLPiePlotable

Examples

Highlighted Bar Average view Bar chart embedded in FLCard
Highlight View: BarHighlightedView showAverage = true
highlighted bar average view bar chart embedded in FLCard
Dark Mode Line Chart X and Y Segments Pie Chart
X Segments: Key(key: String, xColors: [UIColor])
Y Segments: Key(key: String, yThresholds: [CGFloat : UIColor], data: [PlotableData])
dark mode x y segments pie chart

Animations

  • Panning while highlighted

alt tag

  • Chart animation

alt tag

  • Scrolling behaviour with average and highlighted views

alt tag

Apps that uses FLCharts

Author

Francesco Leoni | @franceleonidev | [email protected]

License

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

More Resources
to explore the angular.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory