API reference
Schematex JavaScript/TypeScript API — render() and parse() functions, SchematexConfig options, tree-shakable per-diagram imports.
render(text, config?)
Renders a DSL string into an SVG string. Dispatches by first keyword.
import { render } from 'schematex';
const svg: string = render(text, { theme: 'light' });parse(text, config?)
Parses a DSL string into the typed AST without rendering.
import { parse } from 'schematex';
const ast = parse(text);Tree-shakable imports
import { render } from 'schematex/genogram';
import { render } from 'schematex/ecomap';
import { render } from 'schematex/pedigree';
import { render } from 'schematex/phylo';
import { render } from 'schematex/sociogram';SchematexConfig
interface SchematexConfig {
theme?: 'light' | 'dark';
width?: number;
height?: number;
// per-diagram options
}See src/core/types.ts
for the complete type definitions.
Fishbone diagram
Ishikawa cause-and-effect (fishbone) diagrams with auto-categorized branches. For root-cause analysis, quality management (Six Sigma, TQM), and problem decomposition.
Contributing a new diagram type
Step-by-step guide for adding a new diagram plugin to Schematex — from standard spec to published website example.