@toclocoinc/lattice-grid 1.74.0 → 1.75.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/angular/package.json +1 -1
- package/docs/API.html +44 -6
- package/docs/CHART-CODES.md +8 -0
- package/docs/api/adapters.html +1 -1
- package/docs/api/ai.html +1 -1
- package/docs/api/alarms.html +1 -1
- package/docs/api/charts.html +28 -2
- package/docs/api/data-router.html +1 -1
- package/docs/api/deckgl.html +2 -2
- package/docs/api/gantt.html +1 -1
- package/docs/api/geometry.html +1 -1
- package/docs/api/grid.html +2 -2
- package/docs/api/index.html +2 -2
- package/docs/api/kanban.html +1 -1
- package/docs/api/kpi.html +1 -1
- package/docs/api/layout.html +1 -1
- package/docs/api/list.html +1 -1
- package/docs/api/mock-socket.html +1 -1
- package/docs/api/tabs.html +1 -1
- package/docs/api/types.html +13 -1
- package/docs/api-detail.html +13 -4
- package/docs/warnings.json +36 -3
- package/lattice-grid.d.ts +37 -2
- package/lattice-grid.esm.min.js +3 -3
- package/lattice-grid.min.cjs +3 -3
- package/lattice-grid.min.js +3 -3
- package/modules/ai.d.ts +1 -1
- package/modules/ai.esm.min.js +2 -2
- package/modules/ai.min.cjs +2 -2
- package/modules/ai.min.js +2 -2
- package/modules/alarms.d.ts +1 -1
- package/modules/alarms.esm.min.js +2 -2
- package/modules/alarms.min.cjs +2 -2
- package/modules/alarms.min.js +2 -2
- package/modules/angular.d.ts +1 -1
- package/modules/angular.esm.min.js +2 -2
- package/modules/angular.min.cjs +2 -2
- package/modules/angular.min.js +2 -2
- package/modules/chart-alluvial.d.ts +1 -1
- package/modules/chart-alluvial.esm.min.js +1 -1
- package/modules/chart-alluvial.min.cjs +1 -1
- package/modules/chart-alluvial.min.js +1 -1
- package/modules/chart-arc.d.ts +1 -1
- package/modules/chart-arc.esm.min.js +1 -1
- package/modules/chart-arc.min.cjs +1 -1
- package/modules/chart-arc.min.js +1 -1
- package/modules/chart-bubblemap.d.ts +1 -1
- package/modules/chart-bubblemap.esm.min.js +1 -1
- package/modules/chart-bubblemap.min.cjs +1 -1
- package/modules/chart-bubblemap.min.js +1 -1
- package/modules/chart-bump.d.ts +1 -1
- package/modules/chart-bump.esm.min.js +1 -1
- package/modules/chart-bump.min.cjs +1 -1
- package/modules/chart-bump.min.js +1 -1
- package/modules/chart-calendar.d.ts +1 -1
- package/modules/chart-calendar.esm.min.js +2 -2
- package/modules/chart-calendar.esm.min.js.map +1 -1
- package/modules/chart-calendar.min.cjs +2 -2
- package/modules/chart-calendar.min.js +2 -2
- package/modules/chart-calendar.min.js.map +1 -1
- package/modules/chart-choropleth.d.ts +1 -1
- package/modules/chart-choropleth.esm.min.js +2 -2
- package/modules/chart-choropleth.esm.min.js.map +1 -1
- package/modules/chart-choropleth.min.cjs +2 -2
- package/modules/chart-choropleth.min.js +2 -2
- package/modules/chart-choropleth.min.js.map +1 -1
- package/modules/chart-decomposition.d.ts +1 -1
- package/modules/chart-decomposition.esm.min.js +1 -1
- package/modules/chart-decomposition.min.cjs +1 -1
- package/modules/chart-decomposition.min.js +1 -1
- package/modules/chart-diverging.d.ts +1 -1
- package/modules/chart-diverging.esm.min.js +1 -1
- package/modules/chart-diverging.min.cjs +1 -1
- package/modules/chart-diverging.min.js +1 -1
- package/modules/chart-dumbbell.d.ts +1 -1
- package/modules/chart-dumbbell.esm.min.js +1 -1
- package/modules/chart-dumbbell.min.cjs +1 -1
- package/modules/chart-dumbbell.min.js +1 -1
- package/modules/chart-fan.d.ts +1 -1
- package/modules/chart-fan.esm.min.js +1 -1
- package/modules/chart-fan.min.cjs +1 -1
- package/modules/chart-fan.min.js +1 -1
- package/modules/chart-hexbin.d.ts +1 -1
- package/modules/chart-hexbin.esm.min.js +2 -2
- package/modules/chart-hexbin.esm.min.js.map +1 -1
- package/modules/chart-hexbin.min.cjs +2 -2
- package/modules/chart-hexbin.min.js +2 -2
- package/modules/chart-hexbin.min.js.map +1 -1
- package/modules/chart-hexmap.d.ts +1 -1
- package/modules/chart-hexmap.esm.min.js +2 -2
- package/modules/chart-hexmap.esm.min.js.map +1 -1
- package/modules/chart-hexmap.min.cjs +2 -2
- package/modules/chart-hexmap.min.js +2 -2
- package/modules/chart-hexmap.min.js.map +1 -1
- package/modules/chart-icicle.d.ts +1 -1
- package/modules/chart-icicle.esm.min.js +1 -1
- package/modules/chart-icicle.min.cjs +1 -1
- package/modules/chart-icicle.min.js +1 -1
- package/modules/chart-markermap.d.ts +1 -1
- package/modules/chart-markermap.esm.min.js +1 -1
- package/modules/chart-markermap.min.cjs +1 -1
- package/modules/chart-markermap.min.js +1 -1
- package/modules/chart-parallel.d.ts +1 -1
- package/modules/chart-parallel.esm.min.js +1 -1
- package/modules/chart-parallel.min.cjs +1 -1
- package/modules/chart-parallel.min.js +1 -1
- package/modules/chart-ridgeline.d.ts +1 -1
- package/modules/chart-ridgeline.esm.min.js +1 -1
- package/modules/chart-ridgeline.min.cjs +1 -1
- package/modules/chart-ridgeline.min.js +1 -1
- package/modules/chart-roc.d.ts +1 -1
- package/modules/chart-roc.esm.min.js +1 -1
- package/modules/chart-roc.min.cjs +1 -1
- package/modules/chart-roc.min.js +1 -1
- package/modules/chart-slope.d.ts +1 -1
- package/modules/chart-slope.esm.min.js +1 -1
- package/modules/chart-slope.min.cjs +1 -1
- package/modules/chart-slope.min.js +1 -1
- package/modules/chart-splom.d.ts +1 -1
- package/modules/chart-splom.esm.min.js +1 -1
- package/modules/chart-splom.min.cjs +1 -1
- package/modules/chart-splom.min.js +1 -1
- package/modules/chart-waffle.d.ts +1 -1
- package/modules/chart-waffle.esm.min.js +1 -1
- package/modules/chart-waffle.min.cjs +1 -1
- package/modules/chart-waffle.min.js +1 -1
- package/modules/charts.d.ts +1 -1
- package/modules/charts.esm.min.js +185 -178
- package/modules/charts.esm.min.js.map +2 -2
- package/modules/charts.min.cjs +185 -178
- package/modules/charts.min.js +185 -178
- package/modules/charts.min.js.map +2 -2
- package/modules/data-router.d.ts +1 -1
- package/modules/data-router.esm.min.js +2 -2
- package/modules/data-router.min.cjs +2 -2
- package/modules/data-router.min.js +2 -2
- package/modules/deckgl.d.ts +9 -3
- package/modules/deckgl.esm.min.js +18 -11
- package/modules/deckgl.esm.min.js.map +2 -2
- package/modules/deckgl.min.cjs +18 -11
- package/modules/deckgl.min.js +18 -11
- package/modules/deckgl.min.js.map +2 -2
- package/modules/devtools.d.ts +1 -1
- package/modules/devtools.esm.min.js +1 -1
- package/modules/devtools.min.cjs +1 -1
- package/modules/devtools.min.js +1 -1
- package/modules/dhtmlx-compat.d.ts +1 -1
- package/modules/dhtmlx-compat.esm.min.js +2 -2
- package/modules/dhtmlx-compat.min.cjs +2 -2
- package/modules/dhtmlx-compat.min.js +2 -2
- package/modules/gantt.d.ts +1 -1
- package/modules/gantt.esm.min.js +2 -2
- package/modules/gantt.min.cjs +2 -2
- package/modules/gantt.min.js +2 -2
- package/modules/geo-europe-nuts.d.ts +1 -1
- package/modules/geo-europe-nuts.esm.min.js +1 -1
- package/modules/geo-europe-nuts.min.cjs +1 -1
- package/modules/geo-europe-nuts.min.js +1 -1
- package/modules/geo-uk.d.ts +1 -1
- package/modules/geo-uk.esm.min.js +1 -1
- package/modules/geo-uk.min.cjs +1 -1
- package/modules/geo-uk.min.js +1 -1
- package/modules/geo-us-states.d.ts +1 -1
- package/modules/geo-us-states.esm.min.js +1 -1
- package/modules/geo-us-states.min.cjs +1 -1
- package/modules/geo-us-states.min.js +1 -1
- package/modules/geo-world-110m.d.ts +1 -1
- package/modules/geo-world-110m.esm.min.js +1 -1
- package/modules/geo-world-110m.min.cjs +1 -1
- package/modules/geo-world-110m.min.js +1 -1
- package/modules/geo-world-50m.d.ts +1 -1
- package/modules/geo-world-50m.esm.min.js +1 -1
- package/modules/geo-world-50m.min.cjs +1 -1
- package/modules/geo-world-50m.min.js +1 -1
- package/modules/geometry.d.ts +1 -1
- package/modules/geometry.esm.min.js +2 -2
- package/modules/geometry.min.cjs +2 -2
- package/modules/geometry.min.js +2 -2
- package/modules/htmx.d.ts +1 -1
- package/modules/htmx.esm.min.js +3 -3
- package/modules/htmx.min.cjs +3 -3
- package/modules/htmx.min.js +3 -3
- package/modules/kanban.d.ts +1 -1
- package/modules/kanban.esm.min.js +2 -2
- package/modules/kanban.min.cjs +2 -2
- package/modules/kanban.min.js +2 -2
- package/modules/kpi.d.ts +1 -1
- package/modules/kpi.esm.min.js +2 -2
- package/modules/kpi.min.cjs +2 -2
- package/modules/kpi.min.js +2 -2
- package/modules/layout.d.ts +1 -1
- package/modules/layout.esm.min.js +2 -2
- package/modules/layout.min.cjs +2 -2
- package/modules/layout.min.js +2 -2
- package/modules/list.d.ts +1 -1
- package/modules/list.esm.min.js +2 -2
- package/modules/list.min.cjs +2 -2
- package/modules/list.min.js +2 -2
- package/modules/mock-socket.d.ts +1 -1
- package/modules/mock-socket.esm.min.js +1 -1
- package/modules/mock-socket.min.cjs +1 -1
- package/modules/mock-socket.min.js +1 -1
- package/modules/react.d.ts +1 -1
- package/modules/react.esm.min.js +2 -2
- package/modules/react.min.cjs +2 -2
- package/modules/react.min.js +2 -2
- package/modules/svelte.d.ts +1 -1
- package/modules/svelte.esm.min.js +2 -2
- package/modules/svelte.min.cjs +2 -2
- package/modules/svelte.min.js +2 -2
- package/modules/tabs.d.ts +1 -1
- package/modules/tabs.esm.min.js +2 -2
- package/modules/tabs.min.cjs +2 -2
- package/modules/tabs.min.js +2 -2
- package/modules/vue.d.ts +1 -1
- package/modules/vue.esm.min.js +2 -2
- package/modules/vue.min.cjs +2 -2
- package/modules/vue.min.js +2 -2
- package/modules/webcomponent.d.ts +1 -1
- package/modules/webcomponent.esm.min.js +3 -3
- package/modules/webcomponent.min.cjs +3 -3
- package/modules/webcomponent.min.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,18 @@ and what it means for a grid already in production.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [1.75.0] - 2026-09-28
|
|
13
|
+
|
|
14
|
+
### Breaking
|
|
15
|
+
|
|
16
|
+
- **A city of 493,910 places drew as one dark cell in a pale blur** (BACKLOG-0001516). *Existing charts can change colour:* any ramp-coloured chart whose positive values span more than 100:1 will now be coloured on a log scale unless it sets `ramp: { scale: 'linear' }`; narrower ranges are untouched. *Recognise your own case:* a map past its viewport cap, a heatmap, a choropleth or any ramp-coloured chart whose values span orders of magnitude shows its largest mark dark and everything else in the palest shade. Every ramp-coloured type (`heatmap`, `geomap`, density cells on `markermap` and `bubblemap`, and the opt-in `calendar`, `hexbin`, `hexmap` and `choropleth`) takes `ramp: { colours, scale }` with a `scale` of `'linear'`, `'log'` or `'quantile'`. Left unset, a chart whose positive values span more than 100:1 is coloured on a log scale, says so once in the console (`chart:*:ramp:log`) and reports it in `chart.provenance().ramp`; anything narrower stays linear as before. A value at or below zero on a log scale takes the bottom of the ramp. The ramp legend labels follow the scale: powers of ten (1-2-5 steps inside two decades) for log, the four cut points for quantile. `ramp: { scale: 'linear' }` keeps the previous colouring.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- **`hydrate.unknownType:*` carried no `docs` anchor, and the catalogue check let a missing `docs` field pass silently** (BACKLOG-0001517). The entry now points at the htmx guide's new "Column type precedence when hydrating a table" section (`docs/api-detail.html#htmx-guide-data-type`), which states the `data-type` precedence. `tools/warnings.js`'s `docs-anchor` rule now fails by name when any catalogue entry has no `docs` field at all, not only when one resolves nowhere.
|
|
21
|
+
|
|
22
|
+
- **A deck.gl layer over a small in-view set drew nothing while the readout said every row was drawn.** When the grid held all its rows and the position column carried its geometry as text (WKT or GeoJSON text, as a plain-text column from a remote source delivers it) or as WKB, `bindDeck` handed the layer function an empty `ctx.features` yet counted every row in `ctx.provenance.rows`. Every path now reads a row's place through the geometry type's own reader (a GeoJSON object, a parsed geometry, WKT, WKB or GeoJSON text), `provenance.rows` always equals `ctx.features.length`, and a row whose position is blank or cannot be read is counted in the new `provenance.skipped`, never as drawn. (BACKLOG-0001518)
|
|
23
|
+
|
|
12
24
|
## [1.74.0] - 2026-09-28
|
|
13
25
|
|
|
14
26
|
### Breaking
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ dependencies, no build step required. Optional adapters for React, Vue, Svelte
|
|
|
5
5
|
and Web Components ship alongside it, and Angular has compiled components of its
|
|
6
6
|
own at `@toclocoinc/lattice-grid/angular` — inside this package, not beside it.
|
|
7
7
|
|
|
8
|
-
Version 1.
|
|
8
|
+
Version 1.75.0 · [latticegrid.dev](https://www.latticegrid.dev) · TOCLOCO Inc
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
package/angular/package.json
CHANGED
package/docs/API.html
CHANGED
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
<div class="shell">
|
|
383
383
|
<aside class="rail">
|
|
384
384
|
<p class="rail__brand">Lattice Grid</p>
|
|
385
|
-
<p class="rail__sub">API reference · v1.
|
|
385
|
+
<p class="rail__sub">API reference · v1.75.0</p>
|
|
386
386
|
<nav>
|
|
387
387
|
<div class="rail__group">
|
|
388
388
|
<span class="rail__label">Start</span>
|
|
@@ -555,7 +555,7 @@
|
|
|
555
555
|
</header>
|
|
556
556
|
|
|
557
557
|
<p class="chips">
|
|
558
|
-
<span class="chip">Version 1.
|
|
558
|
+
<span class="chip">Version 1.75.0</span>
|
|
559
559
|
<span class="chip">Zero dependencies</span>
|
|
560
560
|
<span class="chip"><a href="api-detail.html">Developer guide →</a></span>
|
|
561
561
|
</p>
|
|
@@ -2182,7 +2182,7 @@ grid.destroy();
|
|
|
2182
2182
|
<table>
|
|
2183
2183
|
<thead><tr><th>Member</th><th>Returns</th><th>Description</th></tr></thead>
|
|
2184
2184
|
<tbody>
|
|
2185
|
-
<tr><td class="sig">getVersion()</td><td class="type">string</td><td class="desc">The version this grid came from, e.g. <code>'1.
|
|
2185
|
+
<tr><td class="sig">getVersion()</td><td class="type">string</td><td class="desc">The version this grid came from, e.g. <code>'1.75.0'</code>. Also on the module as <code>getVersion()</code>, for when you have no grid to hand.</td></tr>
|
|
2186
2186
|
<tr><td class="sig">get(key)</td><td class="type">unknown</td><td class="desc">Read any configuration key.</td></tr>
|
|
2187
2187
|
<tr><td class="sig">set(key, value)</td><td class="type">void</td><td class="desc">Write one key. Every key is live; nothing needs a rebuild.</td></tr>
|
|
2188
2188
|
<tr><td class="sig">setAll(values)</td><td class="type">void</td><td class="desc">Write several in one pass. Emits one <code>config:changed</code> for the batch, not one per key.</td></tr>
|
|
@@ -6057,6 +6057,7 @@ return [p.source, p.pending, p.measures[0].computed, p.reason].join(' | ');</cod
|
|
|
6057
6057
|
<tr><td class="name">measures</td><td class="type">object[]</td><td class="desc"><code>{col, fn, type, axis}</code>: several measures at once, each reduced by an aggregation. <code>fn</code> is one of <code>sum</code>, <code>avg</code> (alias <code>mean</code>), <code>min</code>, <code>max</code>, <code>count</code>, <code>countValues</code>, <code>first</code>, <code>last</code>; it defaults to <code>sum</code>. An <code>fn</code> that is none of these is a mistake, not a silent <code>sum</code>: it warns once, naming the value and the supported set, and falls back to <code>sum</code> so the chart still draws.</td></tr>
|
|
6058
6058
|
<tr><td class="name">title</td><td class="type">string</td><td class="desc">Drawn above the plot.</td></tr>
|
|
6059
6059
|
<tr><td class="name">scheme</td><td class="type">string | string[] | object</td><td class="desc">A named scheme, your own ordered colours, or a <code>{ name: colour }</code> map (BACKLOG-0001453). <code>schemeNames()</code> lists the built-in ones, including a colour-blind-safe palette. The map is what survives a filter: a pie or donut keys it on the category, a chart with <code>series</code> keys it on the series value, and a single-series bar or column keys it on the <code>x</code> category instead. A name the map does not mention falls back to the ordered scheme by its position among the other unmapped names, so <code>{ Operational: 'green', Offline: 'red' }</code> keeps "Operational" exactly as green whichever categories a filter leaves. A map and a <code>palette</code> array do not combine — the map wins, and the array is ignored once, with a warning.</td></tr>
|
|
6060
|
+
<tr><td class="name">ramp</td><td class="type">string[] | <a href="#type-ChartRampOptions">ChartRampOptions</a></td><td class="desc">The colour ramp every ramp-coloured type fills by (<code>heatmap</code>, <code>geomap</code>, density cells, <code>calendar</code>, <code>hexbin</code>, <code>hexmap</code>, <code>choropleth</code>). <code>[low, high]</code> sets the two colours; <code>{ colours, scale }</code> also sets the <strong>scale</strong> a value is placed by (BACKLOG-0001516): <code>'linear'</code>, equal steps of value; <code>'log'</code>, equal ratios, so a city's 40,000-place centre and its 40-place suburbs both get a shade of their own, with zero and below at the bottom of the ramp and the legend labelled at powers of ten (1-2-5 inside two decades); <code>'quantile'</code>, five equal-count classes, the legend labelled at the four cut points. Unset, the chart uses <code>'log'</code> when the positive values span more than 100:1 and says so once (<code>chart.provenance().ramp</code> reports it every draw), and <code>'linear'</code> otherwise. A <code>diverging</code> ramp is always linear.</td></tr>
|
|
6060
6061
|
<tr><td class="name">legend</td><td class="type">boolean | object</td><td class="desc"><code>position</code>, <code>isolate</code> so a click shows only that series (what plain toggling makes a reader with eight series do in seven clicks), and <code>values: true</code>, which appends each entry's own total after its name and a thin space — a category's for pie and donut, a series' for a series legend — formatted by the measure column (BACKLOG-0001453).</td></tr>
|
|
6061
6062
|
<tr><td class="name">emphasis / seriesStyle</td><td class="type">string[] / object</td><td class="desc">Weight, not just hue, for one series among many on a <code>line</code>, <code>area</code> or the line half of a <code>combo</code>/<code>pareto</code> (BACKLOG-0001472) — an equal-weighted index drawn thicker than the 24 tickers it averages, say. <code>emphasis: ['Index']</code> names series by the same value <code>scheme</code>'s map keys on: those draw with a heavier stroke, full opacity and on top; every other series draws thinner and muted. <code>seriesStyle: { Index: { width: 4, dash: [6, 3] } }</code> sets a series' own stroke width and/or dash pattern directly and wins over <code>emphasis</code> for the same name. The fixed emphasis/mute pair is themeable through <code>--lattice-chart-emphasis-width</code> and <code>--lattice-chart-muted-opacity</code>.</td></tr>
|
|
6062
6063
|
<tr><td class="name">centre</td><td class="type">object</td><td class="desc">A donut's own figure, drawn in its hole (BACKLOG-0001453); every other type ignores it, having no hole. <code>{ value: 'total' | number | string, label? }</code> — <code>'total'</code> sums the slices actually drawn, so hiding a category from the legend moves the figure with them; a number is formatted the same way; a string is written through unchanged. <code>label</code> is a second line beneath it. Both are sized to fit the hole and never drawn past its edge.</td></tr>
|
|
@@ -6092,6 +6093,31 @@ return [p.source, p.pending, p.measures[0].computed, p.reason].join(' | ');</cod
|
|
|
6092
6093
|
</tbody>
|
|
6093
6094
|
</table>
|
|
6094
6095
|
</div>
|
|
6096
|
+
<p><strong>The ramp's scale.</strong> Every ramp-coloured type places a value along its ramp by <code>ramp.scale</code> (BACKLOG-0001516): a map whose densest cell holds forty thousand places and whose quietest holds forty is coloured on a log scale unless you ask otherwise, so the forty-place cells are not all the palest shade. The legend labels the scale it drew.</p>
|
|
6097
|
+
<pre data-run="js" data-expect="log | 100 1,000 10,000" data-covers="export:createChart config:ChartRampOptions.colours config:ChartRampOptions.scale"><code>const { createTestDom } = await import('../packages/dom/src/renderer/testdom.js');
|
|
6098
|
+
const { createHeadlessGrid } = await import('../packages/core/src/index.js');
|
|
6099
|
+
const { createChart } = await import('../packages/modules/charts/index.js');
|
|
6100
|
+
|
|
6101
|
+
const { document, root } = createTestDom({ width: 600, height: 300 });
|
|
6102
|
+
const container = document.createElement('div');
|
|
6103
|
+
container.rect = { width: 600, height: 300, top: 0, left: 0 };
|
|
6104
|
+
root.appendChild(container);
|
|
6105
|
+
|
|
6106
|
+
const grid = createHeadlessGrid({
|
|
6107
|
+
rowKey: 'id',
|
|
6108
|
+
columns: [{ field: 'cell' }, { field: 'city' }, { field: 'places', type: 'number' }],
|
|
6109
|
+
rows: [
|
|
6110
|
+
{ id: 'a', cell: 'Centre', city: 'London', places: 40000 },
|
|
6111
|
+
{ id: 'b', cell: 'Inner', city: 'London', places: 1000 },
|
|
6112
|
+
{ id: 'c', cell: 'Outer', city: 'London', places: 40 },
|
|
6113
|
+
],
|
|
6114
|
+
});
|
|
6115
|
+
const chart = createChart({
|
|
6116
|
+
grid, container, type: 'heatmap', x: 'cell', y: 'places', series: 'city', legend: true,
|
|
6117
|
+
ramp: { colours: ['#f7fbff', '#08306b'], scale: 'log' },
|
|
6118
|
+
});
|
|
6119
|
+
const ticks = [...container.querySelectorAll('.lat-chartview__legend-ramp-tick')].map((n) => n.textContent);
|
|
6120
|
+
return [chart.provenance().ramp.scale, ticks.join(' ')].join(' | ');</code></pre>
|
|
6095
6121
|
<p class="section-note">
|
|
6096
6122
|
<strong>A reduction over no readings is a gap, not a zero (BACKLOG-0001088).</strong>
|
|
6097
6123
|
<code>sum</code>, <code>avg</code>/<code>mean</code>, <code>min</code>, <code>max</code>,
|
|
@@ -15846,7 +15872,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
15846
15872
|
<tr><td class="name">end</td><td class="type">string</td><td class="desc">The end-date column, for a gantt chart. <small>(optional)</small></td></tr>
|
|
15847
15873
|
<tr><td class="name">title</td><td class="type">string</td><td class="desc">A heading above the plot, drawn in the figure's caption alongside any `subtitle`. <small>(optional)</small></td></tr>
|
|
15848
15874
|
<tr><td class="name">scheme</td><td class="type"><a href="#type-ChartSchemeName">ChartSchemeName</a> | string | string[] | Record<string, string> | <a href="#type-ChartScheme">ChartScheme</a></td><td class="desc">A named scheme, an array of colours, a `{ [name]: colour }` map (BACKLOG-0001453), or a full {@link ChartScheme} object (BACKLOG-0001471) — the shape every built-in scheme already is, so a host can override the ramps and semantic colours alongside the palette in one value. The built-in names are {@link ChartSchemeName} (`'default'`, `'bright'`, `'earth'`, `'mono'`); a name registered with `registerScheme` is a plain string alongside them. The map is the form that survives a filter: a pie or donut keys it on the category (`x`) value, a chart with a `series` column keys it on the series value, and a single-series bar or column — no `series` — keys it on the `x` category instead. A name absent from the map falls back to the ordered scheme by its position among the *other unmapped* names, so `{ Operational: 'green' }` keeps every other category exactly as it was whichever ones a filter removes — an ordered array reassigns every colour after the gap. A map and an array `palette` do not combine; given both, the map wins and the array is ignored, once, with a warning. A {@link ChartScheme} object and a map are told apart by content: an object naming at least one of `series`/`sequential`/`diverging`/`positive`/`negative` is a scheme override, not a map of category names to colours. <small>(optional)</small></td></tr>
|
|
15849
|
-
<tr><td class="name">ramp</td><td class="type">[string, string] | string[]</td><td class="desc">A shorthand that overrides only the resolved scheme's sequential ramp — the colour a heatmap, calendar, hexbin or hexmap's magnitude comes from — leaving the palette, the diverging ramp and the semantic colours as the scheme (named or default) already set them (BACKLOG-0001471). Two colours, low value then high; a longer array is read by its first and last stop. <small>(optional)</small></td></tr>
|
|
15875
|
+
<tr><td class="name">ramp</td><td class="type">[string, string] | string[] | <a href="#type-ChartRampOptions">ChartRampOptions</a></td><td class="desc">A shorthand that overrides only the resolved scheme's sequential ramp — the colour a heatmap, calendar, hexbin or hexmap's magnitude comes from — leaving the palette, the diverging ramp and the semantic colours as the scheme (named or default) already set them (BACKLOG-0001471). Two colours, low value then high; a longer array is read by its first and last stop. The object form, {@link ChartRampOptions}, also takes the `scale` a value is placed along the ramp by — `'linear'`, `'log'` or `'quantile'`, chosen from the values when unset (BACKLOG-0001516). <small>(optional)</small></td></tr>
|
|
15850
15876
|
<tr><td class="name">emphasis</td><td class="type">string[]</td><td class="desc">Draw these series (by their own value, the same name `scheme`'s map keys on) with a heavier stroke, full opacity and on top of the rest; every other series draws thinner and muted (BACKLOG-0001472). Applies to `line`, `area` and the line half of `combo`/`pareto`. The fixed style pair is themeable through `--lattice-chart-emphasis-width` and `--lattice-chart-muted-opacity`. An entry in {@link ChartSpec.seriesStyle} for the same name wins over this. <small>(optional)</small></td></tr>
|
|
15851
15877
|
<tr><td class="name">seriesStyle</td><td class="type">Record<string, { width?: number; dash?: number[] }></td><td class="desc">An explicit stroke width and/or dash pattern for a named series (BACKLOG-0001472), keyed the same way {@link ChartSpec.emphasis} is. Wins over `emphasis` for a series named in both. Applies to `line`, `area` and the line half of `combo`/`pareto`. <small>(optional)</small></td></tr>
|
|
15852
15878
|
<tr><td class="name">legend</td><td class="type">boolean | { position?: 'top' | 'bottom' | 'left' | 'right'; isolate?: boolean; values?: boolean; title?: string; }</td><td class="desc">Show the series legend. The object form places it, and `isolate` lets a click on a legend entry show that series alone. `values: true` appends each entry's own total — a category's for pie and donut, a series' for a series legend — formatted by the measure column, after the name and a thin space (BACKLOG-0001453). `title` labels a continuous colour-ramp legend (heatmap, calendar, hexbin, hexmap); ignored by a series legend, which names each series instead. <small>(optional)</small></td></tr>
|
|
@@ -16736,7 +16762,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
16736
16762
|
<tr><td class="name">binned</td><td class="type">boolean</td><td class="desc">True when `rows` are density cells (`{ west, south, east, north, count }`), not rows.</td></tr>
|
|
16737
16763
|
<tr><td class="name">pending</td><td class="type">boolean</td><td class="desc">True while an engine request for the view is in flight; `rows` is the last answer.</td></tr>
|
|
16738
16764
|
<tr><td class="name">features</td><td class="type">Array<{ type: 'Feature'; geometry: Record<string, unknown>; properties: Record<string, unknown> }></td><td class="desc">One GeoJSON `Feature` per placed row, the row as its `properties`; empty when binned.</td></tr>
|
|
16739
|
-
<tr><td class="name">provenance</td><td class="type"><a href="#type-ChartViewportProvenance">ChartViewportProvenance</a
|
|
16765
|
+
<tr><td class="name">provenance</td><td class="type"><a href="#type-ChartViewportProvenance">ChartViewportProvenance</a> & { skipped: number }</td><td class="desc">What was handed over — the shape of `chart.provenance().viewport`, where `rows` is the rows drawn and always equals `features.length`, plus `skipped`: the rows handed over whose position is blank or could not be read by the geometry type's own reader (WKT, WKB or GeoJSON, as an object or as text), counted here and never as drawn; 0 when binned.</td></tr>
|
|
16740
16766
|
</tbody>
|
|
16741
16767
|
</table>
|
|
16742
16768
|
</div>
|
|
@@ -19689,10 +19715,22 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
19689
19715
|
<tr><td class="name">refused</td><td class="type">boolean</td><td class="desc">True when `aggregate: 'engine'` was asked and the source could not serve it.</td></tr>
|
|
19690
19716
|
<tr><td class="name">pending</td><td class="type">boolean</td><td class="desc">True while an engine request is in flight; the last drawing stays up until it lands.</td></tr>
|
|
19691
19717
|
<tr><td class="name">viewport</td><td class="type"><a href="#type-ChartViewportProvenance">ChartViewportProvenance</a></td><td class="desc">A map's view (GEO-6; see {@link ChartSpec.viewportCap}): present when the engine sent the rows for the view, or when the cap changed what is drawn. <small>(optional)</small></td></tr>
|
|
19718
|
+
<tr><td class="name">ramp</td><td class="type">{ scale: 'linear' | 'log' | 'quantile'; auto: boolean; ratio: number }</td><td class="desc">A ramp-coloured draw (BACKLOG-0001516; see {@link ChartRampOptions.scale}): the scale its marks were placed on, `auto` when the chart chose it from the values rather than the spec asking, and the finite positive values' largest / smallest (0 when there are none). <small>(optional)</small></td></tr>
|
|
19692
19719
|
<tr><td class="name">measures</td><td class="type">Array<{ col: string | null; fn: string; computed: 'engine' | 'client'; /** The pushdown map's class for an engine measure: `identical` or `may-differ`. */ class?: string; /** Why, for a client measure. */ reason?: string; }></td><td class="desc">Each measure's column, reduction and where it was computed.</td></tr>
|
|
19693
19720
|
</tbody>
|
|
19694
19721
|
</table>
|
|
19695
19722
|
</div>
|
|
19723
|
+
<h4 id="type-ChartRampOptions">ChartRampOptions</h4>
|
|
19724
|
+
<p class="section-note">The object form of {@link ChartSpec.ramp} (BACKLOG-0001516): the ramp's colours together with the scale a value is placed along it by. Read by every ramp-coloured type — `heatmap`, `geomap`, a `markermap` or `bubblemap` past its viewport cap (density cells), and the opt-in `calendar`, `hexbin`, `hexmap` and `choropleth`.</p>
|
|
19725
|
+
<div class="table-wrap">
|
|
19726
|
+
<table>
|
|
19727
|
+
<thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead>
|
|
19728
|
+
<tbody>
|
|
19729
|
+
<tr><td class="name">colours</td><td class="type">[string, string] | string[]</td><td class="desc">The sequential ramp's two colours, low value then high; the scheme's pair when unset. <small>(optional)</small></td></tr>
|
|
19730
|
+
<tr><td class="name">scale</td><td class="type">'linear' | 'log' | 'quantile'</td><td class="desc">How a value is placed along the ramp. `'linear'`: equal steps of value are equal steps of colour. `'log'`: equal ratios are, so 10 → 100 moves as far as 1,000 → 10,000; a value at or below zero is drawn at the bottom of the ramp; the legend labels powers of ten (1-2-5 steps when the values span under two decades). `'quantile'`: the values are split into five classes of equal count, one shade each, and the legend labels the four cut points. Unset, the chart chooses: `'log'` when the finite positive values span more than two orders of magnitude (largest / smallest > 100), saying so once in the console and in `chart.provenance().ramp`, and `'linear'` otherwise. A diverging ramp is always linear and centred on zero. <small>(optional)</small></td></tr>
|
|
19731
|
+
</tbody>
|
|
19732
|
+
</table>
|
|
19733
|
+
</div>
|
|
19696
19734
|
<h4 id="type-ChartState">ChartState</h4>
|
|
19697
19735
|
<p class="section-note">What a chart's own view state holds: the drawings on it, and the zoom.</p>
|
|
19698
19736
|
<div class="table-wrap">
|
|
@@ -21877,7 +21915,7 @@ return `next ${p.mean.toFixed(1)}; r2 ${f.r2.toFixed(1)}; band ${p.upper - p.low
|
|
|
21877
21915
|
<!-- END GENERATED TYPE REFERENCE -->
|
|
21878
21916
|
|
|
21879
21917
|
<footer>
|
|
21880
|
-
Lattice Grid 1.
|
|
21918
|
+
Lattice Grid 1.75.0 · Copyright © 2026 TOCLOCO Inc. All rights reserved.
|
|
21881
21919
|
This document describes the behaviour of the shipped library. Where this guide and the code
|
|
21882
21920
|
disagree, the code wins: please <a href="https://www.latticegrid.dev">tell us</a>.
|
|
21883
21921
|
</footer>
|
package/docs/CHART-CODES.md
CHANGED
|
@@ -174,6 +174,14 @@ palest sixth, so the *lowest real reading* does not fall close enough to that
|
|
|
174
174
|
empty tone to read as the same thing — a heatmap's ramp is unaffected; its pale
|
|
175
175
|
end is the intended bottom of its own scale.
|
|
176
176
|
|
|
177
|
+
The ramp places a value by a **scale** (`ramp: { scale }`, BACKLOG-0001516):
|
|
178
|
+
`'linear'`, `'log'` or `'quantile'`. Unset, a map whose positive values span
|
|
179
|
+
more than two orders of magnitude (largest / smallest > 100) is coloured on a
|
|
180
|
+
log scale, and says so once; otherwise linear. A log scale draws zero and below
|
|
181
|
+
at the bottom of the ramp and labels its legend at powers of ten; a quantile
|
|
182
|
+
scale draws five equal-count classes and labels the cut points. A diverging
|
|
183
|
+
ramp is always linear.
|
|
184
|
+
|
|
177
185
|
## Rendering and interaction (1.63)
|
|
178
186
|
|
|
179
187
|
A region's stroke comes from `--lattice-chart-map-stroke` (falling back to the
|
package/docs/api/adapters.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Adapters API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Adapters API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/ai.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>AI API Reference — Lattice Grid 1.
|
|
16
|
+
<title>AI API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/alarms.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Alarms API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Alarms API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/charts.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Charts API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Charts API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
|
@@ -507,6 +507,7 @@ return [p.source, p.pending, p.measures[0].computed, p.reason].join(' | ');</cod
|
|
|
507
507
|
<tr><td class="name">measures</td><td class="type">object[]</td><td class="desc"><code>{col, fn, type, axis}</code>: several measures at once, each reduced by an aggregation. <code>fn</code> is one of <code>sum</code>, <code>avg</code> (alias <code>mean</code>), <code>min</code>, <code>max</code>, <code>count</code>, <code>countValues</code>, <code>first</code>, <code>last</code>; it defaults to <code>sum</code>. An <code>fn</code> that is none of these is a mistake, not a silent <code>sum</code>: it warns once, naming the value and the supported set, and falls back to <code>sum</code> so the chart still draws.</td></tr>
|
|
508
508
|
<tr><td class="name">title</td><td class="type">string</td><td class="desc">Drawn above the plot.</td></tr>
|
|
509
509
|
<tr><td class="name">scheme</td><td class="type">string | string[] | object</td><td class="desc">A named scheme, your own ordered colours, or a <code>{ name: colour }</code> map (BACKLOG-0001453). <code>schemeNames()</code> lists the built-in ones, including a colour-blind-safe palette. The map is what survives a filter: a pie or donut keys it on the category, a chart with <code>series</code> keys it on the series value, and a single-series bar or column keys it on the <code>x</code> category instead. A name the map does not mention falls back to the ordered scheme by its position among the other unmapped names, so <code>{ Operational: 'green', Offline: 'red' }</code> keeps "Operational" exactly as green whichever categories a filter leaves. A map and a <code>palette</code> array do not combine — the map wins, and the array is ignored once, with a warning.</td></tr>
|
|
510
|
+
<tr><td class="name">ramp</td><td class="type">string[] | <a href="types.html#type-ChartRampOptions">ChartRampOptions</a></td><td class="desc">The colour ramp every ramp-coloured type fills by (<code>heatmap</code>, <code>geomap</code>, density cells, <code>calendar</code>, <code>hexbin</code>, <code>hexmap</code>, <code>choropleth</code>). <code>[low, high]</code> sets the two colours; <code>{ colours, scale }</code> also sets the <strong>scale</strong> a value is placed by (BACKLOG-0001516): <code>'linear'</code>, equal steps of value; <code>'log'</code>, equal ratios, so a city's 40,000-place centre and its 40-place suburbs both get a shade of their own, with zero and below at the bottom of the ramp and the legend labelled at powers of ten (1-2-5 inside two decades); <code>'quantile'</code>, five equal-count classes, the legend labelled at the four cut points. Unset, the chart uses <code>'log'</code> when the positive values span more than 100:1 and says so once (<code>chart.provenance().ramp</code> reports it every draw), and <code>'linear'</code> otherwise. A <code>diverging</code> ramp is always linear.</td></tr>
|
|
510
511
|
<tr><td class="name">legend</td><td class="type">boolean | object</td><td class="desc"><code>position</code>, <code>isolate</code> so a click shows only that series (what plain toggling makes a reader with eight series do in seven clicks), and <code>values: true</code>, which appends each entry's own total after its name and a thin space — a category's for pie and donut, a series' for a series legend — formatted by the measure column (BACKLOG-0001453).</td></tr>
|
|
511
512
|
<tr><td class="name">emphasis / seriesStyle</td><td class="type">string[] / object</td><td class="desc">Weight, not just hue, for one series among many on a <code>line</code>, <code>area</code> or the line half of a <code>combo</code>/<code>pareto</code> (BACKLOG-0001472) — an equal-weighted index drawn thicker than the 24 tickers it averages, say. <code>emphasis: ['Index']</code> names series by the same value <code>scheme</code>'s map keys on: those draw with a heavier stroke, full opacity and on top; every other series draws thinner and muted. <code>seriesStyle: { Index: { width: 4, dash: [6, 3] } }</code> sets a series' own stroke width and/or dash pattern directly and wins over <code>emphasis</code> for the same name. The fixed emphasis/mute pair is themeable through <code>--lattice-chart-emphasis-width</code> and <code>--lattice-chart-muted-opacity</code>.</td></tr>
|
|
512
513
|
<tr><td class="name">centre</td><td class="type">object</td><td class="desc">A donut's own figure, drawn in its hole (BACKLOG-0001453); every other type ignores it, having no hole. <code>{ value: 'total' | number | string, label? }</code> — <code>'total'</code> sums the slices actually drawn, so hiding a category from the legend moves the figure with them; a number is formatted the same way; a string is written through unchanged. <code>label</code> is a second line beneath it. Both are sized to fit the hole and never drawn past its edge.</td></tr>
|
|
@@ -542,6 +543,31 @@ return [p.source, p.pending, p.measures[0].computed, p.reason].join(' | ');</cod
|
|
|
542
543
|
</tbody>
|
|
543
544
|
</table>
|
|
544
545
|
</div>
|
|
546
|
+
<p><strong>The ramp's scale.</strong> Every ramp-coloured type places a value along its ramp by <code>ramp.scale</code> (BACKLOG-0001516): a map whose densest cell holds forty thousand places and whose quietest holds forty is coloured on a log scale unless you ask otherwise, so the forty-place cells are not all the palest shade. The legend labels the scale it drew.</p>
|
|
547
|
+
<pre data-run="js" data-expect="log | 100 1,000 10,000" data-covers="export:createChart config:ChartRampOptions.colours config:ChartRampOptions.scale"><code>const { createTestDom } = await import('../packages/dom/src/renderer/testdom.js');
|
|
548
|
+
const { createHeadlessGrid } = await import('../packages/core/src/index.js');
|
|
549
|
+
const { createChart } = await import('../packages/modules/charts/index.js');
|
|
550
|
+
|
|
551
|
+
const { document, root } = createTestDom({ width: 600, height: 300 });
|
|
552
|
+
const container = document.createElement('div');
|
|
553
|
+
container.rect = { width: 600, height: 300, top: 0, left: 0 };
|
|
554
|
+
root.appendChild(container);
|
|
555
|
+
|
|
556
|
+
const grid = createHeadlessGrid({
|
|
557
|
+
rowKey: 'id',
|
|
558
|
+
columns: [{ field: 'cell' }, { field: 'city' }, { field: 'places', type: 'number' }],
|
|
559
|
+
rows: [
|
|
560
|
+
{ id: 'a', cell: 'Centre', city: 'London', places: 40000 },
|
|
561
|
+
{ id: 'b', cell: 'Inner', city: 'London', places: 1000 },
|
|
562
|
+
{ id: 'c', cell: 'Outer', city: 'London', places: 40 },
|
|
563
|
+
],
|
|
564
|
+
});
|
|
565
|
+
const chart = createChart({
|
|
566
|
+
grid, container, type: 'heatmap', x: 'cell', y: 'places', series: 'city', legend: true,
|
|
567
|
+
ramp: { colours: ['#f7fbff', '#08306b'], scale: 'log' },
|
|
568
|
+
});
|
|
569
|
+
const ticks = [...container.querySelectorAll('.lat-chartview__legend-ramp-tick')].map((n) => n.textContent);
|
|
570
|
+
return [chart.provenance().ramp.scale, ticks.join(' ')].join(' | ');</code></pre>
|
|
545
571
|
<p class="section-note">
|
|
546
572
|
<strong>A reduction over no readings is a gap, not a zero (BACKLOG-0001088).</strong>
|
|
547
573
|
<code>sum</code>, <code>avg</code>/<code>mean</code>, <code>min</code>, <code>max</code>,
|
|
@@ -1591,7 +1617,7 @@ return `${before}; volume under price ${volumeTop > priceBottom}; ${falls} fa
|
|
|
1591
1617
|
<tr><td class="name">end</td><td class="type">string</td><td class="desc">The end-date column, for a gantt chart. <small>(optional)</small></td></tr>
|
|
1592
1618
|
<tr><td class="name">title</td><td class="type">string</td><td class="desc">A heading above the plot, drawn in the figure's caption alongside any `subtitle`. <small>(optional)</small></td></tr>
|
|
1593
1619
|
<tr><td class="name">scheme</td><td class="type"><a href="types.html#type-ChartSchemeName">ChartSchemeName</a> | string | string[] | Record<string, string> | <a href="#type-ChartScheme">ChartScheme</a></td><td class="desc">A named scheme, an array of colours, a `{ [name]: colour }` map (BACKLOG-0001453), or a full {@link ChartScheme} object (BACKLOG-0001471) — the shape every built-in scheme already is, so a host can override the ramps and semantic colours alongside the palette in one value. The built-in names are {@link ChartSchemeName} (`'default'`, `'bright'`, `'earth'`, `'mono'`); a name registered with `registerScheme` is a plain string alongside them. The map is the form that survives a filter: a pie or donut keys it on the category (`x`) value, a chart with a `series` column keys it on the series value, and a single-series bar or column — no `series` — keys it on the `x` category instead. A name absent from the map falls back to the ordered scheme by its position among the *other unmapped* names, so `{ Operational: 'green' }` keeps every other category exactly as it was whichever ones a filter removes — an ordered array reassigns every colour after the gap. A map and an array `palette` do not combine; given both, the map wins and the array is ignored, once, with a warning. A {@link ChartScheme} object and a map are told apart by content: an object naming at least one of `series`/`sequential`/`diverging`/`positive`/`negative` is a scheme override, not a map of category names to colours. <small>(optional)</small></td></tr>
|
|
1594
|
-
<tr><td class="name">ramp</td><td class="type">[string, string] | string[]</td><td class="desc">A shorthand that overrides only the resolved scheme's sequential ramp — the colour a heatmap, calendar, hexbin or hexmap's magnitude comes from — leaving the palette, the diverging ramp and the semantic colours as the scheme (named or default) already set them (BACKLOG-0001471). Two colours, low value then high; a longer array is read by its first and last stop. <small>(optional)</small></td></tr>
|
|
1620
|
+
<tr><td class="name">ramp</td><td class="type">[string, string] | string[] | <a href="types.html#type-ChartRampOptions">ChartRampOptions</a></td><td class="desc">A shorthand that overrides only the resolved scheme's sequential ramp — the colour a heatmap, calendar, hexbin or hexmap's magnitude comes from — leaving the palette, the diverging ramp and the semantic colours as the scheme (named or default) already set them (BACKLOG-0001471). Two colours, low value then high; a longer array is read by its first and last stop. The object form, {@link ChartRampOptions}, also takes the `scale` a value is placed along the ramp by — `'linear'`, `'log'` or `'quantile'`, chosen from the values when unset (BACKLOG-0001516). <small>(optional)</small></td></tr>
|
|
1595
1621
|
<tr><td class="name">emphasis</td><td class="type">string[]</td><td class="desc">Draw these series (by their own value, the same name `scheme`'s map keys on) with a heavier stroke, full opacity and on top of the rest; every other series draws thinner and muted (BACKLOG-0001472). Applies to `line`, `area` and the line half of `combo`/`pareto`. The fixed style pair is themeable through `--lattice-chart-emphasis-width` and `--lattice-chart-muted-opacity`. An entry in {@link ChartSpec.seriesStyle} for the same name wins over this. <small>(optional)</small></td></tr>
|
|
1596
1622
|
<tr><td class="name">seriesStyle</td><td class="type">Record<string, { width?: number; dash?: number[] }></td><td class="desc">An explicit stroke width and/or dash pattern for a named series (BACKLOG-0001472), keyed the same way {@link ChartSpec.emphasis} is. Wins over `emphasis` for a series named in both. Applies to `line`, `area` and the line half of `combo`/`pareto`. <small>(optional)</small></td></tr>
|
|
1597
1623
|
<tr><td class="name">legend</td><td class="type">boolean | { position?: 'top' | 'bottom' | 'left' | 'right'; isolate?: boolean; values?: boolean; title?: string; }</td><td class="desc">Show the series legend. The object form places it, and `isolate` lets a click on a legend entry show that series alone. `values: true` appends each entry's own total — a category's for pie and donut, a series' for a series legend — formatted by the measure column, after the name and a thin space (BACKLOG-0001453). `title` labels a continuous colour-ramp legend (heatmap, calendar, hexbin, hexmap); ignored by a series legend, which names each series instead. <small>(optional)</small></td></tr>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Data router API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Data router API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/deckgl.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>deck.gl API Reference — Lattice Grid 1.
|
|
16
|
+
<title>deck.gl API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
|
@@ -529,7 +529,7 @@ return drawn.join(' | '); // 40 | 20 | 5 | 20</code></p
|
|
|
529
529
|
<tr><td class="name">binned</td><td class="type">boolean</td><td class="desc">True when `rows` are density cells (`{ west, south, east, north, count }`), not rows.</td></tr>
|
|
530
530
|
<tr><td class="name">pending</td><td class="type">boolean</td><td class="desc">True while an engine request for the view is in flight; `rows` is the last answer.</td></tr>
|
|
531
531
|
<tr><td class="name">features</td><td class="type">Array<{ type: 'Feature'; geometry: Record<string, unknown>; properties: Record<string, unknown> }></td><td class="desc">One GeoJSON `Feature` per placed row, the row as its `properties`; empty when binned.</td></tr>
|
|
532
|
-
<tr><td class="name">provenance</td><td class="type"><a href="types.html#type-ChartViewportProvenance">ChartViewportProvenance</a
|
|
532
|
+
<tr><td class="name">provenance</td><td class="type"><a href="types.html#type-ChartViewportProvenance">ChartViewportProvenance</a> & { skipped: number }</td><td class="desc">What was handed over — the shape of `chart.provenance().viewport`, where `rows` is the rows drawn and always equals `features.length`, plus `skipped`: the rows handed over whose position is blank or could not be read by the geometry type's own reader (WKT, WKB or GeoJSON, as an object or as text), counted here and never as drawn; 0 when binned.</td></tr>
|
|
533
533
|
</tbody>
|
|
534
534
|
</table>
|
|
535
535
|
</div>
|
package/docs/api/gantt.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Gantt API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Gantt API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/geometry.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Geometry API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Geometry API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/grid.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Grid API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Grid API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
|
@@ -1118,7 +1118,7 @@ grid.destroy();
|
|
|
1118
1118
|
<table>
|
|
1119
1119
|
<thead><tr><th>Member</th><th>Returns</th><th>Description</th></tr></thead>
|
|
1120
1120
|
<tbody>
|
|
1121
|
-
<tr><td class="sig">getVersion()</td><td class="type">string</td><td class="desc">The version this grid came from, e.g. <code>'1.
|
|
1121
|
+
<tr><td class="sig">getVersion()</td><td class="type">string</td><td class="desc">The version this grid came from, e.g. <code>'1.75.0'</code>. Also on the module as <code>getVersion()</code>, for when you have no grid to hand.</td></tr>
|
|
1122
1122
|
<tr><td class="sig">get(key)</td><td class="type">unknown</td><td class="desc">Read any configuration key.</td></tr>
|
|
1123
1123
|
<tr><td class="sig">set(key, value)</td><td class="type">void</td><td class="desc">Write one key. Every key is live; nothing needs a rebuild.</td></tr>
|
|
1124
1124
|
<tr><td class="sig">setAll(values)</td><td class="type">void</td><td class="desc">Write several in one pass. Emits one <code>config:changed</code> for the batch, not one per key.</td></tr>
|
package/docs/api/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>API Reference — Lattice Grid 1.
|
|
16
|
+
<title>API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
<tr><td class="name"><a href="ai.html">The AI narrative and insights layer</a></td><td class="desc">The narrative module: summaries, insights and risk text over what the grid already holds. The <code>grid.ai</code> intent layer is on the grid page.</td><td class="type">1</td><td class="type">17</td><td class="type">124</td></tr>
|
|
445
445
|
<tr><td class="name"><a href="mock-socket.html">The mock socket</a></td><td class="desc">A scripted feed with no backend behind it, for building and demonstrating a live screen.</td><td class="type">1</td><td class="type">1</td><td class="type">3</td></tr>
|
|
446
446
|
<tr><td class="name"><a href="adapters.html">Framework adapters and custom elements</a></td><td class="desc">A component for every view in React, Vue, Svelte and Angular, a custom element per view, declarative init, the dhtmlx wrapper and htmx.</td><td class="type">5</td><td class="type">19</td><td class="type">87</td></tr>
|
|
447
|
-
<tr><td class="name"><a href="types.html">Types and the glossary</a></td><td class="desc">Every type alias the declarations export, with its definition, and the value and result types the surfaces hand back. Every type name on every page links here.</td><td class="type">0</td><td class="type">
|
|
447
|
+
<tr><td class="name"><a href="types.html">Types and the glossary</a></td><td class="desc">Every type alias the declarations export, with its definition, and the value and result types the surfaces hand back. Every type name on every page links here.</td><td class="type">0</td><td class="type">379</td><td class="type">713</td></tr>
|
|
448
448
|
</tbody>
|
|
449
449
|
</table>
|
|
450
450
|
</div>
|
package/docs/api/kanban.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Kanban API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Kanban API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/kpi.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>KPI API Reference — Lattice Grid 1.
|
|
16
|
+
<title>KPI API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/layout.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Layout API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Layout API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/list.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>List API Reference — Lattice Grid 1.
|
|
16
|
+
<title>List API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Mock socket API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Mock socket API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/tabs.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Tabs API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Tabs API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
package/docs/api/types.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
Self-contained: no stylesheet, script or font is fetched, so this opens from disk, from
|
|
14
14
|
a file share or from behind a firewall with nothing else present.
|
|
15
15
|
-->
|
|
16
|
-
<title>Types API Reference — Lattice Grid 1.
|
|
16
|
+
<title>Types API Reference — Lattice Grid 1.75.0</title>
|
|
17
17
|
<style>
|
|
18
18
|
/* ---------------------------------------------------------------
|
|
19
19
|
Palette lifted from the grid's own theme, so the reference reads as an
|
|
@@ -936,10 +936,22 @@
|
|
|
936
936
|
<tr><td class="name">refused</td><td class="type">boolean</td><td class="desc">True when `aggregate: 'engine'` was asked and the source could not serve it.</td></tr>
|
|
937
937
|
<tr><td class="name">pending</td><td class="type">boolean</td><td class="desc">True while an engine request is in flight; the last drawing stays up until it lands.</td></tr>
|
|
938
938
|
<tr><td class="name">viewport</td><td class="type"><a href="#type-ChartViewportProvenance">ChartViewportProvenance</a></td><td class="desc">A map's view (GEO-6; see {@link ChartSpec.viewportCap}): present when the engine sent the rows for the view, or when the cap changed what is drawn. <small>(optional)</small></td></tr>
|
|
939
|
+
<tr><td class="name">ramp</td><td class="type">{ scale: 'linear' | 'log' | 'quantile'; auto: boolean; ratio: number }</td><td class="desc">A ramp-coloured draw (BACKLOG-0001516; see {@link ChartRampOptions.scale}): the scale its marks were placed on, `auto` when the chart chose it from the values rather than the spec asking, and the finite positive values' largest / smallest (0 when there are none). <small>(optional)</small></td></tr>
|
|
939
940
|
<tr><td class="name">measures</td><td class="type">Array<{ col: string | null; fn: string; computed: 'engine' | 'client'; /** The pushdown map's class for an engine measure: `identical` or `may-differ`. */ class?: string; /** Why, for a client measure. */ reason?: string; }></td><td class="desc">Each measure's column, reduction and where it was computed.</td></tr>
|
|
940
941
|
</tbody>
|
|
941
942
|
</table>
|
|
942
943
|
</div>
|
|
944
|
+
<h4 id="type-ChartRampOptions">ChartRampOptions</h4>
|
|
945
|
+
<p class="section-note">The object form of {@link ChartSpec.ramp} (BACKLOG-0001516): the ramp's colours together with the scale a value is placed along it by. Read by every ramp-coloured type — `heatmap`, `geomap`, a `markermap` or `bubblemap` past its viewport cap (density cells), and the opt-in `calendar`, `hexbin`, `hexmap` and `choropleth`.</p>
|
|
946
|
+
<div class="table-wrap">
|
|
947
|
+
<table>
|
|
948
|
+
<thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead>
|
|
949
|
+
<tbody>
|
|
950
|
+
<tr><td class="name">colours</td><td class="type">[string, string] | string[]</td><td class="desc">The sequential ramp's two colours, low value then high; the scheme's pair when unset. <small>(optional)</small></td></tr>
|
|
951
|
+
<tr><td class="name">scale</td><td class="type">'linear' | 'log' | 'quantile'</td><td class="desc">How a value is placed along the ramp. `'linear'`: equal steps of value are equal steps of colour. `'log'`: equal ratios are, so 10 → 100 moves as far as 1,000 → 10,000; a value at or below zero is drawn at the bottom of the ramp; the legend labels powers of ten (1-2-5 steps when the values span under two decades). `'quantile'`: the values are split into five classes of equal count, one shade each, and the legend labels the four cut points. Unset, the chart chooses: `'log'` when the finite positive values span more than two orders of magnitude (largest / smallest > 100), saying so once in the console and in `chart.provenance().ramp`, and `'linear'` otherwise. A diverging ramp is always linear and centred on zero. <small>(optional)</small></td></tr>
|
|
952
|
+
</tbody>
|
|
953
|
+
</table>
|
|
954
|
+
</div>
|
|
943
955
|
<h4 id="type-ChartState">ChartState</h4>
|
|
944
956
|
<p class="section-note">What a chart's own view state holds: the drawings on it, and the zoom.</p>
|
|
945
957
|
<div class="table-wrap">
|
package/docs/api-detail.html
CHANGED
|
@@ -437,7 +437,7 @@
|
|
|
437
437
|
<div class="shell">
|
|
438
438
|
<aside class="rail">
|
|
439
439
|
<p class="rail__brand">Lattice Grid</p>
|
|
440
|
-
<p class="rail__sub">Developer guide · v1.
|
|
440
|
+
<p class="rail__sub">Developer guide · v1.75.0</p>
|
|
441
441
|
<nav>
|
|
442
442
|
<div class="rail__group">
|
|
443
443
|
<span class="rail__label">Start here</span>
|
|
@@ -554,7 +554,7 @@
|
|
|
554
554
|
<a href="API.html">reference tables</a> are the shorter version for when you already know.
|
|
555
555
|
</p>
|
|
556
556
|
<p class="chips">
|
|
557
|
-
<span class="chip">Version 1.
|
|
557
|
+
<span class="chip">Version 1.75.0</span>
|
|
558
558
|
<span class="chip">Zero dependencies</span>
|
|
559
559
|
<span class="chip">No build step</span>
|
|
560
560
|
</p>
|
|
@@ -1331,6 +1331,15 @@ autoInit(document);</code></pre>
|
|
|
1331
1331
|
library, not just through <code>autoInit</code>: <code>element.__lattice</code> holds
|
|
1332
1332
|
the instance for any element <code>createGrid</code> was called on, and is cleared
|
|
1333
1333
|
when the grid is destroyed.</p>
|
|
1334
|
+
<p id="htmx-guide-data-type"><strong>Column type precedence when hydrating a
|
|
1335
|
+
table.</strong> A <code><th data-type="..."></code> sets that column's
|
|
1336
|
+
<code>type</code> to any built-in type name (the seven base types plus the
|
|
1337
|
+
extended catalogue); an unknown name is warned about once, by name, and
|
|
1338
|
+
ignored, leaving the column to sampled shape typing exactly as if no
|
|
1339
|
+
<code>data-type</code> had been given. A sibling <code>data-format</code>
|
|
1340
|
+
likewise sets <code>format</code> when present. <code>hydrateTable</code>'s
|
|
1341
|
+
own <code>config.columns</code>, when given, still takes precedence over
|
|
1342
|
+
both for the same column.</p>
|
|
1334
1343
|
</div>
|
|
1335
1344
|
|
|
1336
1345
|
<div class="example">
|
|
@@ -1493,7 +1502,7 @@ off(); <span class="cmt">// every subscrip
|
|
|
1493
1502
|
</p>
|
|
1494
1503
|
<div class="example">
|
|
1495
1504
|
<p class="example__label">Which version am I running?</p>
|
|
1496
|
-
<pre><code>grid.getVersion(); <span class="cmt">// '1.
|
|
1505
|
+
<pre><code>grid.getVersion(); <span class="cmt">// '1.75.0'</span>
|
|
1497
1506
|
LatticeGrid.getVersion(); <span class="cmt">// the same, when you have no grid to hand</span></code></pre>
|
|
1498
1507
|
</div>
|
|
1499
1508
|
<p class="lead-in">
|
|
@@ -10944,7 +10953,7 @@ grid.licence.state(); <span class="cmt">// 'licensed' | 'localhost' | 'trial'<
|
|
|
10944
10953
|
|
|
10945
10954
|
<footer>
|
|
10946
10955
|
<p>
|
|
10947
|
-
Lattice Grid 1.
|
|
10956
|
+
Lattice Grid 1.75.0 · Copyright © 2026 TOCLOCO Inc. All rights reserved.
|
|
10948
10957
|
Written against the shipped source. Where this guide and the code disagree, the code wins,
|
|
10949
10958
|
please <a href="https://www.latticegrid.dev">tell us</a>.
|
|
10950
10959
|
</p>
|