Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Swift
  3. YMTreeMap

YMTreeMap

MITSwift1.1.0

High-performance Swift treemap layout engine for iOS and macOS using the squarified algorithm.

GitHubGitHub
164 stars13 forks0 contributors

What is YMTreeMap?

YMTreeMap is a high-performance treemap layout engine for iOS and macOS, written in Swift. It transforms a list of numerical values into a set of layout rectangles where each rectangle's size represents the relative weight of its corresponding value. The library uses the squarified treemap algorithm to generate rectangles with low aspect ratios, making them visually appealing and efficient for rendering.

Target Audience

iOS and macOS developers who need to integrate treemap visualizations into their applications, particularly those working with data-heavy interfaces like financial dashboards, analytics tools, or hierarchical data displays.

Value Proposition

Developers choose YMTreeMap for its exceptional performance, handling up to 1,000 items in milliseconds, and its flexibility—output rectangles work with CoreGraphics, OpenGL, or custom UICollectionView layouts. Its focused design avoids unnecessary bloat while providing a robust, algorithmically sound layout engine.

Overview

High performance Swift treemap layout engine for iOS and macOS.

Use Cases

Best For

  • Creating financial data visualizations like stock market heatmaps
  • Building analytics dashboards with hierarchical data representation
  • Implementing performance-sensitive treemaps in scrolling table views
  • Developing custom data visualization components for iOS/macOS apps
  • Integrating treemaps with CoreGraphics or OpenGL rendering pipelines
  • Displaying large datasets (up to 1,000 items) with minimal layout latency

Not Ideal For

  • Projects requiring interactive treemaps with out-of-the-box hover effects or click handling
  • Cross-platform applications that need treemap visualizations on web, Android, or other non-Apple platforms
  • Use cases involving hierarchical data with nested categories, as it only accepts flat value lists

Pros & Cons

Pros

Blazing Fast Layout

Benchmarks demonstrate rendering 1,000 items in under 4ms on an iPhone 7 Plus, enabling smooth performance in scrolling table views and real-time applications.

Visually Optimized Output

Implements the squarified treemap algorithm to generate rectangles with low aspect ratios, making treemaps as square as possible for better visual appeal and readability.

Rendering Agnostic

Outputs raw CGRect rectangles, allowing developers to use CoreGraphics, OpenGL, or custom UICollectionView layouts without being locked into a specific rendering pipeline.

Order-Aware Layout

Preserves the input order of values, so when data is sorted before passing it in, the treemap maintains that order for meaningful visual hierarchies.

Cons

Bare-Bones Engine

Only provides layout rectangles with no built-in rendering, styling, or interactivity, requiring significant additional code to create a complete, user-friendly visualization.

Flat Data Model

Accepts a flat list of numerical values and does not natively support hierarchical data structures, which limits its use for complex nested treemaps without manual preprocessing.

Platform Lock-In

Exclusively designed for iOS and macOS with Swift/Objective-C, making it unsuitable for projects targeting other platforms or requiring cross-platform compatibility.

Frequently Asked Questions

Quick Stats

Stars164
Forks13
Contributors0
Open Issues1
Last commit3 years ago
CreatedSince 2017

Tags

#treemap#ios#coregraphics#opengl#data-visualization#uicollectionview#layout-engine#swift#macos

Built With

O
Objective-C
C
CocoaPods
S
Swift

Included in

Swift26.0k
Auto-fetched 1 day ago

Related Projects

SkeletonViewSkeletonView

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Stars12,890
Forks1,122
Last commit4 months ago
MaterialMaterial

A UI/UX framework for creating beautiful applications.

Stars12,017
Forks1,260
Last commit4 years ago
NVActivityIndicatorViewNVActivityIndicatorView

A collection of awesome loading animations

Stars10,700
Forks1,153
Last commit7 months ago
MacawMacaw

Powerful and easy-to-use vector graphics Swift library with SVG support

Stars6,046
Forks567
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub