Rootless

Automate iOS, iPadOS, and macOS using plain JavaScript. Build custom widgets and interact directly with native APIs.

Download on the App Store
Rootless app interface

Plain JavaScript

Supports ES6. Scripts are stored as plain .js files on your disk.

Native APIs & Documentation

Integrate directly with iOS native APIs. Fully documented, available offline.

Siri Shortcuts

Trigger scripts via Siri. Present tables, websites, and custom HTML natively.

System Integration

Run from the Share Sheet, process inputs, and manage local files via Files.app.

x-callback-url

Communicate seamlessly and trigger workflows with other apps on your device.

Customizable & Ready

Tailor the code editor to your liking. Includes several example scripts to start immediately.

Documentation

Also inside the app, or as rootless.json.

Sector

A slice of a pie

A pie or a donut. Goes in a Chart's marks, and takes the same data as every other mark: x names the slice, y is how big it is. A chart holding a Sector draws no axes, because a slice has an angle rather than a position.

Methods

Sector(options)Any

A pie or a donut: one slice per value, sized by its share of the total.

  • options Any required
    • data [Any] required

      The slices, as { x, y }. x names the slice and labels it, y is its size.

    • innerRadius Number

      A fraction of the circle, 0 to 1. Above 0 it becomes a donut. Default 0.

    • outerRadius Number

      A fraction of the circle, 0 to 1. Default 1.

    • angularInset Number

      The gap between slices, in points. Default 1.

    • cornerRadius Number

      Rounds the corners of each slice. Default 0.

    • opacity Number

      0 to 1. Default 1.

Examples

A donut of this week's categories

Chart({
  marks: [Sector({
    data: [
      { x: "Food", y: 420 },
      { x: "Transport", y: 180 },
      { x: "Rent", y: 900 },
    ],
    innerRadius: 0.6,
    cornerRadius: 4,
  })],
})