data-visualization/DSBarChart
DSBarChart
data-visualizationVertical bar chart with entry animation, value labels on each bar, and configurable axis labels.
iOS 17+macOS 14+
Purpose
Categorical comparisons in dashboards.
Interactive Reference
Live showroom
Need the full visual surface?
Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().
Best for exploring:
variants, states, categories, and real app examples in one place.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| datareq | [DSChartDataPoint] | โ | Array of (label, value) pairs. |
| tint | Color | DSColor.primary | Bar fill colour. |
| showValues | Bool | true | Shows value labels above bars. |
| height | CGFloat | 200 | Chart height. |
Examples
Monthly sign-ups
Bar chart per month.
swift
DSBarChart(
data: monthlySignups.map { DSChartDataPoint(label: $0.month, value: Double($0.count)) },
tint: DSColor.accent,
showValues: true
)