explaingit

chartsorg/charts

Analysis updated 2026-06-20

28,002SwiftAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

DGCharts is a Swift library for drawing rich charts and graphs in iOS, tvOS, and macOS apps, the Apple-platform sibling of the popular MPAndroidChart Android library.

Mindmap

mindmap
  root((DGCharts))
    What it does
      Draw charts in apps
      iOS tvOS macOS
      Real-time updates
    Chart types
      Line
      Bar
      Pie
    Integration
      CocoaPods
      Swift Package Manager
      Carthage
    Use cases
      Dashboard apps
      Finance apps
      Cross-platform teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add line charts, bar charts, or pie charts to an iOS app when Apple's built-in chart options are too limited or not available on older OS versions.

USE CASE 2

Share charting logic and concepts between an iOS and Android app by pairing DGCharts with MPAndroidChart.

USE CASE 3

Display real-time data as a live-updating chart inside a tvOS or macOS app.

What is it built with?

SwiftObjective-CiOSmacOStvOS

How does it compare?

chartsorg/chartsjordanbaird/icerxhanson/rectangle
Stars28,00227,79029,001
LanguageSwiftSwiftSwift
Setup difficultymoderateeasyeasy
Complexity2/51/51/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Add via Swift Package Manager or CocoaPods, note the v5+ rename to DGCharts requires updating imports from Charts to DGCharts.

Apache 2.0 license, use freely for any purpose including commercial apps, just keep the copyright notice.

In plain English

Charts is a library for drawing charts and graphs inside apps that run on Apple's platforms, iOS, tvOS, and macOS. The description calls it the Apple-side counterpart of MPAndroidChart, a popular Android charting library by Philipp Jahoda, and the README states it is kept in sync with that Android project. The selling point is that if your team builds the same product for both Android and iOS, the API and concepts stay very similar across platforms, so you don't have to learn a different charting library on each side. The library is written in Swift so the compiler can optimize it, and it is usable from both Swift and Objective-C projects, the bundled demo is written in Objective-C to show that. The README notes that starting with version 5.0 the library was renamed to DGCharts to avoid clashing with Apple's own Swift Charts, and that this is a breaking change with migration notes. You consume it as an embedded framework: drag the Xcode project into yours, add the framework to your target, and import DGCharts. There is optional integration with Realm through a separate ChartsRealm package. Installation is supported via CocoaPods (pod 'DGCharts'), Carthage with prebuilt binaries, and Swift Package Manager. You would reach for this when you want richer charts than the system gives you for free, when you need to support older OS versions where Apple's native chart framework is unavailable, or when you want consistent charting code shared with an Android codebase using MPAndroidChart. The README links out to third-party video tutorials, blog posts, and Xamarin bindings for both iOS and Android.

Copy-paste prompts

Prompt 1
Using DGCharts in Swift, show me how to create a line chart that displays monthly sales data with labels on the X axis and custom colors.
Prompt 2
Write the Swift code to add a bar chart to a UIViewController using DGCharts, with animated entry and a legend at the bottom.
Prompt 3
Show me how to install DGCharts via Swift Package Manager and display a simple pie chart in SwiftUI.
Prompt 4
Give me a DGCharts example that updates a line chart in real time as new data points arrive every second.

Frequently asked questions

What is charts?

DGCharts is a Swift library for drawing rich charts and graphs in iOS, tvOS, and macOS apps, the Apple-platform sibling of the popular MPAndroidChart Android library.

What language is charts written in?

Mainly Swift. The stack also includes Swift, Objective-C, iOS.

What license does charts use?

Apache 2.0 license, use freely for any purpose including commercial apps, just keep the copyright notice.

How hard is charts to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is charts for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub chartsorg on gitmyhub

Verify against the repo before relying on details.