Skip to content

0.2.0

Latest

Choose a tag to compare

@AndroidPoet AndroidPoet released this 24 Jun 19:19

Toward a consistent, accessible charting library.

♿️ VoiceOver accessibility for every chart

A Canvas is opaque to assistive technology, so each chart is now collapsed into a single accessibility element whose label (the chart kind) and value (a data summary) come from its ChartRenderer. Charts announce e.g. "Area chart, 3 points, Jan 40, Feb 65, Mar 30" or "Gauge, Score 72 of 0 to 100" with no work at the call site. ChartRenderer gains accessibilityLabel / accessibilityValue (both with defaults) so custom renderers describe themselves the same way.

🧩 One consistent, bare initializer API (breaking)

The remaining charts that took a data: SomeStructData(...) wrapper now take their bound elements directly, matching the point/series charts:

  • PieChart(slices:) / DonutChart(slices:) — new top-level PieSlice
  • GaugeChart(value:min:max:label:color:)
  • FunnelChart(stages:), TreemapChart(items:), SunburstChart(roots:), BulletChart(metrics:), BoxPlotChart(groups:), PolarAreaChart(slices:)
  • SankeyChart(nodes:links:), CandlestickChart(candles:movingAverages:), BubbleChart(series:), Heatmap(contributions:baseColor:backgroundSquareColor:)

The 12 *Data wrapper structs were removed; the element types are unchanged.

Migration: drop the data: wrapper — PieChart(data: PieChartData(slices: s))PieChart(slices: s).

Full notes in CHANGELOG.md.