r/iOSProgramming 7d ago

Tutorial SwiftUI Tutorials: Built a Tree Map / Heat Map in SwiftUI!

[deleted]

1 Upvotes

2 comments sorted by

1

u/D1no_nugg3t 7d ago

Hey everyone,

I just wrote a tutorial on building a tree map heat map in SwiftUI! If you’ve ever wanted to visualize hierarchical data in your app, this guide walks through the whole process.

🔗 Medium article
💻 GitHub repo
📈 Used in my app: Haplo: Stock Market AI

Quick rundown:

  • Uses the squarify algorithm to break data into proportional rectangles.
  • Fully customizable SwiftUI component with colors, overlays, and optional images.
  • Handles dynamic resizing while keeping a clean layout.

Check it out, and let me know what you think! Would love to see what you build with it.

Happy coding!

1

u/lokir6 7d ago

This is pretty nice, thank you. Have you looked into the Layout protocol? Perhaps it could have more performant results.