@toclocoinc/lattice-grid 1.59.0 → 1.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/docs/API.html +1620 -90
- package/docs/api-detail.html +270 -5
- package/lattice-grid.d.ts +100 -2880
- package/lattice-grid.esm.min.js +288 -57
- package/lattice-grid.min.cjs +288 -57
- package/lattice-grid.min.js +288 -57
- package/modules/ai.d.ts +401 -0
- package/modules/ai.esm.min.js +25 -6
- package/modules/ai.min.cjs +25 -6
- package/modules/ai.min.js +25 -6
- package/modules/angular.d.ts +31 -0
- package/modules/angular.esm.min.js +3 -3
- package/modules/angular.min.cjs +3 -3
- package/modules/angular.min.js +3 -3
- package/modules/chart-alluvial.d.ts +18 -0
- package/modules/chart-alluvial.esm.min.js +1 -1
- package/modules/chart-arc.d.ts +18 -0
- package/modules/chart-arc.esm.min.js +1 -1
- package/modules/chart-bubblemap.d.ts +18 -0
- package/modules/chart-bubblemap.esm.min.js +1 -1
- package/modules/chart-bump.d.ts +12 -0
- package/modules/chart-bump.esm.min.js +1 -1
- package/modules/chart-calendar.d.ts +12 -0
- package/modules/chart-calendar.esm.min.js +1 -1
- package/modules/chart-decomposition.d.ts +20 -0
- package/modules/chart-decomposition.esm.min.js +1 -1
- package/modules/chart-diverging.d.ts +12 -0
- package/modules/chart-diverging.esm.min.js +1 -1
- package/modules/chart-dumbbell.d.ts +18 -0
- package/modules/chart-dumbbell.esm.min.js +1 -1
- package/modules/chart-fan.d.ts +18 -0
- package/modules/chart-fan.esm.min.js +1 -1
- package/modules/chart-hexbin.d.ts +18 -0
- package/modules/chart-hexbin.esm.min.js +1 -1
- package/modules/chart-hexmap.d.ts +18 -0
- package/modules/chart-hexmap.esm.min.js +1 -1
- package/modules/chart-icicle.d.ts +12 -0
- package/modules/chart-icicle.esm.min.js +1 -1
- package/modules/chart-parallel.d.ts +19 -0
- package/modules/chart-parallel.esm.min.js +1 -1
- package/modules/chart-ridgeline.d.ts +14 -0
- package/modules/chart-ridgeline.esm.min.js +1 -1
- package/modules/chart-roc.d.ts +20 -0
- package/modules/chart-roc.esm.min.js +1 -1
- package/modules/chart-slope.d.ts +12 -0
- package/modules/chart-slope.esm.min.js +1 -1
- package/modules/chart-splom.d.ts +19 -0
- package/modules/chart-splom.esm.min.js +1 -1
- package/modules/chart-waffle.d.ts +12 -0
- package/modules/chart-waffle.esm.min.js +1 -1
- package/modules/charts.d.ts +122 -0
- package/modules/charts.esm.min.js +4 -4
- package/modules/charts.min.cjs +4 -4
- package/modules/charts.min.js +4 -4
- package/modules/data-router.d.ts +91 -0
- package/modules/data-router.esm.min.js +109 -17
- package/modules/data-router.min.cjs +109 -17
- package/modules/data-router.min.js +109 -17
- package/modules/devtools.d.ts +28 -0
- package/modules/devtools.esm.min.js +2 -2
- package/modules/devtools.min.cjs +2 -2
- package/modules/devtools.min.js +2 -2
- package/modules/dhtmlx-compat.d.ts +19 -0
- package/modules/dhtmlx-compat.esm.min.js +4 -4
- package/modules/dhtmlx-compat.min.cjs +4 -4
- package/modules/dhtmlx-compat.min.js +4 -4
- package/modules/gantt.d.ts +515 -0
- package/modules/gantt.esm.min.js +4 -4
- package/modules/gantt.min.cjs +4 -4
- package/modules/gantt.min.js +4 -4
- package/modules/htmx.d.ts +176 -0
- package/modules/htmx.esm.min.js +288 -57
- package/modules/htmx.min.cjs +288 -57
- package/modules/htmx.min.js +288 -57
- package/modules/kanban.d.ts +492 -0
- package/modules/kanban.esm.min.js +4 -4
- package/modules/kanban.min.cjs +4 -4
- package/modules/kanban.min.js +4 -4
- package/modules/kpi.d.ts +255 -0
- package/modules/kpi.esm.min.js +40 -7
- package/modules/kpi.min.cjs +40 -7
- package/modules/kpi.min.js +40 -7
- package/modules/layout.d.ts +332 -0
- package/modules/layout.esm.min.js +4 -4
- package/modules/layout.min.cjs +4 -4
- package/modules/layout.min.js +4 -4
- package/modules/mock-socket.d.ts +114 -0
- package/modules/mock-socket.esm.min.js +2 -2
- package/modules/mock-socket.min.cjs +2 -2
- package/modules/mock-socket.min.js +2 -2
- package/modules/react.d.ts +25 -0
- package/modules/react.esm.min.js +3 -3
- package/modules/react.min.cjs +3 -3
- package/modules/react.min.js +3 -3
- package/modules/svelte.d.ts +26 -0
- package/modules/svelte.esm.min.js +3 -3
- package/modules/svelte.min.cjs +3 -3
- package/modules/svelte.min.js +3 -3
- package/modules/tabs.d.ts +133 -0
- package/modules/tabs.esm.min.js +4 -4
- package/modules/tabs.min.cjs +4 -4
- package/modules/tabs.min.js +4 -4
- package/modules/vue.d.ts +24 -0
- package/modules/vue.esm.min.js +3 -3
- package/modules/vue.min.cjs +3 -3
- package/modules/vue.min.js +3 -3
- package/modules/webcomponent.d.ts +47 -0
- package/modules/webcomponent.esm.min.js +288 -57
- package/modules/webcomponent.min.cjs +288 -57
- package/modules/webcomponent.min.js +288 -57
- package/package.json +2 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-alluvial module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The alluvial extension type (BACKLOG-0000886). Importing this module
|
|
12
|
+
* registers `alluvial`. Ribbons from `source` categories to `target`
|
|
13
|
+
* categories sized by `value` — categorical flow between two dimensions.
|
|
14
|
+
*/
|
|
15
|
+
export function drawAlluvial(ctx: object): object;
|
|
16
|
+
/** The alluvial binding: aggregates source→target flows off the grid's rows. */
|
|
17
|
+
export function bindAlluvial(grid: Grid, spec: object): object;
|
|
18
|
+
export default drawAlluvial;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-arc module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The arc-diagram extension type (BACKLOG-0000886). Importing this module
|
|
12
|
+
* registers `arc`. Nodes on a baseline with `source`→`target` relationships as
|
|
13
|
+
* semicircular arcs, thickness by `value`.
|
|
14
|
+
*/
|
|
15
|
+
export function drawArc(ctx: object): object;
|
|
16
|
+
/** The arc-diagram binding: collects nodes and edges off the grid's rows. */
|
|
17
|
+
export function bindArc(grid: Grid, spec: object): object;
|
|
18
|
+
export default drawArc;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-bubblemap module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The symbol / bubble-map extension type (BACKLOG-0000886). Importing this
|
|
12
|
+
* module registers `bubblemap`. Points placed by `lon`/`lat`, each a bubble
|
|
13
|
+
* with a square-root radius from `size`; needs no outlines and fetches nothing.
|
|
14
|
+
*/
|
|
15
|
+
export function drawBubbleMap(ctx: object): object;
|
|
16
|
+
/** The bubble-map binding: reads the coordinate and size columns off the rows. */
|
|
17
|
+
export function bindBubbleMap(grid: Grid, spec: object): object;
|
|
18
|
+
export default drawBubbleMap;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-bump module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The bump-chart extension type (BACKLOG-0000886). Importing this module
|
|
8
|
+
* registers `bump`. One line per `series` plotted by its rank of `y` within
|
|
9
|
+
* each `x` period — rank-over-time, where crossings are the story.
|
|
10
|
+
*/
|
|
11
|
+
export function drawBump(ctx: object): object;
|
|
12
|
+
export default drawBump;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-calendar module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The calendar-heatmap extension chart type (BACKLOG-0000886). Importing this
|
|
8
|
+
* module registers `calendar`. Draws value-by-day as a GitHub-style grid: `x`
|
|
9
|
+
* is a date column, `y` the measure summed per day.
|
|
10
|
+
*/
|
|
11
|
+
export function drawCalendar(ctx: object): object;
|
|
12
|
+
export default drawCalendar;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-decomposition module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The seasonal-decomposition panel extension chart type (BACKLOG-0000886),
|
|
12
|
+
* companion to the `tsTrend`/`tsSeasonal`/`tsResidual` shadow columns.
|
|
13
|
+
* Importing this module registers `decomposition`. Draws a stacked panel per
|
|
14
|
+
* named component column (`observed`/`trend`/`seasonal`/`residual`) sharing one
|
|
15
|
+
* x axis.
|
|
16
|
+
*/
|
|
17
|
+
export function drawDecomposition(ctx: object): object;
|
|
18
|
+
/** The decomposition binding: reads the named component columns in row order. */
|
|
19
|
+
export function bindDecomposition(grid: Grid, spec: object): object;
|
|
20
|
+
export default drawDecomposition;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-diverging module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The diverging-bar extension type (BACKLOG-0000886). Importing this module
|
|
8
|
+
* registers `diverging`. Horizontal bars growing left/right from a central
|
|
9
|
+
* zero over a signed `y`, on a symmetric scale.
|
|
10
|
+
*/
|
|
11
|
+
export function drawDiverging(ctx: object): object;
|
|
12
|
+
export default drawDiverging;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-dumbbell module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The dumbbell / connected-dot extension type (BACKLOG-0000886). Importing
|
|
12
|
+
* this module registers `dumbbell`. Two dots (`start`, `end`) joined by a bar
|
|
13
|
+
* per `x` category — the gap is the bar's length.
|
|
14
|
+
*/
|
|
15
|
+
export function drawDumbbell(ctx: object): object;
|
|
16
|
+
/** The dumbbell binding: reads the category and its two numeric columns. */
|
|
17
|
+
export function bindDumbbell(grid: Grid, spec: object): object;
|
|
18
|
+
export default drawDumbbell;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-fan module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The fan / forecast extension chart type (BACKLOG-0000886). Importing this
|
|
12
|
+
* module registers `fan`. Draws `y` (history) as a solid line, `forecast` as a
|
|
13
|
+
* dashed continuation, and the `lower`/`upper` interval as a widening band.
|
|
14
|
+
*/
|
|
15
|
+
export function drawFan(ctx: object): object;
|
|
16
|
+
/** The fan binding: reads the history, forecast and interval columns in row order. */
|
|
17
|
+
export function bindFan(grid: Grid, spec: object): object;
|
|
18
|
+
export default drawFan;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-hexbin module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The hexbin / 2D-density extension chart type (BACKLOG-0000886). Importing
|
|
12
|
+
* this module registers `hexbin`. Bins `x`/`y` points into hexagons shaded by
|
|
13
|
+
* count, so a large scatter reads as a density field rather than overplotting.
|
|
14
|
+
*/
|
|
15
|
+
export function drawHexbin(ctx: object): object;
|
|
16
|
+
/** The hexbin binding: reads the numeric `x` and `y` columns off the grid's rows. */
|
|
17
|
+
export function bindHexbin(grid: Grid, spec: object): object;
|
|
18
|
+
export default drawHexbin;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-hexmap module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The hexbin-map extension type (BACKLOG-0000886). Importing this module
|
|
12
|
+
* registers `hexmap`. `lon`/`lat` points binned into hexagons shaded by count,
|
|
13
|
+
* so a geographic density reads without overplotting or outlines.
|
|
14
|
+
*/
|
|
15
|
+
export function drawHexMap(ctx: object): object;
|
|
16
|
+
/** The hexbin-map binding: reads the coordinate columns off the grid's rows. */
|
|
17
|
+
export function bindHexMap(grid: Grid, spec: object): object;
|
|
18
|
+
export default drawHexMap;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-icicle module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The icicle extension type (BACKLOG-0000886). Importing this module registers
|
|
8
|
+
* `icicle`. A hierarchy (the grid's group tree) as nested rectangles in rows,
|
|
9
|
+
* sized by `y`; drills like the built-in hierarchical types.
|
|
10
|
+
*/
|
|
11
|
+
export function drawIcicle(ctx: object): object;
|
|
12
|
+
export default drawIcicle;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-parallel module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The parallel-coordinates extension type (BACKLOG-0000886). Importing this
|
|
12
|
+
* module registers `parallel`. One polyline per row across the numeric
|
|
13
|
+
* `columns`, each a vertical axis with its own scale; `spec.colourBy` colours
|
|
14
|
+
* by a category.
|
|
15
|
+
*/
|
|
16
|
+
export function drawParallel(ctx: object): object;
|
|
17
|
+
/** The parallel-coordinates binding: reads the dimension columns off the rows. */
|
|
18
|
+
export function bindParallel(grid: Grid, spec: object): object;
|
|
19
|
+
export default drawParallel;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-ridgeline module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The ridgeline (joy plot) extension chart type (BACKLOG-0000886). Importing
|
|
8
|
+
* this module registers `ridgeline` with the base charts module; the base
|
|
9
|
+
* bundle does not include it unless a caller imports it. Draws one
|
|
10
|
+
* kernel-density ridge per category (`x`), stacked and overlapping, over the
|
|
11
|
+
* distribution of a measure (`y`); `spec.overlap` sets the vertical overlap.
|
|
12
|
+
*/
|
|
13
|
+
export function drawRidgeline(ctx: object): object;
|
|
14
|
+
export default drawRidgeline;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-roc module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The ROC / PR / calibration extension chart type (BACKLOG-0000886). Importing
|
|
12
|
+
* this module registers `roc`. `spec.curve` chooses `'roc'` (default, with the
|
|
13
|
+
* chance diagonal and AUC), `'pr'`, or `'calibration'`; `label` is the outcome
|
|
14
|
+
* column (positive when truthy or equal to `spec.positive`), `score` the model
|
|
15
|
+
* score.
|
|
16
|
+
*/
|
|
17
|
+
export function drawRoc(ctx: object): object;
|
|
18
|
+
/** The ROC binding: reads the outcome and score off the grid's rows. */
|
|
19
|
+
export function bindRoc(grid: Grid, spec: object): object;
|
|
20
|
+
export default drawRoc;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-slope module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The slope-chart extension type (BACKLOG-0000886). Importing this module
|
|
8
|
+
* registers `slope`. One line per `series` connecting its `y` across the `x`
|
|
9
|
+
* periods — before/after comparison read from the slopes.
|
|
10
|
+
*/
|
|
11
|
+
export function drawSlope(ctx: object): object;
|
|
12
|
+
export default drawSlope;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-splom module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
Grid,
|
|
8
|
+
} from '../lattice-grid.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The scatter-plot-matrix (SPLOM) extension chart type (BACKLOG-0000886).
|
|
12
|
+
* Importing this module registers `splom`. Crosses every pair of the numeric
|
|
13
|
+
* `columns` (2–6) as a matrix of scatters, naming each variable on the
|
|
14
|
+
* diagonal.
|
|
15
|
+
*/
|
|
16
|
+
export function drawSplom(ctx: object): object;
|
|
17
|
+
/** The SPLOM binding: reads the numeric `columns` off the grid's visible rows. */
|
|
18
|
+
export function bindSplom(grid: Grid, spec: object): object;
|
|
19
|
+
export default drawSplom;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, chart-waffle module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The waffle / dot-matrix extension type (BACKLOG-0000886). Importing this
|
|
8
|
+
* module registers `waffle`. Proportion as counted squares (default 100), one
|
|
9
|
+
* colour per `x` category sized by `y`.
|
|
10
|
+
*/
|
|
11
|
+
export function drawWaffle(ctx: object): object;
|
|
12
|
+
export default drawWaffle;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.60.0, charts module type declarations
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
import type {
|
|
7
|
+
CellRange,
|
|
8
|
+
Chart,
|
|
9
|
+
ChartSpec,
|
|
10
|
+
ChartType,
|
|
11
|
+
Grid,
|
|
12
|
+
RegressionCoefficient,
|
|
13
|
+
RegressionModel,
|
|
14
|
+
RegressionSpec,
|
|
15
|
+
} from '../lattice-grid.js';
|
|
16
|
+
|
|
17
|
+
/** Every type name `createChart` accepts. */
|
|
18
|
+
export const TYPES: readonly ChartType[];
|
|
19
|
+
/** The built-in colour schemes, by name. */
|
|
20
|
+
export const SCHEMES: Readonly<Record<string, readonly string[]>>;
|
|
21
|
+
export const PALETTE: readonly string[];
|
|
22
|
+
export function createChart(spec: ChartSpec): Chart;
|
|
23
|
+
/**
|
|
24
|
+
* Chart a selected cell range. Derives the chart from the range's shape — a
|
|
25
|
+
* leading text column becomes the categories, the numeric columns become the
|
|
26
|
+
* measures — and returns the live chart, or null when the range has nothing
|
|
27
|
+
* to measure. Respects hidden and unreadable columns. The type is a sensible
|
|
28
|
+
* default the caller can change with `chart.update({ type })`.
|
|
29
|
+
*/
|
|
30
|
+
export function chartRange(
|
|
31
|
+
grid: Grid,
|
|
32
|
+
opts: {
|
|
33
|
+
container: Element | string;
|
|
34
|
+
range?: CellRange;
|
|
35
|
+
type?: ChartType;
|
|
36
|
+
} & Partial<ChartSpec>,
|
|
37
|
+
): Chart | null;
|
|
38
|
+
/** Would {@link chartRange} draw something for the grid's current selection? */
|
|
39
|
+
export function canChartRange(grid: Grid, opts?: { range?: CellRange }): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Decide what a chart of a range should be, without drawing it: the type, the
|
|
42
|
+
* category column, the measure columns, and a `spec` ready for `createChart`
|
|
43
|
+
* — or a `reason` naming why the range cannot be charted.
|
|
44
|
+
*/
|
|
45
|
+
export function deriveRangeSpec(
|
|
46
|
+
grid: Grid,
|
|
47
|
+
opts?: { range?: CellRange; type?: ChartType },
|
|
48
|
+
): {
|
|
49
|
+
spec: ChartSpec | null;
|
|
50
|
+
type: ChartType | null;
|
|
51
|
+
x: string | null;
|
|
52
|
+
measures: string[];
|
|
53
|
+
columns: string[];
|
|
54
|
+
reason: string | null;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Turn a fitted regression model into diagnostic chart specs ready for
|
|
58
|
+
* `createChart` (BACKLOG-0000812). Pass a precomputed `model`, or a `spec` to
|
|
59
|
+
* fit one over the grid, and the `fitted` and `residual` fit-shadow column ids
|
|
60
|
+
* the residual and QQ plots draw over.
|
|
61
|
+
*
|
|
62
|
+
* The presets that map onto grid columns come back as drawable specs: `fit`
|
|
63
|
+
* (the fit line with its confidence band), `residualsFitted`, `qq`, and
|
|
64
|
+
* `multicollinearity` (a correlogram over the predictors, with the model's
|
|
65
|
+
* `vif` alongside). The three that need a per-row or per-coefficient quantity
|
|
66
|
+
* the grid has no column for — `scaleLocation`, `residualsLeverage`,
|
|
67
|
+
* `coefficientForest` — come back with a null `spec` and a stable `reason`,
|
|
68
|
+
* rather than silently dropped.
|
|
69
|
+
*/
|
|
70
|
+
export function regressionPlots(
|
|
71
|
+
grid: Grid,
|
|
72
|
+
opts?: {
|
|
73
|
+
model?: RegressionModel;
|
|
74
|
+
spec?: RegressionSpec;
|
|
75
|
+
fitted?: string;
|
|
76
|
+
residual?: string;
|
|
77
|
+
rows?: object[] | ((grid: Grid) => object[]);
|
|
78
|
+
confidence?: number;
|
|
79
|
+
},
|
|
80
|
+
): {
|
|
81
|
+
model: RegressionModel | null;
|
|
82
|
+
plots: Record<
|
|
83
|
+
'fit' | 'residualsFitted' | 'qq' | 'multicollinearity'
|
|
84
|
+
| 'scaleLocation' | 'residualsLeverage' | 'coefficientForest',
|
|
85
|
+
{
|
|
86
|
+
spec: ChartSpec | null;
|
|
87
|
+
reason: string | null;
|
|
88
|
+
vif?: number[] | null;
|
|
89
|
+
coefficients?: RegressionCoefficient[] | null;
|
|
90
|
+
}
|
|
91
|
+
>;
|
|
92
|
+
};
|
|
93
|
+
export function registerScheme(name: string, colours: readonly string[]): void;
|
|
94
|
+
export function resolveScheme(spec?: object): object;
|
|
95
|
+
export function schemeNames(): string[];
|
|
96
|
+
export function setDefaultScheme(name: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* The definition an extension chart type registers (BACKLOG-0000886). `draw`
|
|
99
|
+
* receives the base drawing context — `plot`, `bound`, `groups`, `scheme`,
|
|
100
|
+
* `typography`, `fontSize`, `labels`, `grid`, `spec`, `doc` — plus
|
|
101
|
+
* `ctx.helpers`, the base's own toolkit of primitives (element factory, scales,
|
|
102
|
+
* axes, mark pool, distribution kernels), and appends its marks to the layer
|
|
103
|
+
* groups. `bind` optionally supplies the bound data (default: the by-series
|
|
104
|
+
* binder); `freeform` lays the chart out without axis gutters; `labelled`
|
|
105
|
+
* declares that `labels` applies.
|
|
106
|
+
*/
|
|
107
|
+
interface ChartTypeDefinition {
|
|
108
|
+
draw: (ctx: object) => object;
|
|
109
|
+
bind?: (grid: Grid, spec: ChartSpec) => object;
|
|
110
|
+
freeform?: boolean;
|
|
111
|
+
labelled?: boolean;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Register an extension chart type so `createChart({ type })` can draw it
|
|
115
|
+
* (BACKLOG-0000886). Extension types ship as their own opt-in modules, so the
|
|
116
|
+
* base charts bundle does not grow for a type a caller never imports — you pay
|
|
117
|
+
* only for the charts you use.
|
|
118
|
+
*/
|
|
119
|
+
export function registerChartType(name: string, def: ChartTypeDefinition): void;
|
|
120
|
+
/** Every registered extension chart-type name, in registration order. */
|
|
121
|
+
export function registeredChartTypes(): string[];
|
|
122
|
+
export { Chart };
|