For Developers

The VisQuill GDK gives you geometric primitives, a reactive constraint system, and built-in interaction handling: the building blocks for interactive visualization tools that go beyond standard charting.

Resources

Three main resources cover everything from concepts to API details.

Installation

The VisQuill GDK is available as an npm package and can be installed into any modern web or TypeScript project.

npm install @visquill/visquill-gdk@alpha

Minimal Example

The example below demonstrates a minimal setup using the VisQuill GDK. More advanced examples are available in VisQuill Lab.


import {VisQuill, Attach} from "@visquill/visquill-gdk"

/**
 * Creates a simple "Hello World" visualization —
 * a single text element attached to the center of the graphic.
 *
 * @param div - The div element that will contain the graphic
 */
export function run(div: HTMLDivElement) {
    const rvg = VisQuill.create(div)
    const canvas = rvg.canvas

    // Text element
    const text = canvas.text.label("Hello World!",
                                    "@style fill: blue; font-size: 48px; text-anchor: middle; dominant-baseline: middle;")

    // Attach the text to the graphic's center point.
    // pointToPoint moves "text" so that its origin lands on rvg.center.
    // Text stays at center point even if rvg.center changes.
    Attach.pointToPoint(text, rvg.center)
}

Once you have a working setup, head to the Guide for a deeper walkthrough, or browse the Lab for more complex examples.