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 waitlist

PlotKit 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.

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.

RevenueChart.swift
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)
  }
}
bar.vl.json
{
  "$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"}
  }
}
A bar chart of nine bars, A to I, rendered by PlotKit from bar.vl.json
That spec, the official bar chart example, rendered by PlotKit.

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.
MarkStatusNote
arcSupported
areaSupported
barPartialEdges, Shading
boxplotSupported
circlePartialShading
errorbandUntested
errorbarSupported
geoshapeSupported
imageSupported
linePartialCanvas size, Shading
pointSupported
rectPartialEdges, Shading
rulePartialEdges, Shading
squarePartialEdges
textPartialEdges
tickSupported
trailUntested
InteractionStatusTested on
TooltipsDivergent42 specs
Point selection (click)Supported7 specs
Interval selection (brush)Supported7 specs
Legend binding (doubleClick)Supported19 specs
Wheel zoom (bind: scales, and brush zoom)Divergent7 specs
Hover (pointerover) highlightSupported15 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

PlotKit · In development · support matrix 11 September 2026