Components/Charts/Bar Chart
Bar Chart

Bar Chart

NFrom Nibware

A hand-built bar chart — self-contained SwiftUI, no chart framework, restyles from one accent.

Charts · 49 lines · SwiftUI · iOS 17+

The actual source

BarChart.swift
import SwiftUI

extension View {
    func formaCard(_ pad: CGFloat = 18) -> some View {
        self.padding(pad)
            .background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: 20, style: .continuous))
            .overlay(RoundedRectangle(cornerRadius: 20, style: .continuous).stroke(Color.primary.opacity(0.06), lineWidth: 1))
            .shadow(color: .black.opacity(0.05), radius: 14, x: 0, y: 6)
    }
}

struct CardHeader: View {

What it needs

Self-contained SwiftUI - system materials, SF Symbols, no external dependencies. Everything it needs - tokens, sub-views, models - is carried in the copy-paste source above.

formaCardCardHeader