ChartsOrg/Charts
57.9
Adequate · 22 September 2026
24.7k
lines of production code
Swift
with Objective-C
5
measurements over time
What this system is
DGCharts is a cross-platform charting library for iOS and macOS that provides a comprehensive set of visualizations including bar, line, scatter, bubble, candlestick, and combined charts. The system features a modular architecture with dedicated view classes, renderers, and data models for each chart type, supporting advanced interactions like custom markers, precise highlighting, and animated viewport changes. It includes utilities for data approximation, value formatting, and animation easing, while maintaining compatibility with Apple's App Store privacy requirements.
How it got here
2015–2016 — DGCharts framework restructure
15 changes.
This period focused on renaming the library to DGCharts and refactoring the internal architecture to support both iOS and macOS platforms. The work introduced a comprehensive set of new chart types, data models, and renderers, while also adding advanced animation and data approximation features.
2017–2024 — DGCharts rebranding and platform expansion
15 changes.
This period was defined by the library's rebranding to DGCharts and the addition of modern package manager support. The work focused on updating all demo applications for iOS and macOS to use the new framework, while also introducing Objective-C support and comprehensive test coverage.
Features
Add Objective-C demo app for iOS
The ChartsDemo iOS application is now available in Objective-C, providing a native iOS demo project with a main menu listing various chart types (line, bar, pie, radar, etc.) and a base view controller for common chart interactions. This includes the app delegate, view controllers, and supporting files (Info.plist, bridging header) to run the demo on iOS devices.
ChartsDemo-iOS/Objective-C · high confidence
Add Radar and XY marker view components for chart interactions
The ChartsDemo iOS application now includes two new Swift components, RadarMarkerView and XYMarkerView, which provide custom marker views for displaying data point information on radar and other chart types. These components import the DGCharts framework and implement the necessary logic to display formatted data entries when users interact with the charts.
ChartsDemo-iOS/Swift/Components · high confidence
Add iOS chart demo views for bar, bubble, candlestick, combined, cubic line, half-pie, horizontal bar, and line charts
The ChartsDemo-iOS/Swift/Demos directory now includes new Swift view controllers for various chart types, including bar, bubble, candlestick, combined, cubic line, half-pie, horizontal bar, and line charts. Each controller configures its respective chart view with specific data, styling, and interactive options, providing a comprehensive set of examples for iOS users to explore different charting capabilities.
ChartsDemo-iOS/Swift/Demos · high confidence
Add macOS demo application for Charts
The Charts library now includes a macOS demo application (ChartsDemo-macOS) that showcases bar, line, pie, and radar chart visualizations. This new macOS port allows users to explore the library's capabilities on the Mac platform, featuring standard application structure with an app delegate, storyboard, and demo view controllers for each chart type.
ChartsDemo-macOS/ChartsDemo-macOS · high confidence
Add macOS playground demos for all chart types
The ChartsDemo-macOS/PlaygroundChart.playground now includes interactive Swift playground pages for Bar, Line, Pie, Radar, Scatter, Combined, Horizontal Bar, Candle, Stacked Bar, and Bubble charts. Each page demonstrates the corresponding chart type using the DGCharts framework, allowing users to explore and modify chart configurations directly in Xcode.
ChartsDemo-macOS/PlaygroundChart.playground · high confidence
Add new marker components for chart interactions
The ChartsDemo iOS application now includes three new Swift components for customizing chart markers: BalloonMarker, RadarMarkerView, and XYMarkerView. These additions provide demo implementations for displaying contextual information on charts, with BalloonMarker handling custom drawing and offset calculations, RadarMarkerView managing label updates for radar charts, and XYMarkerView extending BalloonMarker to display both X and Y axis values.
ChartsDemo-iOS/Objective-C/Components · high confidence
Added data approximation for chart line reduction
Introduced a new \DataApproximator\ class and its extension \DataApproximator+N\ in the Charts Filters module. These components implement the Douglas-Peucker algorithm to reduce the number of points in chart data series, allowing for more efficient rendering and smoother line drawing by approximating complex paths with fewer key points.
Source/Charts/Filters · high confidence
Introduced configurable animation easing for chart animations
The Charts library now supports a wide range of easing functions for chart animations. Users can choose from 30+ predefined easing options (such as easeInQuad, easeOutCubic, easeInOutBounce, etc.) or provide a custom easing function to control the speed and timing of x and y axis animations, allowing for more polished and natural-looking motion effects.
Source/Charts/Animation · high confidence
Introduced new data model classes for bar, bubble, candle, and combined charts
The library now includes dedicated data container and entry classes for specific chart types. This adds \BarChartData\ and \BarChartDataSet\ to support grouped and stacked bar charts, \BubbleChartData\ and \BubbleChartDataEntry\ for bubble charts, \CandleChartData\ and \CandleChartDataEntry\ for candlestick charts, and \CombinedChartData\ to manage multiple chart types simultaneously. These classes provide the underlying data structures required to render these specific visualizations.
Source/Charts/Data · high confidence
New chart formatters for axis and value display
Added new formatters to customize how chart data is displayed. This includes the AxisValueFormatter protocol and its implementations (DefaultAxisValueFormatter, IndexAxisValueFormatter) for controlling x-axis labels, as well as ValueFormatter and its default implementation for general value formatting. Additionally, FillFormatter and DefaultFillFormatter were added to control the fill area of line charts. These changes provide more flexible ways to format and display chart data.
Source/Charts/Formatters · high confidence
New chart highlighter classes for precise value selection
The Charts library introduces a new set of highlighter classes in the Source/Charts/Highlight directory, including BarHighlighter, ChartHighlighter, CombinedHighlighter, and specific highlighters for Pie, Radar, and Horizontal Bar charts. These classes implement the Highlighter protocol to handle touch interactions and return Highlight objects that identify the exact data point or stack segment under the user's finger. This change refactors how chart interactions are processed, enabling more accurate highlighting for complex chart types like stacked bars and combined charts.
Source/Charts/Highlight · high confidence
New chart view classes for bar, line, scatter, bubble, candlestick, and combined charts
The Charts library now exposes specific view classes for each chart type, each inheriting from a common base. BarChartView, LineChartView, ScatterChartView, BubbleChartView, CandleStickChartView, and CombinedChartView are all new concrete implementations that configure their respective renderers and highlighters. These views inherit from BarLineChartViewBase, which provides shared functionality for panning, zooming, and gesture handling. Additionally, PieChartView and RadarChartView are introduced as new implementations for their respective chart types, inheriting from PieRadarChartViewBase. This change organizes the charting API by providing distinct, typed views for each data visualization type, improving clarity and allowing for type-specific properties and methods.
Source/Charts/Charts · high confidence
New scatter shape renderers for charts
Added renderers for new scatter chart shapes, including chevron up and down, circle, cross, square, triangle, and X. These renderers implement the ShapeRenderer protocol to draw the respective shapes at data points, supporting size, color, and hole configurations for each shape type.
Source/Charts/Renderers/Scatter · high confidence
New viewport job classes for chart animations and zooming
Added new Swift classes in the Charts library to handle animated viewport changes and zooming: AnimatedViewPortJob and its subclasses AnimatedMoveViewJob and AnimatedZoomViewJob, which manage animation loops and easing; plus non-animated counterparts MoveViewJob and ZoomViewJob. These classes encapsulate the logic for translating and scaling the chart view, allowing for smoother user interactions and visual feedback.
Source/Charts/Jobs · high confidence
Refactored chart rendering architecture with new base classes and protocols
The chart rendering system has been restructured to improve code organization and accessibility support. A new \DataRenderer\ protocol and \BarLineScatterCandleBubbleRenderer\ base class have been introduced to unify the rendering logic for bar, line, scatter, candle, and bubble charts. Specific renderers like \BarChartRenderer\ and \LineChartRenderer\ now inherit from this base class, which handles common tasks such as managing \XBounds\ for visible data points and populating \accessibleChartElements\ for VoiceOver. Additionally, an \AxisRenderer\ protocol has been added to standardize the rendering of axis labels, grid lines, and limit lines. This refactoring allows for easier maintenance and consistent behavior across different chart types.
Source/Charts/Renderers · high confidence
Release 5.1.0 with privacy manifest and chart limit line label rotation
The library has been updated to version 5.1.0, which introduces the ability to rotate the label of a ChartLimitLine. This release also includes a new privacy manifest file to comply with Apple's App Store requirements. Additionally, the changelog has been updated to reflect the changes in this release.
(repo-wide) · high confidence
Architecture
Extracted chart components into dedicated classes
The charting library's internal structure has been refactored by extracting core visual elements into separate, dedicated component classes. This includes \AxisBase\ for axis configuration, \ChartLimitLine\ for limit lines, \ComponentBase\ as a shared base class, \Description\ for chart titles, \Legend\ and \LegendEntry\ for legend management, \Marker\ protocol and its \MarkerImage\/\MarkerView\ implementations for data point annotations, and specific axis classes like \XAxis\ and \YAxis\. This change organizes the codebase by separating concerns, making it easier to customize and maintain individual chart elements.
Source/Charts/Components · high confidence
Behavioural changes
6 commits (0 fixes) modifying Assets
A change to existing behaviour in Assets — 6 commits, 2 files.
Assets · medium confidence · unverified
Added privacy manifest for App Store compliance
A new PrivacyInfo.xcprivacy file has been added to the Charts module. This privacy manifest declares that the component does not track users, collect data, or access restricted APIs, ensuring the library meets current App Store submission requirements for privacy transparency.
Source/Charts · high confidence
Introduce DGCharts framework headers and configuration
The library has been renamed from 'Charts' to 'DGCharts'. This change introduces the new 'DGCharts.h' header file, which conditionally imports UIKit or Cocoa headers depending on the target platform, and defines version number and string exports. Additionally, the 'Info.plist' file is added to the project, configuring the framework bundle with standard metadata such as bundle identifier, package type (FMWK), and versioning placeholders.
Source/Supporting Files · high confidence
Refactored chart utility classes and added platform abstraction layers
The \ChartUtils\ class and related utility files have been refactored to improve code organization and cross-platform compatibility. Common math and geometry operations have been moved to Swift extensions on \Comparable\, \FloatingPoint\, \CGSize\, \Double\, and \CGPoint\. A new \Fill\ protocol and associated classes (\ColorFill\, \ImageFill\, \LayerFill\, \LinearGradientFill\, \RadialGradientFill\) provide a unified way to fill chart paths. Additionally, platform-specific abstractions have been introduced via \Platform.swift\ and related files, which alias UIKit and AppKit types (such as \NSUIColor\, \NSUIImage\, and gesture recognizers) to allow the charting library to run on both iOS and macOS. Utility files like \Indexed.swift\ and \Partition.swift\ have been added to support collection operations.
Source/Charts/Utils · medium confidence
Renamed framework to DGCharts
The Xcode project and build schemes have been updated to reflect the library's new name, DGCharts. The build configuration now targets DGCharts.framework and DGChartsTests.xctest, ensuring that the correct binary and test targets are built and run under the new name.
Charts.xcodeproj · high confidence
Updated Xcode project schemes for iOS and macOS demo apps
The Xcode project scheme files for the ChartsDemo-iOS and ChartsDemo-macOS applications have been updated. These changes reflect the renaming of the library from 'Charts' to 'DGCharts' and the removal of the 'swift-algorithms' package in favor of manually importing the required functions, ensuring the build schemes align with the new project structure and dependencies.
ChartsDemo-iOS/ChartsDemo-iOS.xcodeproj/xcshareddata, ChartsDemo-macOS/ChartsDemo-macOS.xcodeproj/xcshareddata · medium confidence
Updated Xcode workspace configuration
The Charts.xcworkspace has been updated to include project references for the iOS and macOS demo applications, and workspace settings have been configured to enable automatic context creation. These changes ensure the workspace correctly links the main Charts library alongside its demo projects, streamlining the build and run experience for developers working on the library and its examples.
Charts.xcworkspace · medium confidence
Updated iOS demo app to use the DGCharts library
The iOS demo application has been updated to import and use the DGCharts library, as indicated by the new \\#import \<DGCharts/DGCharts.h\>\ header in the view controllers. This change reflects the renaming of the library from Charts to DGCharts, requiring the demo project to reference the new framework.
ChartsDemo-iOS/Objective-C/Demos, ChartsDemo-iOS/XIBs · high confidence
Updated iOS demo project to use the DGCharts framework
The ChartsDemo iOS project has been updated to reference the DGCharts framework instead of the original Charts library. This change updates the project's build configuration to embed and link against the renamed DGCharts binary, reflecting the library's rebranding. The demo app continues to provide interactive examples of various chart types, but now relies on the DGCharts pod and associated framework.
ChartsDemo-iOS/ChartsDemo-iOS.xcodeproj · high confidence
iOS demo app restructured with modern navigation and UI updates
The iOS demo application has been restructured to use a standard navigation controller with a root view controller listing available chart demos. The navigation bar appearance is now explicitly configured for iOS 13+ using UINavigationBarAppearance, resolving previous transparency issues. The demo app now imports the charting library as 'DGCharts' and includes a comprehensive set of interactive toggle options for various chart types, including candle stick charts.
ChartsDemo-iOS/Swift · medium confidence
macOS demo app updated to use DGCharts framework
The ChartsDemo-macOS project has been updated to reference the DGCharts framework instead of the previous Charts framework. This change updates the project configuration to link against and embed the DGCharts framework, reflecting the library's rebranding or renaming in the codebase.
ChartsDemo-macOS/ChartsDemo-macOS.xcodeproj · high confidence
Test coverage
Added snapshot and unit tests for the Charts module
Added comprehensive test coverage for the Charts module, including snapshot tests for BarChartView, LineChartView, PieChartView, and CombinedChartView, as well as unit tests for ChartData, ChartUtils, and equatable types. The test suite uses the \DGCharts\ module and the \SnapshotTesting\ framework to verify visual output and logic.
Tests/ChartsTests · high confidence
Dependencies
Add Swift Package Manager support and CocoaPods spec for DGCharts
The project now supports Swift Package Manager (SPM) and CocoaPods for dependency management. A new Package.swift defines the DGCharts library with iOS 12, tvOS 12, and macOS 10.12 deployment targets, alongside a dynamic library variant. A corresponding DGCharts.podspec is added for CocoaPods integration. Additionally, the resolved dependencies include swift-snapshot-testing v1.11.0.
(dependencies) · medium confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 54 → 58 (+3.6)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 94 → 80 (-14.1)
- Architecture 100 → 91 (-9.2)
- Maturity 61 → 61 (-0.3)
- Readiness 46 → 60 (+14.5)
- Security 44 → 49 (+5.1)
Resolved (8)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Further orphaned files (smaller)
- No exposed public API
- Orphaned knowledge (Source/Charts/Renderers/BarChartRenderer.swift)
- Scanner failed to run — not a clean result
- Test reliability not included
- complexity unreadable for .swift — churn × complexity hotspots could not be measured
New (308)
- Ambiguous method names: clear() and clearValues() likely perform similar or identical operations (clearing data). The distinction is not obvious from the names alone.
- BarChartRenderer.createAccessibleElement (cognitive 17) (Source/Charts/Renderers/BarChartRenderer.swift)
- BarChartRenderer.drawDataSet (cognitive 42) (Source/Charts/Renderers/BarChartRenderer.swift)
- BarChartRenderer.drawDataSet (cyclomatic 24) (Source/Charts/Renderers/BarChartRenderer.swift)
- BarChartRenderer.drawHighlighted (cognitive 24) (Source/Charts/Renderers/BarChartRenderer.swift)
- BarChartRenderer.drawValues (cognitive 184) (Source/Charts/Renderers/BarChartRenderer.swift)
- BarChartRenderer.drawValues (cyclomatic 48) (Source/Charts/Renderers/BarChartRenderer.swift)
- BarChartRenderer.prepareBuffer (cognitive 104) (Source/Charts/Renderers/BarChartRenderer.swift)
- BarChartRenderer.prepareBuffer (cyclomatic 34) (Source/Charts/Renderers/BarChartRenderer.swift)
- BarLineChartViewBase.calculateLegendOffsets (cognitive 16) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.doubleTapGestureRecognized (cognitive 16) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.draw (cognitive 25) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.draw (cyclomatic 25) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.gestureRecognizer (cognitive 17) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.nsuiGestureRecognizerShouldBegin (cognitive 20) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.nsuiGestureRecognizerShouldBegin (cyclomatic 16) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.panGestureRecognized (cognitive 48) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.panGestureRecognized (cyclomatic 27) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.pinchGestureRecognized (cognitive 63) (Source/Charts/Charts/BarLineChartViewBase.swift)
- BarLineChartViewBase.pinchGestureRecognized (cyclomatic 29) (Source/Charts/Charts/BarLineChartViewBase.swift)
- …and 288 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ChartsOrg/Charts was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 1bad5469f57628782110b05996d4fa00473abf06 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-be726e82e277.