Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.

Related tags

UI Charts
Overview

Version 4.0.0, synced to MPAndroidChart #f6a398b

alt tag Supported Platforms Releases Latest pod release Carthage compatible Build Status codecov Join the chat at https://gitter.im/danielgindi/Charts

Just a heads up: Charts 3.0 has some breaking changes. Please read the release/migration notes.

Another heads up: ChartsRealm is now in a separate repo. Pods is also now Charts and ChartsRealm, instead of Charts/Core and Charts/Realm

One more heads up: As Swift evolves, if you are not using the latest Swift compiler, you shouldn't check out the master branch. Instead, you should go to the release page and pick up whatever suits you.

  • Xcode 11 / Swift 5 (master branch)
  • iOS >= 8.0 (Use as an Embedded Framework)
  • tvOS >= 9.0
  • macOS >= 10.11

Okay so there's this beautiful library called MPAndroidChart by Philipp Jahoda which has become very popular amongst Android developers, but there was no decent solution to create charts for iOS.

I've chosen to write it in Swift as it can be highly optimized by the compiler, and can be used in both Swift and ObjC project. The demo project is written in ObjC to demonstrate how it works.

An amazing feature of this library now, for Android, iOS, tvOS and macOS, is the time it saves you when developing for both platforms, as the learning curve is singleton- it happens only once, and the code stays very similar so developers don't have to go around and re-invent the app to produce the same output with a different library. (And that's not even considering the fact that there's not really another good choice out there currently...)

Having trouble running the demo?

  • ChartsDemo/ChartsDemo.xcodeproj is the demo project for iOS/tvOS
  • ChartsDemo-OSX/ChartsDemo-OSX.xcodeproj is the demo project for macOS
  • Make sure you are running a supported version of Xcode.
    • Usually it is specified here a few lines above.
    • In most cases it will be the latest Xcode version.
  • Make sure that your project supports Swift 5.0
  • Optional: Run carthage checkout in the project folder, to fetch dependencies (i.e testing dependencies).
    • If you don't have Carthage - you can get it here.

Usage

In order to correctly compile:

  1. Drag the Charts.xcodeproj to your project
  2. Go to your target's settings, hit the "+" under the "Embedded Binaries" section, and select the Charts.framework
  3. @import Charts
  4. When using Swift in an ObjC project:
  • You need to import your Bridging Header. Usually it is "YourProject-Swift.h", so in ChartsDemo it's "ChartsDemo-Swift.h". Do not try to actually include "ChartsDemo-Swift.h" in your project :-)
  • (Xcode 8.1 and earlier) Under "Build Options", mark "Embedded Content Contains Swift Code"
  • (Xcode 8.2+) Under "Build Options", mark "Always Embed Swift Standard Libraries"
  1. When using Realm.io:
    • Note that the Realm framework is not linked with Charts - it is only there for optional bindings. Which means that you need to have the framework in your project, and in a compatible version to whatever is compiled with Charts. We will do our best to always compile against the latest version.
    • You'll need to add ChartsRealm as a dependency too.

3rd party tutorials

Video tutorials

Blog posts

Want your tutorial to show here? Create a PR!

Troubleshooting

Can't compile?

  • Please note the difference between installing a compiled framework from CocoaPods or Carthage, and copying the source code.
  • Please read the Usage section again.
  • Search in the issues
  • Try to politely ask in the issues section

Other problems / feature requests

  • Search in the issues
  • Try to politely ask in the issues section

CocoaPods Install

Add pod 'Charts' to your Podfile. "Charts" is the name of the library.
For Realm support, please add pod 'ChartsRealm' too.

Note: pod 'ios-charts' is not the correct library, and refers to a different project by someone else.

Carthage Install

Charts now include Carthage prebuilt binaries.

github "danielgindi/Charts" == 4.0.0
github "danielgindi/Charts" ~> 4.0.0

In order to build the binaries for a new release, use carthage build --no-skip-current && carthage archive Charts.

Swift Package Manager Install

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/danielgindi/Charts.git", .upToNextMajor(from: "4.0.0"))
]

3rd party bindings

Xamarin (by @Flash3001): iOS - GitHub/NuGet. Android - GitHub/NuGet.

Help

If you like what you see here, and want to support the work being done in this repository, you could:

  • Contribute code, issues and pull requests
  • Let people know this library exists ( 🔥 spread the word 🔥 )
  • Donate (You can buy me a beer, or you can buy me dinner :-)

Note: The author of MPAndroidChart is the reason that this library exists, and is accepting donations on his page. He deserves them!

Questions & Issues

If you are having questions or problems, you should:

  • Make sure you are using the latest version of the library. Check the release-section.
  • Study the Android version's Documentation-Wiki
  • Study the (Still incomplete Doc-Percent) Pod-Documentation
  • Search or open questions on stackoverflow with the ios-charts tag
  • Search known issues for your problem (open and closed)
  • Create new issues (please 🔥 search known issues before 🔥 , do not create duplicate issues)

Features

Core features:

  • 8 different chart types
  • Scaling on both axes (with touch-gesture, axes separately or pinch-zoom)
  • Dragging / Panning (with touch-gesture)
  • Combined-Charts (line-, bar-, scatter-, candle-stick-, bubble-)
  • Dual (separate) Axes
  • Customizable Axes (both x- and y-axis)
  • Highlighting values (with customizable popup-views)
  • Save chart to camera-roll / export to PNG/JPEG
  • Predefined color templates
  • Legends (generated automatically, customizable)
  • Animations (build up animations, on both x- and y-axis)
  • Limit lines (providing additional information, maximums, ...)
  • Fully customizable (paints, typefaces, legends, colors, background, gestures, dashed lines, ...)
  • Plotting data directly from Realm.io mobile database (here)

Chart types:

Screenshots are currently taken from the original repository, as they render exactly the same :-)

  • LineChart (with legend, simple design) alt tag

  • LineChart (with legend, simple design) alt tag

  • LineChart (cubic lines) alt tag

  • LineChart (gradient fill) alt tag

  • Combined-Chart (bar- and linechart in this case) alt tag

  • BarChart (with legend, simple design)

alt tag

  • BarChart (grouped DataSets)

alt tag

  • Horizontal-BarChart

alt tag

  • PieChart (with selection, ...)

alt tag

  • ScatterChart (with squares, triangles, circles, ... and more)

alt tag

  • CandleStickChart (for financial data)

alt tag

  • BubbleChart (area covered by bubbles indicates the value)

alt tag

  • RadarChart (spider web chart)

alt tag

Documentation

Currently there's no need for documentation for the iOS/tvOS/macOS version, as the API is 95% the same as on Android.
You can read the official MPAndroidChart documentation here: Wiki

Or you can see the Charts Demo project in both Objective-C and Swift (ChartsDemo-iOS, as well as macOS ChartsDemo-macOS) and learn the how-tos from it.

Special Thanks

Goes to @liuxuan30, @petester42 and @AlBirdie for new features, bugfixes, and lots and lots of involvement in our open-sourced community! You guys are a huge help to all of those coming here with questions and issues, and I couldn't respond to all of those without you.

Our amazing sponsors

Debricked: Use open source securely

debricked

License

Copyright 2016 Daniel Cohen Gindi & Philipp Jahoda

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Issues
  • ************* Migrating to Charts 3.0 ********************

    ************* Migrating to Charts 3.0 ********************

    Many have asked about how to migrate to Charts 3.0. So everything will be in the release notes soon as there will be a release, but I will write those down here for now:


    This is a major release, with a few breaking changes. So please pay attention.

    Updates:

    • x-indexes are dead. Intoducing: x-values. Each entry now has an x and a y.
    • Pie/radar charts do not have a concept of X index anymore
    • Unified XAxis/YAxis features and experience.
    • Unified formatter interfaces for axes.
    • New formatter for y values, not inheriting from NSNumberFormatter anymore, to have dataSet and viewport information to take better formatting decisions.
    • Major refactoring of the Highlight mechanism.
    • Refactored marker mechanism
    • Refactored legend entry mechanism
    • Each dataset can now set its own legend form/size/etc.
    • More demos
    • Some classes have been renamed, keeping the namespaced name only in ObjC (using Swift 2.2 objc(...) feature, and the change of a major version update)
    • FillFormatter now has a block representation using FillFormatter.withblock(...)
    • Same goes for all Default formatters too.
    • No more saveToCameraRoll(). Since Xcode 8.0 it causes "privacy" issues with Apple Review, you have to add the photo albums privacy key to your Info.plist for that.
    • Moved to Swift 3.0. Make sure your project conforms to Swift 3.0.
    • Many minor bug fixes and improvements

    Breaking changes / how to migrate:

    • All dataset constructors have changed - they do not take an array of x-indices anymore.
    • All entry constructors have changed - they take in an X and a Y.
    • Pie and Radar chart entries now have their own classes. So exchange the Entry classes withPieChartDataEntry/RadarChartDataEntry
    • If you have any old startAtZeroEnabled calls - these have been deprecated for a long time. Replace them with axisMinimum.
    • If you are using formatters:
      • Replace any chart.valueFormatter = formatter with chart.valueFormatter = ChartDefaultValueFormatter(formatter: formatter) or chart.valueFormatter = [[ChartDefaultValueFormatter alloc] initWithFormatter:formatter];
      • Replace any axis.valueFormatter = formatter with axis.valueFormatter = ChartDefaultAxisValueFormatter(formatter: formatter) or axis.valueFormatter = [[ChartDefaultAxisValueFormatter alloc] initWithFormatter:formatter];
    • In general, all functions that accepted x-indices before, now accept an x-value, so you might have to adjust the names a little bit.
    • Where ChartViewDelegate is implemented, update the chartValueSelected interface
    • Replace drawSliceTextEnabled with drawEntryLabelsEnabled
    • If you have a custom scatter shape - implement an IShapeRenderer, and put your rendering code in there
    • If you have a custom marker - consider subclassing MarkerView/MarkerImage or implementing IMarker. There are more options than before now...
    • If you have used barSpace before, move to using barWidth
    • If you used saveToCameraRoll(), replace with UIImageWriteToSavedPhotosAlbum(chart.getChartImage(trasparent: false), nil, nil, nil)
    • Some classes have been renamed for a cleaner look. They do not contain the "Chart" prefix anymore. That's for Swift only, where there are namespaces. In ObjC the names stayed the same for the sake of namespacing, using Swift 2.2's feature of @objc(name). If your compiler yells that a class does not exist, try to remove the Chart from its name. This should rarely happen, as we've chosen only the classes that are rarely instantiated by the user.
    opened by danielgindi 61
  • Swift 2.3 & 3.0 support: news, issues, PRs and state

    Swift 2.3 & 3.0 support: news, issues, PRs and state

    Using this thread to list the current news, issues, PRs, and state for swift 3.0 support. This post will be updated accordingly.

    As Xcode beta 4 comes out, there are even more changes(#1290), seems it's much easier to convert the library after swift 3.0 released once and for all, than continuous merging from beta 1 to beta N and finally merge into master.

    Xcode beta 6 has even more changes based on beta 4.. But thanks to @acegreen, we now on beta 6 now.

    Therefore, I am thinking the current Swift 2.3 and 3.0 branches are just for everyone to test their apps with iOS 10 beta. Thanks for everyone who commits into 2.3 and 3.0 branch.

    What branch to use?

    Swift 3.0 + Charts 3.0 -> Master // this is recommended to pick :)

    Swift 2.3 + Charts 2.2.5 -> Chart2.2.5-Swift2.3 branch Swift 3.0 + Charts 2.2.5 -> Chart2.2.5-Swift3.0 branch Swift 2.3 + Charts 3.0 feature ready -> Chart3.0-Swift2.3 branch

    Progress

    Master branch has migrated to Swift 3.0 and Chart 3.0 and this is the branch will get bug fix and new features. Other temp branches will be deleted once it's stable. Those branches are just for people to pick whatever the need to use in their project for upgrading Xcode 8, however they are not maintained, or at least only small bug fixes for Swift will kick in. Any bugs that are Chart 2.2.5 specific won't be fixed in these temp branches.

    Swift-3.0 branch is based on Charts 2.2.5; has some fixes for OS X demo on Xcode 8 GM Swift-2.3 branch is sync with master(Chart v3.0 feature ready) 5e020a8f8489a8c71c2387f3334aab5fb64f2fe3 for iOS 10/macOS + Charts 3.0 on Xcode beta 6, works fine on Xcode 8 GM Chart2.2.5-Swift2.3 branch is based on Chart 2.2.5 release and converted to Swift 2.3 on Xcode beta 6 works fine on Xcode 8 GM

    Open issues (up to Xcode 8 GM):

    #1421 linear line chart has additional line segments wile zooming in (PR #1420) #1269: Realm swift 3.0 support is blocked due to Xcode 8 beta 3 & 4 swift compiler bug

    This seems a compiler bug pending to fix. Anyone relies one Realm have to wait until this bug has been fixed. Please use Swift 2.3 to test iOS 10. Now, the code is ready (PR #1414), but pending a swift 3 Realm framework to test. #1171: I found this PR removed isDrawValuesEnabled and other similar protocol methods prefixed with 'is', that's why #1295 is removing 'is' from the function name... Watch out

    function inconsistency:

    Seeing different signatures for same API on macOS and iOS, such as:

    NSFont: class func systemFontSize() UIFont: class var systemFontSize: CGFloat { get }

    NSParagraphStyle

    NSParagraphStyle: on macOS, it's: class func default() -> NSParagraphStyle on iOS, it's: class var default: NSParagraphStyle { get }

    I have filed a bug 27731357 on radar. If they intended to do so, we have to wrap it.. again

    Pull requests:

    Swift 3.0

    #1414 is merged for Realm extension issue, still need Realm to release Swift 3.0 branch to make the framework compile. #1378 is merged for migrating public to open (SE-1107) #1342 is meged for Xcode beta 6 #1294, #1295 is merged for Xcode beta 4, including project settings, ChartsRealm, ChartsDemo

    If you remove all Realm related files and code, you should be able to launch ChartsDemo with Xcode beta 4 now. #1290 is merged for Xcode beta 4 #1266 is merged via #1296 due to conflicts (RunLoopMode changes)

    Swift 2.3

    #1389 is merged for Xcode beta 6 + Charts v3.0 code in master, at 5e020a8f8489a8c71c2387f3334aab5fb64f2fe3 #1281 is merged for Xcode beta 4

    discussion a work in progress 
    opened by liuxuan30 60
  • Making X-Values Properly Scaled (Not Equidistant)

    Making X-Values Properly Scaled (Not Equidistant)

    Hi, I'm making a line chart with the following example data points:

    (0,0) (1,0) (5,0)

    Is there a way I can get the 3 points to show up so that they're scaled properly? Right now, if I add a Data Set with 2 arrays, all 3 points are the same distance from each other. I know there's a thread about this in MPAndroidCharts, but I was wondering if anyone's figured out how to do this in iOS. Thank you so much!

    feature ★★★ 
    opened by ghost 59
  • Stop axis labels duplicating.

    Stop axis labels duplicating.

    Within the App I have an issue where the labels on the left axis of either a BarChartView or a LineChartView repeats.

    I first added the snippet below to ensure that the number of labels on the axis does not exceed the maximum value in the y data.

    self.chartView.leftAxis.labelCount = self.chartView.data.yMax > YAxisMaxLabelCount ? YAxisMaxLabelCount : self.chartView.data.yMax;
    

    This ensured that if the maximum value in the y data was 3 then there would only be 3 labels within the axis. Now this worked fine if the graph was not interactive, i.e. the user could not zoom the chart.

    As soon as the user zooms obviously the count of the labels remains the same and the value formatter fills in the gaps allowing a value to repeat.

    Example of axis with no duplicated values screen shot 2015-08-24 at 5 07 29 pm

    Example of same chart but zoomed in screen shot 2015-08-24 at 5 07 54 pm

    The screenshots show the left axis repeating the value 2. What is your best suggestion on solving this repeating label issue? Any help would be grateful. If you need any further information let me know.

    Thanks

    opened by steprescott 52
  • Add support for rounded corners for BarChart

    Add support for rounded corners for BarChart

    Issue Link :link:

    Rounding the corners of bars #1066

    Goals :soccer:

    image

    • Add ability to draw rounded corners for BarChartView and HorizontalBarChartView.
    • Support also stacked bar charts.
    • Corner radius should be calculated automatically, depending on chart's width and height.
    • To use it simply add dataSet.roundedCorners = [.allCorners].

    Implementation Details :construction:

    • Add roundedCorners property for BarChartDataSet, where you can specify which corners should be rounded.
    • Introduce changes in drawDataSet function in BarChartRenderer and HorizontalBarChartRenderer, where UIBezierPath is created to clip bar filling.
    • Similar changes apply to drawHighlighted function in BarChartRenderer.

    Testing Details :mag:

    Add testRoundedCorners test to BarChartTests.

    opened by skarol 51
  • Fatal error: Can't form Range with upperBound < lowerBound

    Fatal error: Can't form Range with upperBound < lowerBound

    hey @danielgindi , first of all, thanks for the awesome library. I have recently updated the library and a crash is occurring in "extension BarLineScatterCandleBubbleRenderer.XBounds: Sequence" in constructor. line is

    fileprivate init(min: Int, max: Int) { -----> self.iterator = (min...max).makeIterator() }

    Can you please tell me, why is it crashing and what am I doing wrong and how can I prevent it? Its astonishing that graphs have been working fine on previous versions of library.

    Error on xcode debugger is: Fatal error: Can't form Range with upperBound < lowerBound

    bug 
    opened by danishnaeem57 40
  • <Error>: CGAffineTransformInvert: singular matrix

    : CGAffineTransformInvert: singular matrix

    I am getting this error repeatedly with a HorizontalBarChartView: <Error>: CGAffineTransformInvert: singular matrix.

    There is nothing special about my code. I am using a HorizontalBarChartView in OSX that is 175x394 points in size. It is not obstructed by any other views. I initialize the chart with:

    @IBOutlet weak var horizontalBarChart: HorizontalBarChartView!
    let data = BarChartData(xVals: [1.0, 3.0, 5.0, 7.0, 8.0])
    horizontalBarChart.data = data
    horizontalBarChart.notifyDataSetChanged()
    

    and then get hit with the error multiple times a second. Any idea what is causing this?

    Line 206 in ChartTransformer is the only place the CGAffineTransformInvert is called.

    bug 
    opened by klanderson 35
  • Grouped columns misplaced

    Grouped columns misplaced

    Hey, I'm having troubles with grouped bar chart. My barChartData are following:

    x-values (array of dates): 02.júla.15, 23.júla.15, 24.júla.15

    dataSets: ChartDataSet, label: tst, 1 entries: ChartDataEntry, xIndex: 0, value 0.0, ChartDataSet, label: tst, 1 entries: ChartDataEntry, xIndex: 0, value 0.0, ChartDataSet, label: tst, 1 entries: ChartDataEntry, xIndex: 0, value 0.0, ChartDataSet, label: tst, 1 entries: ChartDataEntry, xIndex: 0, value 0.0, ChartDataSet, label: tst, 1 entries: ChartDataEntry, xIndex: 0, value 0.0, ChartDataSet, label: tst, 1 entries: ChartDataEntry, xIndex: 1, value 39.0, ChartDataSet, label: tst, 1 entries: ChartDataEntry, xIndex: 2, value 16.0, ChartDataSet, label: tst, 1 entries: ChartDataEntry, xIndex: 2, value 28.0

    This produces almost correct result, however bars seems to have wrong position as showed in this image http://imgur.com/Vq43QFH

    What am I doing wrong? :)

    opened by JanciP 34
  • Cubic Line goes too much over the top or below bottom. Needs flattening.

    Cubic Line goes too much over the top or below bottom. Needs flattening.

    snip20150922_1

    Like the picture, broken sometimes, anyone can help?

    set1 = [[LineChartDataSet alloc] initWithYVals:yVals label:@"DataSet 1"]; set1.drawCubicEnabled = YES; set1.cubicIntensity = 0.5;

    When I set drawCubicEnabled is NO, The chart seems ok.

    bug feature 
    opened by zxy198717 33
  • dyld: Library not loaded: @rpath/Charts.framework/Charts XCODE 11.3.1

    dyld: Library not loaded: @rpath/Charts.framework/Charts XCODE 11.3.1

    What did you do?

    ℹ I built my app on my physical iphone and put my computer to sleep. When I got back, without making ABSOLUTELY NO changes I built the app once more (clicked the "play" button on XCODE) and ever since I've been getting the error:

    dyld: Library not loaded: @rpath/Charts.framework/Charts Referenced from: /private/var/containers/Bundle/Application/4B33D98E-3CC3-4632-8164-49F7465AFD92/Test.app/Test Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/4B33D98E-3CC3-4632-8164-49F7465AFD92/Test.app/Frameworks/Charts.framework/Charts: code signature invalid for '/private/var/containers/Bundle/Application/4B33D98E-3CC3-4632-8164-49F7465AFD92/Test.app/Frameworks/Charts.framework/Charts'

    /private/var/containers/Bundle/Application/4B33D98E-3CC3-4632-8164-49F7465AFD92/Test.app/Frameworks/Charts.framework/Charts: stat() failed with errno=25
    /private/var/containers/Bundle/Application/4B33D98E-3CC3-4632-8164-49F7465AFD92/Test.app/Frameworks/Charts.framework/Charts: code signature invalid for '/private/var/containers/Bundle/Application/4B33D98E-3CC3-4632-8164-49F7465AFD92/Test.app/Frameworks/Charts.framework/Charts'
    
    /private/var/containers/Bundle/Application/4B33D98E-3CC3-4632-8164-49F7465AFD92/Test.app/Frameworks/Charts.framework/Charts: stat() failed with errno=1
    /pri(lldb) 
    

    Charts Environment

    Xcode version: 11.3.1 Swift version: 5something

    opened by CypriotUnknown 33
  • dragYEnabled = false, but “diagonal scrolling” still modifies the visible Y range slightly

    dragYEnabled = false, but “diagonal scrolling” still modifies the visible Y range slightly

    I noticed that when the Y axis is zoomed in, and dragYEndabled=false (and dragXEnabled=true) when I scroll on the X axis and scroll slightly tilted from the horizontal axis, the visible Y range would change as well during the scrolling of the X axis.

    opened by frogg 0
  • Bar Chart: Adjust visible Y range according to currently visible maximum value

    Bar Chart: Adjust visible Y range according to currently visible maximum value

    Thanks a lot for your lovely Charts package! I am currently using it to develop a visualization component for one of my apps.

    The remaining thing I am struggling with is changing the visible vertical Y range depending on the currently visible maximum value.

    Here‘s an example to make things clear: Most values are around ±20, but there's one outlier with a value of 100:

    Screen Recording 2021-11-25 at 22 54 46

    I want to adjust the Y range while this one outlier is not visible.

    Right now I am using the chartViewDidEndPanning method to get the currently visible X range using self.lowestVisibleX and self.highestVisibleX. Using this information I can check in my data set what the current maximum Y value is. Using this value, I try to adjust the visibleYRange:

    self.chartView.setVisibleYRangeMaximum(maximum, axis: .right)
    self.chartView.setVisibleYRangeMinimum(maximum, axis: .right)
    

    And, because I want the Y axis to always start at 0, I am also calling this method:

    self.chartView.moveViewTo(xValue: self.chartView.lowestVisibleX, yValue: maximum / 2, axis: .right)
    

    This solution kinda works, but it is also kinda chunky:

    Screen Recording 2021-11-25 at 23 04 10

    I am wondering if there‘s a more elegant (built-in?) way, maybe even animated just like Apple is doing it in the Health app: RPReplay_Final1637877946

    Happy to hear any feedback, or reports of people who have been working towards similar goals 🙏

    opened by frogg 0
  • Higlighted color not showing on tap on bar

    Higlighted color not showing on tap on bar

    ℹ Please fill out this template when filing an issue. All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.

    Per our *CONTRIBUTING guidelines, we use GitHub for bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag ios-charts.

    Please remove this line and everything above it before submitting.

    What did you do?

    private func prepareBarChartData(models:[SCMChartModel], config:SCMBarChartConfig) -> BarChartData {

        let colors:[UIColor?] = models.map({$0.color})
        
        let yVals = models.map { (model) -> BarChartDataEntry in
            BarChartDataEntry(x: model.x, y: model.y, icon: model.image)
        }
        
        var set1: BarChartDataSet! = nil
        set1 = BarChartDataSet(entries: yVals, label: title)
        set1.drawValuesEnabled = false
        **set1.highlightColor = AppColors.themeBlue.withAlphaComponent(1.0)
        set1.highlightAlpha = 1.0**
        
        if colors.count > 0 {
            set1.colors = colors.map({$0 ?? config.colors?.first ?? .gray})
        } else {
            if config.colors?.count ?? 0 > 0 {
                set1.colors = config.colors ?? ChartColorTemplates.material()
            } else {
                set1.colors = ChartColorTemplates.material()
            }
        }
        
        set1.isRoundedBar = true
        set1.cornerRadius = config.cornerRadius
        
        let data = BarChartData(dataSet: set1)
        data.setValueFont(config.font[.all] ?? defaultFont)
        
        return data
    }  
    

    What did you expect to happen?

    Highlighed color should show on tap of bar

    What happened instead?

    Highlighted color is not shown on tap of bar...even in chart demo project its not consistent, randomly highlighted color is shown.

    Charts Environment

    Charts version/Branch/Commit Number: **Xcode version:13 **Swift version:5.2 **Platform(s) running Charts:iOS **macOS version running Xcode:Big Sur 11.6

    Demo Project

    ℹ Please link to or upload a project we can download that reproduces the issue.

    opened by jayrawat 0
  • Fatal access conflict detected

    Fatal access conflict detected

    Hi Charts team,

    I am using Charts in native code, and it is wokring. Where as i am using this native code as custom library for my React Native application. But the app is crashing with the below logs. If i am commenting the chars code then it is working. I am using xCode 12.4.

    Simultaneous accesses to 0x126437910, but modification requires exclusive access. Previous access (a modification) started at Charts`BarChartDataSet.barBorderColor.modify + 72 (0x1076f6f70). Current access (a read) started at: 0 libswiftCore.dylib 0x00000001a41762b0 swift_beginAccess + 548 1 Charts 0x00000001076f6dc4 BarChartDataSet.barBorderColor.getter + 76 2 Charts 0x00000001076f6d80 @objc BarChartDataSet.barBorderColor.getter + 32 3 Charts 0x00000001076fbc3c BarChartRenderer.drawDataSet(context:dataSet:index:) + 708 4 Charts 0x00000001076fad98 BarChartRenderer.drawData(context:) + 1852 5 Charts 0x00000001077121e8 BarLineChartViewBase.draw(:) + 4252 6 Charts 0x0000000107713bd4 @objc BarLineChartViewBase.draw(:) + 96 7 UIKitCore 0x00000001a31f9340 + 584 8 QuartzCore 0x00000001a36fef30 + 308 9 QuartzCore 0x00000001a35d04f8 + 176 10 QuartzCore 0x00000001a3708570 + 52 11 QuartzCore 0x00000001a36fe154 + 1680 12 QuartzCore 0x00000001a371165c + 416 13 QuartzCore 0x00000001a365cbdc + 416 14 QuartzCore 0x00000001a3686c68 + 728 15 UIKitCore 0x00000001a2d20438 + 140 16 CoreFoundation 0x00000001a040485c + 32 17 CoreFoundation 0x00000001a03fecf4 + 604 18 CoreFoundation 0x00000001a03ff0d8 + 960 19 CoreFoundation 0x00000001a03fe964 CFRunLoopRunSpecific + 572 20 GraphicsServices 0x00000001b71674f8 GSEventRunModal + 160 21 UIKitCore 0x00000001a2cefed8 + 1052 22 UIKitCore 0x00000001a2cf57d0 UIApplicationMain + 164 23 Apollo 247 0x0000000104e48c4c main + 128 24 libdyld.dylib 0x00000001a00dd564 + 4 Fatal access conflict detected. 2021-11-24 12:43:12.110443+0530 Apollo 247[2719:92295] Fatal access conflict detected.

    opened by pathanrasool 0
  • Allow to set longest label manually

    Allow to set longest label manually

    Goals :soccer:

    X-axis labels might have different widths even for the same character count depending on the font. If getLongestLabel() is unable to properly compute the longest label there is the longestLabel property to set it explicitly.

    opened by anton-plebanovich 0
  • ScatterChart crash in demo

    ScatterChart crash in demo

    ℹ Please fill out this template when filing an issue. All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.

    Per our *CONTRIBUTING guidelines, we use GitHub for bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag ios-charts.

    Please remove this line and everything above it before submitting.

    What did you do?

    when i using ScatterChart of swift demo version, i double click the chart to scale up, and drag the chart to top, then, the crash happen

    What did you expect to happen?

    i expect the demo running normally

    What happened instead?

    it crashed

    Charts Environment

    **Charts version/Branch/Commit Number:**4.0.1 **Xcode version:**13.1 **Swift version:**5.2 **Platform(s) running Charts:**simulator **macOS version running Xcode:**12.0.1

    Demo Project

    on simulator, iOS 15, 13 Pro max

    opened by pengzishang 0
  • spaceMin and spaceMax (xAxis) not working when setting new data

    spaceMin and spaceMax (xAxis) not working when setting new data

    What did you do?

    I'm using xAxis.spaceMin and xAxis.spaceMax to add some extra spacing. axisMaximum are calculated automatically.

    What did you expect to happen?

    spaceMin and spaceMax will add extra spacing even when setting new data

    What happened instead?

    Spacing is correct first time i set some data inside the graph. Once I set new data inside the graph (e.g. lineChartView.data = chartData) the additional space disappear.

    opened by francyrho11 0
  • BarChartDataSet comparison fails with same BarChartDataSet taken from BarChartView

    BarChartDataSet comparison fails with same BarChartDataSet taken from BarChartView

    What did you do?

    Tried to compare a BarChartDataset from existing BarChartView with a new BarChartDataSet

    What did you expect to happen?

    Same Dataset to return true

    What happened instead?

    Always returns false, even when they are same

    Charts Environment

    Charts version/Branch/Commit Number: 3.6.0 according to downloaded pod Xcode version: 12.5.1 Swift version: 5.4.2 Platform(s) running Charts: iOS macOS version running Xcode: 11.5.2

    Purpose here is to see if new data has come from API and check if existing graph needs updation

    Here barData is

    let barData = self.barChartView.barData

    chartDataSet is

    let chartDataSet = BarChartDataSet(entries: dataEntries, label: "WATER")

    dataEntries is

    var dataEntries = [BarChartDataEntry]() // values are added to this and then checked

    Logs from Console

    (lldb) po barData.dataSets[0] as! BarChartDataSet == chartDataSet
    false
    
    (lldb) po barData.dataSets[0]
    Charts.BarChartDataSet, label: WATER, 7 entries:
    ChartDataEntry, x: 0.0, y 0.0
    ChartDataEntry, x: 1.0, y 0.0
    ChartDataEntry, x: 2.0, y 2133.0
    ChartDataEntry, x: 3.0, y 1185.0
    ChartDataEntry, x: 4.0, y 1185.0
    ChartDataEntry, x: 5.0, y 1422.0
    ChartDataEntry, x: 6.0, y 0.0
    
    (lldb) po chartDataSet
    Charts.BarChartDataSet, label: WATER, 7 entries:
    ChartDataEntry, x: 0.0, y 0.0
    ChartDataEntry, x: 1.0, y 0.0
    ChartDataEntry, x: 2.0, y 2133.0
    ChartDataEntry, x: 3.0, y 1185.0
    ChartDataEntry, x: 4.0, y 1185.0
    ChartDataEntry, x: 5.0, y 1422.0
    ChartDataEntry, x: 6.0, y 0.0
    
    (lldb) po barData.dataSets
    ▿ 1 element
      ▿ 0 : Charts.BarChartDataSet, label: WATER, 7 entries:
    ChartDataEntry, x: 0.0, y 0.0
    ChartDataEntry, x: 1.0, y 0.0
    ChartDataEntry, x: 2.0, y 2133.0
    ChartDataEntry, x: 3.0, y 1185.0
    ChartDataEntry, x: 4.0, y 1185.0
    ChartDataEntry, x: 5.0, y 1422.0
    ChartDataEntry, x: 6.0, y 0.0
    
    (lldb) po barData.contains(dataSet: chartDataSet)
    false
    

    When these two should be equal clearly from same content they fail. Any help is appreciated.

    @danielgindi @liuxuan30

    opened by jerrin15 0
  • Use the right axis for calculating xMin and xMax on charts using righ…

    Use the right axis for calculating xMin and xMax on charts using righ…

    Use the right axis for calculating xMin and xMax on charts using right and left axis but having left axis data empty.

    Issue Link :link:

    For line charts where two data sets are configured, one with right axis dependency, and the other for left axis dependency.

    If the left axis data set is empty, then the right data sets is no displayed.

    Goals :soccer:

    Implementation Details :construction:

    This commit fixes the issue by choosing the best axis to calculate xmax and xmin when rendering.

    The following chart will have no lines rendered unless the costDataSet is not empty, then both lines are rendered:

            let valueDataSet: LineChartDataSet = LineChartDataSet(entries: valueEntries, label: "Value".localized())
            valueDataSet.setColor(.violet)
            valueDataSet.drawValuesEnabled = false
            valueDataSet.drawCirclesEnabled = false
            valueDataSet.axisDependency = .right
    
            let costDataSet: LineChartDataSet = LineChartDataSet(entries: [], label: "Cost".localized())
            costDataSet.setColor(.dark)
            costDataSet.drawValuesEnabled = false
            costDataSet.drawCirclesEnabled = false
            costDataSet.axisDependency = .left
    
            let dataSets: [LineChartDataSet] = [valueDataSet, costDataSet, benchmarkDataSet]
            let chartData = LineChartData(dataSets: dataSets)
            let chartView = LineChartView()
            chartView.data = chartData
    
            chartView.rightAxis.enabled = true
            chartView.rightAxis.axisMinimum = valueDataSet.yMin * 0.9
            chartView.rightAxis.axisMaximum = valueDataSet.yMax * 1.1 + 1
    
            chartView.leftAxis.enabled = true
            chartView.leftAxis.axisMinimum = costDataSet.yMin * 0.9
            chartView.leftAxis.axisMaximum = costDataSet.yMax * 1.1 + 1
    
    
    opened by mmazzei 0
  • Can I stop AnimatedMoveViewJob? I am triggering moveViewToAnimated method but at some point I need to cancel the animation. How can I do that?

    Can I stop AnimatedMoveViewJob? I am triggering moveViewToAnimated method but at some point I need to cancel the animation. How can I do that?

    ℹ Please fill out this template when filing an issue. All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.

    Per our *CONTRIBUTING guidelines, we use GitHub for bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag ios-charts.

    Please remove this line and everything above it before submitting.

    What did you do?

    ℹ Please replace this with what you did.

    What did you expect to happen?

    ℹ Please replace this with what you expected to happen.

    What happened instead?

    ℹ Please replace this with of what happened instead.

    Charts Environment

    Charts version/Branch/Commit Number: Xcode version: Swift version: Platform(s) running Charts: macOS version running Xcode:

    Demo Project

    ℹ Please link to or upload a project we can download that reproduces the issue.

    opened by Larson2240 0
Releases(v4.0.1)
  • v4.0.1(Nov 6, 2020)

    v4.0.1 Release

    Thanks @jjatie, 4.0.1 release brings:

    Support Swift Package Manager and switch to another Snapshot test framework.

    Use Github Actions instead of Travis CI to run faster and work around Carthage issues against Xcode12.

    Snapshot UT now supports Apple Silicon.

    Adopt Swift-Algorithm crafted by Apple and the community.

    Full changelog


    We have merged our long waited 4.0 branch into master. It adopts latest Swift trends and benefits and more flexbile and More swift!

    This is a huge release as a lot of APIs have changed and adopted new protocols. So please expect it will break your code especially about the collection protocols. We will add a few Pull requests in the near future such as https://github.com/danielgindi/Charts/pull/4411.

    The pre-release could last a little bit longer since we don't want to push people to update. But we do encourage people to try it out and give us feed back.

    Source code(tar.gz)
    Source code(zip)
  • v3.6.0(Sep 21, 2020)

  • v3.5.0(Apr 16, 2020)

    Build on Xcode 11.4 and latest Swift (pod)

    Change log:https://github.com/danielgindi/Charts/blob/master/CHANGELOG.md

    Merged pull requests: Full github commit log

    Source code(tar.gz)
    Source code(zip)
  • v3.4.0(Oct 8, 2019)

    Support Xcode 11 and new Swift 5

    Bug Fix

    #4029: Index out of bounds exception in v3.2 in createAccessibleElement #4094: Horizontal Bezier Line Graph Not Drawing Through All Points #4093: Line chart x axis animation is broken #4099: Line renderer did not render lines if their coordinates fell outside of the viewport full change log:https://github.com/danielgindi/Charts/blob/master/CHANGELOG.md

    pod updated

    Source code(tar.gz)
    Source code(zip)
  • v3.3.0(Apr 23, 2019)

    This will be a breaking update due to #3847 that we changed dataSet initializers API interface and fixed Xcode warnings for previous release.

    pod has been updated again to 3.3.0 tag, it's previously using 3.3

    Now supports Xcode 10.2 and Swift 5.0

    Highlights of fixed issues and merged requests:

    Full change log

    https://github.com/danielgindi/Charts/blob/master/CHANGELOG.md

    Source code(tar.gz)
    Source code(zip)
  • v3.2.2(Feb 12, 2019)

    Highlights:

    Implemented enhancements:

    • Multiple colors for valueline (Fixes #3480) #3709 (AlexeiGitH)
      • use useValueColorForLine to enable the same colors
    • Add Collection conformances to ChartDataSet types #3815 (jjatie)
    • improvements in barRect height calculation #3650 (potato04)

    Fixed bugs:

    • CombinedChartView's candleData don't display in v3.2.0 #3662
    • Incorrect behavior for AxisBase.axisMaxLabels #3656
    • Horizontal Bar Chart legend issue #3301
    • Fixes sharp edges on the line chart #3764 (stokatyan)
    • Fix wrong assignment to axisMaxLabels property #3721 (ggirotto)
    • Fix legend offset bug for horizontal bar chart (Fixes #3301) #3736 (SvenMuc)
    • Add missing properties to copy(with:) methods #3715 (dstranz)
    • Fix applying lineCap value for line chart data sets (Fixes #3739) #3740 (anton-filimonov)
    • Fix memory leak after rendering #3680 (YusukeOba)
    • Fix condition that is checked before chartTranslated delegate method call #3804 (anton-filimonov)

    Other merged pull requests:

    Full changelog: https://github.com/danielgindi/Charts/blob/master/CHANGELOG.md

    Source code(tar.gz)
    Source code(zip)
  • v3.2.1(Oct 8, 2018)

  • v3.2.0(Sep 16, 2018)

  • v3.1.1(Apr 2, 2018)

  • v3.1.0(Mar 21, 2018)

    3.1 Release

    (including pod)

    1. Refactored some components to better align with latest Swift language trend by jjatie.
    2. For bug and PRs, please check changelog, or https://github.com/danielgindi/Charts/projects/6
    3. New unit tests for pie chart.
    4. Support Xcode 9.2 and Swift 4.0.3

    We are making Swift refactoring recently and target for 4.0 release along with some other features, thanks everyone for improving this project!

    Source code(tar.gz)
    Source code(zip)
  • v3.0.5(Jan 7, 2018)

    Refactoring and New

    1. Refactored some components to better align with latest Swift language trend by jjatie.
    2. Add a new DataApproximator+N #2848 by 666tos.
    3. New unit tests for CombinedChartView and demo builds checker.

    We are making Swift refactoring recently and target for 4.0 release along with some other features, thanks everyone for improving this project!

    Bug fixes

    to name a few that may impact users, others please refer change log:

    1. #2257 HorizontalBarChart does not update labels correctly
    2. #3132 Fix axis label disappear when zooming in deep enough
    3. #3149 Subclassing of LegendRenderer didn't take any effect
    4. #2049 fix the issue with axis dependencies in CombinedChartView
    5. Fix some Swift 4.0.3 errors to support Xcode 9.2
    Source code(tar.gz)
    Source code(zip)
  • v3.0.4(Sep 20, 2017)

  • v3.0.3(Sep 7, 2017)

  • v3.0.2(Apr 3, 2017)

  • v3.0.1(Nov 20, 2016)

    1. This release improves stability and fixes bugs.
    2. Added a new IndexAxisValueFormatter that you can pass an array of labels and have them behave like in Charts 2.0
    Source code(tar.gz)
    Source code(zip)
  • v2.3.1(Nov 4, 2016)

    Disclaimer: This is a legacy release to support Swift 2.3 for Charts v2.2.5. You are encouraged to move to Swift 3.0 and Charts 3.0

    Updates:

    • NSTouch extension for locationInView made the compiler error because it clashes with objc selector. Since it was not used in the library code it was removed.
    • Fix the image type of NSUIImagePNGRepresentation to be png instead of jpeg
    Source code(tar.gz)
    Source code(zip)
  • v2.3.0(Sep 20, 2016)

    Disclaimer: This is a legacy release to support Swift 2.3 for Charts v2.2.5. If you need Swift 3.0 support please wait for Charts v3.0.0 to be released

    Updates:

    • We've moved to Swift 2.3, which means that the minimum required Xcode version is now 8.0
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(Oct 19, 2016)

    This is a major release, with a few breaking changes. So please pay attention.

    Updates:

    • x-indexes are dead. Intoducing: x-values. Each entry now has an x and a y.
    • Pie/radar charts do not have a concept of X index anymore
    • Unified XAxis/YAxis features and experience.
    • Unified formatter interfaces for axes.
    • New formatter for y values, not inheriting from NSNumberFormatter anymore, to have dataSet and viewport information to take better formatting decisions.
    • Major refactoring of the Highlight mechanism.
    • Refactored marker mechanism
    • Refactored legend entry mechanism
    • Each dataset can now set its own legend form/size/etc.
    • More demos
    • Some classes have been renamed, keeping the namespaced name only in ObjC (using Swift 2.2 objc(...) feature, and the change of a major version update)
    • FillFormatter now has a block representation using FillFormatter.withblock(...)
    • Same goes for all Default formatters too.
    • No more saveToCameraRoll(). Since Xcode 8.0 it causes "privacy" issues with Apple Review, you have to add the photo albums privacy key to your Info.plist for that.
    • Moved to Swift 3.0. Make sure your project conforms to Swift 3.0.
    • Many minor bug fixes and improvements

    Breaking changes / how to migrate:

    • All dataset constructors have changed - they do not take an array of x-indices anymore.
    • All entry constructors have changed - they take in an X and a Y.
    • Pie and Radar chart entries now have their own classes. So exchange the Entry classes withPieChartDataEntry/RadarChartDataEntry
    • If you have any old startAtZeroEnabled calls - these have been deprecated for a long time. Replace them with axisMinimum.
    • If you are using formatters:
      • Replace any chart.valueFormatter = formatter with chart.valueFormatter = ChartDefaultValueFormatter(formatter: formatter) or chart.valueFormatter = [[ChartDefaultValueFormatter alloc] initWithFormatter:formatter];
      • Replace any axis.valueFormatter = formatter with axis.valueFormatter = ChartDefaultAxisValueFormatter(formatter: formatter) or axis.valueFormatter = [[ChartDefaultAxisValueFormatter alloc] initWithFormatter:formatter];
    • In general, all functions that accepted x-indices before, now accept an x-value, so you might have to adjust the names a little bit.
    • Where ChartViewDelegate is implemented, update the chartValueSelected interface
    • Replace drawSliceTextEnabled with drawEntryLabelsEnabled
    • If you have a custom scatter shape - implement an IShapeRenderer, and put your rendering code in there
    • If you have a custom marker - consider subclassing MarkerView/MarkerImage or implementing IMarker. There are more options than before now...
    • If you have used barSpace before, move to using barWidth
    • If you used saveToCameraRoll(), replace with UIImageWriteToSavedPhotosAlbum(chart.getChartImage(trasparent: false), nil, nil, nil)
    • Some classes have been renamed for a cleaner look. They do not contain the "Chart" prefix anymore. That's for Swift only, where there are namespaces. In ObjC the names stayed the same for the sake of namespacing, using Swift 2.2's feature of @objc(name). If your compiler yells that a class does not exist, try to remove the Chart from its name. This should rarely happen, as we've chosen only the classes that are rarely instantiated by the user.
    Source code(tar.gz)
    Source code(zip)
  • v2.2.5(May 30, 2016)

    • New: Horizontal cubic bezier lines for Line chart (through mode property)
    • New: Allow transparent color in circle hole color (Line chart)
    • New: circleHoleRadius property for more control over line chart circles
    • New: PieChart values outside of chart (connected with lines)
    • New: highlightFullBar for highlighting all values on an x-index at once
    • New: Allow setting xVals on existing Data objects
    • New: Allow bubble sizes to not be normalized against the dataset max
    • New: Added material color template
    • New: Flag to control whether we draw a limit line's labels
    • New: Exploded the Legend-Position enum to support more combinations
    • New: Allow drawing borders for bars in a Bar chart
    • Improved: Highlighting when multiple values on x-index present (bubble chart, combined chart)
    • Fixed: We are now taking into account the extra offsets for Pie/Radar chart view
    • Fixes regarding MarkerView
    • Fixes regarding the transition to Swift 2.2
    • Improvements to Demo, now keeping dataset styling when changin dataset size
    • General bugfixes

    Why newborn release? Because I have an amazing new baby girl!

    Source code(tar.gz)
    Source code(zip)
  • v2.2.4(Mar 31, 2016)

    • Breaking change: Simplified setting axis min and max value. Now instead of 4 different confusing variables for axis min/max, there's only one to mess with: axisMinValue and axisMaxValue. These are instead of customAxisMin/customAxisMax. And axisMinimum/axisMaximum do not exist anymore. (This change happened on the Android side too, and is mutually compatible)
    • We've moved to Swift 2.2, which means that the minimum required Xcode version is now 7.3
    • New support for stepped line charts!
    • The new zero-line feature now defaults to false
    • Fixes related to cubic-lines
    • Improvements to edge cases in Pie charts
    • Many more bugfixes
    Source code(tar.gz)
    Source code(zip)
  • v2.2.3(Feb 29, 2016)

    • OSX support! (Thanks goes to @pixelspark)
    • Viewport can now me moved with animations
    • New candlestick rendering mode - without the bars, just lines and ticks
    • New X shape for scatter chart
    • PieChart improvements (slice spacing and other stuff)
    • CandleStickChart improvements
    • BubbleChart improvements
    • RadarChart improvements
    • ScatterChart improvements
    • General improvements and bugfixes
    Source code(tar.gz)
    Source code(zip)
  • v2.2.2(Feb 9, 2016)

    • ChartsRealm is a separate framework now (to avoid dependency problems)
    • Add support for setting different colors for values
    • Other minor fixes
    Source code(tar.gz)
    Source code(zip)
  • v2.2.1(Feb 1, 2016)

  • v2.2.0(Jan 26, 2016)

    • Plotting data directly from Realm.io mobile data base
    • Realm.io tutorial
    • Introducing DataSet interfaces (e.g. ILineDataSet), allowing you to implement other sources for datasets, which could possibly be dynamic.
    • Made all renderer members public for extensibility, due to lack of protected in Swift
    • Many bugfixes and little improvements

    Note: This release may contain breaking changes for you if you have subclassed datasets/renderers.

    Source code(tar.gz)
    Source code(zip)
  • v2.1.6(Nov 2, 2015)

    • Feature: XAxis labels can now be rotated
    • Feature: Disable tap-highlighting separately from highlighting via drag or programmatically
    • Feature: Support for customizing description text position
    • Feature: Full tvOS support with Xcode 7.1
    • Bugfix: Default number of lines to skip in RadarChart was wrong
    • Bugfix: avoidFirstLastClipping has weird offsets sometimes
    • Bugfix: Fixed a case where of highlight not clearing on first tap
    • Bugfix: Fixes a potential crash in drawCircles()
    • Bugfix: Fixed deltaX in combined chart was not calculated in some cases
    • Bugfix: Fixed a bug where panning was disabled in BarLineChart if a drag offset was set
    • Improvements: More "dynamic" control over position of MarkerView
    • Other minor bugfixes
    Source code(tar.gz)
    Source code(zip)
  • v2.1.5(Oct 15, 2015)

    • LimitLine improvements (more customizeability)
    • Highlight improvements
    • Animation bug fixes
    • PieChart offset fixes
    • PieChart center text now supports NSAttributedString (centerAttributedText is recommended instead of centerText)
    • Support for custom alpha for pie hole
    • Minor bugfixes
    • Some code cleanup
    • Code safety improvements using Swift 2.0 (guard etc.)
    • Changed renderer delegates into DataProvider protocols, that more closely matches the Android version, and allows more flexibility.
    • Custom minimum offset for Bar/Line/Pie charts
    • Support for legends above the chart
    • A new tvOS target
    Source code(tar.gz)
    Source code(zip)
  • v2.1.4a(Oct 2, 2015)

    This is an intermediate release, with the following:

    1. CRITICAL fix for Radar Chart, for a bug that caused an endless loop due to skipWebLineCount feature.
    2. Custom minimum offset for Bar/Line/Pie charts
    3. Support for legends above the chart
    4. A new tvOS target
    5. Other minor features
    6. Other minor bugfixes and improvements
    Source code(tar.gz)
    Source code(zip)
  • v2.1.4(Sep 21, 2015)

    • Moved to Swift-2.0 (Xcode 7)
    • PieChart and HorizontalBarChart now support Markers
    • Introducing FillFormatter for individual LineDataSets
    • Introducing XAxisValueFormatter for custom XAxis label formatting
    • General bugfixes and improvements

    This release contains the binaries of 2.1.4a release, for Carthage users. This is to prevent the hanging Radar chart problem. Since Carthage does not support letters after version numbers, we can't rely on 2.1.4a for Carthage users.

    Source code(tar.gz)
    Source code(zip)
  • v2.1.3(Aug 5, 2015)

    This is just to catch up with missing changes in the Android version, and a few very minor fixes since then (Mainly concerning highlights).

    Source code(tar.gz)
    Source code(zip)
  • v2.1.2(Jul 26, 2015)

    • Stacked BarChart fixes for mixed positive/negative values
    • Fixed ChartMarker position in BarChart
    • Feature to allow forcing fixed number of YAxis labels
    • General bugfixes
    Source code(tar.gz)
    Source code(zip)
Owner
Daniel Cohen Gindi
Daniel Cohen Gindi
iOS Interactive Side Menu written in Swift.

Interactive Side Menu A customizable, interactive, auto expanding and collapsing side menu for iOS written in Swift. Here are some of the ways Interac

Handsome 703 Nov 26, 2021
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less.

▤ SideMenu If you like SideMenu, give it a ★ at the top right of this page. SideMenu needs your help! If you're a skilled iOS developer and want to he

Jon Kent 5.2k Nov 14, 2021
A simple side menu for iOS written in Swift.

ENSwiftSideMenu A lightweight flyover side menu component for iOS with the UIDynamic's bouncing animation, UIGestures and UIBlurEffect. Allows you to

Evgeny Nazarov 1.8k Nov 19, 2021
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.

SPStorkController About Controller as in Apple Music, Podcasts and Mail apps. Help if you need customize height or suppport modal style in iOS 12. Sim

Ivan Vorobei 2.5k Nov 20, 2021
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.

SPStorkController About Controller as in Apple Music, Podcasts and Mail apps. Help if you need customize height or suppport modal style in iOS 12. Sim

Ivan Vorobei 2.5k Nov 12, 2021
Custom segue for OSX Storyboards with slide and cross fade effects (NSViewControllerTransitionOptions)

CustomSegue Custom segue for OSX Storyboards. Slide and cross fade effects, new customized window. class MyViewController: NSViewController { overr

Eric Marchand 122 Jul 3, 2021
A swifty iOS framework that allows developers to create beautiful onboarding experiences.

SwiftyOnboard is being sponsored by the following tool; please help to support us by taking a look and signing up to a free trial SwiftyOnboard A simp

Juan Pablo Fernandez 1k Nov 12, 2021
A beautiful and easy-to-use progress HUD for your iOS.

日本語 KRProgressHUD is a beautiful and easy-to-use progress HUD for your iOS written by Swift. KRActivityIndicatorView is used for loading view. Feature

K.R.Impedance 613 Nov 25, 2021
A UI/UX framework for creating beautiful applications.

Material Welcome to Material, a UI/UX framework for creating beautiful applications. Material's animation system has been completely reworked to take

Cosmicmind 11.9k Nov 16, 2021
A beautiful radar view to show nearby items (users, restaurants, ...) with ripple animation, fully customizable

HGRippleRadarView Example To run the example project, clone the repo, and run pod install from the Example directory first. This project is inspired b

Hamza Ghazouani 326 Oct 28, 2021
Beautiful flag icons for usage in apps and on the web.

FlagKit Beautiful flag icons for usage in apps and on the web. All flags are provided as stand-alone PNG and SVG files. FlagKit also provides an Asset

Bowtie 2.8k Nov 12, 2021
Beautiful animated placeholders for showing loading of data

KALoader Create breautiful animated placeholders for showing loading of data. You can change colors like you want. Swift 4 compatible. Usage To add an

Kirill Avery 105 Oct 28, 2021
Beautiful animated Alert View. Written in Swift

SCLAlertView Animated Alert View written in Swift, which can be used as a UIAlertView or UIAlertController replacement. Since UIAlertView is deprecate

Viktor Radchenko 5.2k Nov 14, 2021
A beautiful and flexible text field control implementation of "Float Label Pattern". Written in Swift.

SkyFloatingLabelTextField SkyFloatingLabelTextField is a beautiful, flexible and customizable implementation of the space saving "Float Label Pattern"

Skyscanner 3.9k Oct 28, 2021
A fully customisable subclass of the native UIControl which allows you to create beautiful buttons without writing any line of code.

A fully customisable subclass of the native UIControl which allows you to create beautiful buttons without writing any line of code. Preview You'll be

Lorenzo Greco 2.2k Nov 10, 2021
🔄 GravitySlider is a beautiful alternative to the standard UICollectionView flow layout.

GravitySliderFlowLayout Made by Applikey Solutions Find this project on Dribbble Table of Contents Purpose Supported OS & SDK Versions Installation Us

Applikey Solutions 850 Nov 21, 2021
Lightweight dropdown message bar in Swift. It's simple and beautiful.

SwiftyDrop SwiftyDrop is a lightweight pure Swift simple and beautiful dropdown message. Features Easy to use like: Drop.down("Message") Message field

Morita Naoki 693 Nov 19, 2021
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable

Q: How will my calendar dateCells look with this library? A: However you want them to look. More Images Features Range selection - select dates in a r

PatchTheCode 7.1k Nov 20, 2021
Custom interactive transition like Apple Music iOS App (iOS 9). written in Swift.

MusicPlayerTransition Custom interactive transition like Apple Music iOS App. written in Swift. Demo See demo on Appetize.io Using Transition Animator

Airin 641 Nov 11, 2021