Skip to content

DrafterCharts 0.1.0

Choose a tag to compare

@AndroidPoet AndroidPoet released this 24 Jun 19:01

First public (pre-1.0) release. While the version is 0.x, the API may still change between minor releases.

Type-safe, point-based API

Charts take bound elements instead of parallel labels/values/colors arrays, so a label can never desync from its value and a color can never index past its data — the mismatch is unrepresentable:

LineChart(points: [ChartPoint("Jan", 40), ChartPoint("Feb", 65)])
GroupedBarChart(series: [ChartSeries(name: "2024", color: .blue, values: [28, 30, 38, 44])], categories: ["Q1","Q2","Q3","Q4"])
WaterfallChart(steps: [WaterfallStep("Sales", 60), WaterfallStep("Costs", -25)], initialValue: 50, startLabel: "Start", totalLabel: "Net")
  • Single-series: [ChartPoint] (Area, Line, StepLine). Multi-series: [ChartSeries] + optional categories (Grouped/Stacked Line, Grouped/Stacked Bar, StreamGraph). SimpleBar[BarItem], Waterfall[WaterfallStep], Scatter[ScatterPoint], Radar[RadarSeries], Gantt[GanttTask] (per-task color).
  • values:-first convenience initializers for the simplest charts.
  • WaterfallChart Start/Total bookend bars via startLabel/totalLabel.

27 chart types

Built on pure SwiftUI Canvas with Catmull-Rom smoothing, gradient fills, reveal animations, and light/dark theming. Zero dependencies.

Install: Swift Package Manager — https://github.com/AndroidPoet/DrafterCharts, pin to 0.1.0.