The charts your AI writes, as native graphics in your app.
LLMs and agents write Vega-Lite well. PlotKit draws it with Core Graphics on iPhone, iPad and Mac, without a WebView.
In development.
Join the waitlistPlotKit renders all 616 official Vega-Lite examples. Here is one from each group of the gallery, rendered on a Mac straight from PlotKit's source.
Table-based plotsWind Vector MapSupported1 of 6 in this group
Area and streamgraphsStreamgraphSupported1 of 6 in this group
MapsEarthquakes ExamplePartial1 of 11 in this group
Circular plotsRadial PlotPartial1 of 6 in this group
Interactive multi-viewInteractive Scatterplot MatrixSupported1 of 8 in this group
Bar chartsStacked Bar ChartPartial1 of 23 in this group
Line chartsMulti Series Line ChartPartial1 of 17 in this group
Histograms and dot plotsIsotype Dot PlotSupported1 of 12 in this group
Layered plotsCandlestick ChartPartial1 of 7 in this group
Small multiplesTrellis AreaSupported1 of 10 in this group
Repeat and concatenationMarginal HistogramsPartial1 of 7 in this group
Composite marksTukey Box Plot (1.5 IQR)Supported1 of 7 in this group
Advanced calculationsCalculate ResidualsSupported1 of 18 in this group
Scatter and strip plotsColored ScatterplotSupported1 of 13 in this group
Labels and annotationLayering Rolling Averages over Raw ValuesPartial1 of 12 in this group
Interactive chartsRectangular BrushSupported1 of 24 in this group
Status comes from the support matrix. Supported: every test spec that uses it matches the reference renderer within tolerance. Partial: a few test specs miss the tolerance. Divergent: works, but behaves differently from the web reference. Untested: no test spec exercises it yet. An example takes the lowest status among its marks.
Bar
219 examples
Graded Partial: a few test specs with bars miss the tolerance at antialiased edges or in shading.
Line
112 examples
Graded Partial: a few test specs with lines miss the tolerance in canvas size or in shading.
Point
229 examples
Graded Supported: every test spec with points matches the reference.
Interactive
101 examples
Brushes, point selections and legend filters run natively. Tooltips still differ from the web.
One view in SwiftUI.
Hand ChartView the spec as text. It compiles the spec off the main thread and draws vectors into a SwiftUI canvas, so the chart stays sharp at any size.
import SwiftUI
import PlotKitUI
struct RevenueChart: View {
let spec: String // Vega-Lite JSON, from your server or a file
var body: some View {
ChartView(json: spec)
.chartSizing(.fit)
.chartTheme(.automatic)
}
}{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A simple bar chart with embedded data.",
"data": {
"values": [
{"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43},
{"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53},
{"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}
]
},
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}},
"y": {"field": "b", "type": "quantitative"}
}
}
What renders, measured.
PlotKit is tested against vl-convert 1.9.0, the reference renderer for Vega-Lite. A spec passes when 99% of its pixels agree within 8/255 per channel, at a 0.5 px grid.
- 110 of 124 test specs match the reference.
- 118 of 119 text labels land within half a pixel.
- 43 of 49 feature fixtures pass.
| Mark | Status | Note |
|---|---|---|
| arc | Supported | |
| area | Supported | |
| bar | Partial | Edges, Shading |
| boxplot | Supported | |
| circle | Partial | Shading |
| errorband | Untested | |
| errorbar | Supported | |
| geoshape | Supported | |
| image | Supported | |
| line | Partial | Canvas size, Shading |
| point | Supported | |
| rect | Partial | Edges, Shading |
| rule | Partial | Edges, Shading |
| square | Partial | Edges |
| text | Partial | Edges |
| tick | Supported | |
| trail | Untested |
| Interaction | Status | Tested on |
|---|---|---|
| Tooltips | Divergent | 42 specs |
| Point selection (click) | Supported | 7 specs |
| Interval selection (brush) | Supported | 7 specs |
| Legend binding (doubleClick) | Supported | 19 specs |
| Wheel zoom (bind: scales, and brush zoom) | Divergent | 7 specs |
| Hover (pointerover) highlight | Supported | 15 specs |
Where it differs
- Edges: Core Graphics and the reference antialias edges differently; the geometry matches. (8 specs)
- Shading: interior fills differ on a few specs. (5 specs)
- Canvas size: one spec comes out a different size. (1)
Generated from PlotKit's conformance run on 11 September 2026.
On an iPad.
9.6 msto compile a simple chart
99 msfrom a cold launch to the first image
94.6 msto compile an 8,000-point scatter plot
iPad Air (M1), iPadOS 26.6.1, Release build. Medians.
Requirements and limits.
- Rendering core (PlotKitCore)
- iOS 17, macOS 14, visionOS 1
- SwiftUI view (PlotKitUI)
- iOS 17 and macOS 14
- Language
- Swift 6
- Dependencies
- none beyond the system's JavaScriptCore
- Engine
- Vega 5.33.1 and Vega-Lite 5.21.0, bundled and pinned
- Data size
- up to 8,000 inline rows per chart. Above that it warns and still draws.
- Not yet driven
- animation, timers and keyboard events. The first frame is drawn.
Vega and Vega-Lite are © the University of Washington Interactive Data Lab, under the BSD-3-Clause license.
PlotKit is in development.
It isn't for sale yet. Join the waitlist at the Silkway Store and you'll hear when it is.
Join the waitlist