Skip to content

Tutorial

Install

Terminal window
npm install cseen

The library has no dependencies of its own. The docs site you are reading lives in site/ and has its own package.json, which nothing published depends on.

To work on cseen itself, clone the repository and build it:

Terminal window
git clone https://github.com/M44F4/cseen.git
cd cseen
npm install
npm run build # compiles to dist/

The core is small. Everything else is a pack that depends only on the core, and each pack has its own import path, so a page that only needs a monitor does not load the chart code.

import { Scene, box, mount } from 'cseen';
import { monitor } from 'cseen/devices';
import { bars } from 'cseen/charts';
import 'cseen/cseen.css';

The stylesheet is what makes figures follow your theme. Import it once.

  • A browser from the last few years. Series colours use relative colour syntax; older browsers fall back to a fixed accessible palette.
  • TypeScript is optional. The library is typed and works from plain JavaScript.
  • Any current Node for rendering on the server. The library is plain ES modules.

Next: your first scene.