@toclocoinc/lattice-grid 1.63.3 → 1.65.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 +4 -2
- package/docs/API.html +408 -25
- package/docs/CHART-CODES.md +24 -0
- package/docs/api-detail.html +115 -5
- package/lattice-grid.d.ts +333 -205
- package/lattice-grid.esm.min.js +155 -96
- package/lattice-grid.min.cjs +155 -96
- package/lattice-grid.min.js +155 -96
- package/modules/ai.d.ts +10 -13
- package/modules/ai.esm.min.js +3 -6
- package/modules/ai.min.cjs +3 -6
- package/modules/ai.min.js +3 -6
- package/modules/angular.d.ts +2 -2
- package/modules/angular.esm.min.js +433 -10
- package/modules/angular.min.cjs +433 -10
- package/modules/angular.min.js +433 -10
- package/modules/chart-alluvial.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/modules/chart-calendar.esm.min.js +1 -1
- package/modules/chart-calendar.min.cjs +1 -1
- package/modules/chart-calendar.min.js +1 -1
- package/modules/chart-decomposition.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/modules/chart-hexbin.esm.min.js +1 -1
- package/modules/chart-hexbin.min.cjs +1 -1
- package/modules/chart-hexbin.min.js +1 -1
- package/modules/chart-hexmap.d.ts +2 -2
- package/modules/chart-hexmap.esm.min.js +1 -1
- package/modules/chart-hexmap.min.cjs +1 -1
- package/modules/chart-hexmap.min.js +1 -1
- package/modules/chart-icicle.d.ts +2 -2
- 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 +29 -0
- package/modules/chart-markermap.esm.min.js +313 -0
- package/modules/chart-markermap.min.cjs +317 -0
- package/modules/chart-markermap.min.js +317 -0
- package/modules/chart-parallel.d.ts +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +4 -5
- package/modules/charts.esm.min.js +395 -33
- package/modules/charts.min.cjs +395 -33
- package/modules/charts.min.js +395 -33
- package/modules/data-router.d.ts +5 -6
- package/modules/data-router.esm.min.js +3 -6
- package/modules/data-router.min.cjs +3 -6
- package/modules/data-router.min.js +3 -6
- package/modules/devtools.d.ts +1 -1
- package/modules/devtools.esm.min.js +1 -4
- package/modules/devtools.min.cjs +1 -4
- package/modules/devtools.min.js +1 -4
- package/modules/dhtmlx-compat.d.ts +1 -1
- package/modules/dhtmlx-compat.esm.min.js +3 -6
- package/modules/dhtmlx-compat.min.cjs +3 -6
- package/modules/dhtmlx-compat.min.js +3 -6
- package/modules/gantt.d.ts +37 -43
- package/modules/gantt.esm.min.js +3 -6
- package/modules/gantt.min.cjs +3 -6
- package/modules/gantt.min.js +3 -6
- package/modules/geo-europe-nuts.d.ts +2 -2
- package/modules/geo-europe-nuts.esm.min.js +1 -1
- package/modules/geo-uk.d.ts +2 -2
- package/modules/geo-uk.esm.min.js +1 -1
- package/modules/geo-us-states.d.ts +2 -2
- package/modules/geo-us-states.esm.min.js +1 -1
- package/modules/geo-world-110m.d.ts +2 -2
- package/modules/geo-world-110m.esm.min.js +1 -1
- package/modules/geo-world-50m.d.ts +2 -2
- package/modules/geo-world-50m.esm.min.js +1 -1
- package/modules/htmx.d.ts +2 -2
- package/modules/htmx.esm.min.js +155 -96
- package/modules/htmx.min.cjs +155 -96
- package/modules/htmx.min.js +155 -96
- package/modules/kanban.d.ts +14 -14
- package/modules/kanban.esm.min.js +3 -6
- package/modules/kanban.min.cjs +3 -6
- package/modules/kanban.min.js +3 -6
- package/modules/kpi.d.ts +57 -4
- package/modules/kpi.esm.min.js +202 -10
- package/modules/kpi.min.cjs +202 -10
- package/modules/kpi.min.js +202 -10
- package/modules/layout.d.ts +2 -2
- package/modules/layout.esm.min.js +3 -6
- package/modules/layout.min.cjs +3 -6
- package/modules/layout.min.js +3 -6
- package/modules/mock-socket.d.ts +1 -1
- package/modules/mock-socket.esm.min.js +1 -4
- package/modules/mock-socket.min.cjs +1 -4
- package/modules/mock-socket.min.js +1 -4
- package/modules/react.d.ts +4 -5
- package/modules/react.esm.min.js +3 -6
- package/modules/react.min.cjs +3 -6
- package/modules/react.min.js +3 -6
- package/modules/svelte.d.ts +2 -3
- package/modules/svelte.esm.min.js +1 -4
- package/modules/svelte.min.cjs +1 -4
- package/modules/svelte.min.js +1 -4
- package/modules/tabs.d.ts +2 -3
- package/modules/tabs.esm.min.js +3 -6
- package/modules/tabs.min.cjs +3 -6
- package/modules/tabs.min.js +3 -6
- package/modules/vue.d.ts +1 -1
- package/modules/vue.esm.min.js +1 -4
- package/modules/vue.min.cjs +1 -4
- package/modules/vue.min.js +1 -4
- package/modules/webcomponent.d.ts +2 -2
- package/modules/webcomponent.esm.min.js +155 -96
- package/modules/webcomponent.min.cjs +155 -96
- package/modules/webcomponent.min.js +155 -96
- package/package.json +1 -1
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Lattice Grid 1.65.0, chart-markermap module
|
|
3
|
+
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
|
+
* https://latticegrid.dev
|
|
5
|
+
*/
|
|
6
|
+
(function(root){
|
|
7
|
+
'use strict';
|
|
8
|
+
var __mods=Object.create(null);
|
|
9
|
+
var __cache=Object.create(null);
|
|
10
|
+
function __def(id,fn){__mods[id]=fn;}
|
|
11
|
+
function __req(id){
|
|
12
|
+
var hit=__cache[id];
|
|
13
|
+
if(hit)return hit;
|
|
14
|
+
var exports=Object.create(null);
|
|
15
|
+
__cache[id]=exports;
|
|
16
|
+
var fn=__mods[id];
|
|
17
|
+
if(!fn)throw new Error('[lattice] missing module: '+id);
|
|
18
|
+
fn(exports,__req);
|
|
19
|
+
return exports;
|
|
20
|
+
}
|
|
21
|
+
var __extmods=Object.create(null);
|
|
22
|
+
__extmods["@toclocoinc/lattice-grid/modules/charts"]=(root["LatticeGrid"]||null);
|
|
23
|
+
function __ext(spec){
|
|
24
|
+
var mod=__extmods[spec];
|
|
25
|
+
var g=typeof globalThis!=='undefined'?globalThis:(typeof self!=='undefined'?self:null);
|
|
26
|
+
if(mod)return mod;
|
|
27
|
+
if(spec==="@toclocoinc/lattice-grid/modules/charts"&&g&&g["LatticeGrid"])return g["LatticeGrid"];
|
|
28
|
+
throw new Error('[lattice] this module shares the Lattice core with the page, but it was not found. Load lattice-grid (or its script build) before this module. Missing: '+spec);
|
|
29
|
+
}
|
|
30
|
+
__def("packages/modules/chart-markermap/index.js",function(__exports,__req){
|
|
31
|
+
'use strict';
|
|
32
|
+
Object.defineProperty(__exports,"bindMarkerMap",{enumerable:true,get:function(){return bindMarkerMap;}});
|
|
33
|
+
Object.defineProperty(__exports,"drawMarkerMap",{enumerable:true,get:function(){return drawMarkerMap;}});
|
|
34
|
+
Object.defineProperty(__exports,"default",{enumerable:true,get:function(){return __default;}});
|
|
35
|
+
const __m0=__ext("@toclocoinc/lattice-grid/modules/charts");
|
|
36
|
+
const registerChartType=__m0["registerChartType"];
|
|
37
|
+
const LABEL_GAP=4;
|
|
38
|
+
const RADIUS=5;
|
|
39
|
+
function fillOf(style){
|
|
40
|
+
if(!style||typeof style!=='object')return null;
|
|
41
|
+
const background=style.background===undefined||style.background===null
|
|
42
|
+
?null:String(style.background);
|
|
43
|
+
if(background&&!background.includes('gradient('))return background;
|
|
44
|
+
const colour=style.color===undefined||style.color===null?null:String(style.color);
|
|
45
|
+
return colour||null;
|
|
46
|
+
}
|
|
47
|
+
function coordinate(raw){
|
|
48
|
+
if(raw===null||raw===undefined||raw===''||typeof raw==='boolean')return NaN;
|
|
49
|
+
return Number(raw);
|
|
50
|
+
}
|
|
51
|
+
function bindMarkerMap(grid,spec){
|
|
52
|
+
const points=[];
|
|
53
|
+
let unplaced=0;
|
|
54
|
+
const valueCol=spec.value||spec.y||null;
|
|
55
|
+
const formatting=grid.formatting;
|
|
56
|
+
const n=grid.rows.count();
|
|
57
|
+
for(let i=0;i<n;i++){
|
|
58
|
+
const row=grid.rows.get(i);
|
|
59
|
+
if(!row||row.group)continue;
|
|
60
|
+
const lon=coordinate(grid.rows.value(row.key,spec.lon));
|
|
61
|
+
const lat=coordinate(grid.rows.value(row.key,spec.lat));
|
|
62
|
+
if(!Number.isFinite(lon)||!Number.isFinite(lat)
|
|
63
|
+
||Math.abs(lon)>180||Math.abs(lat)>90){
|
|
64
|
+
unplaced++;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
const value=valueCol?grid.rows.value(row.key,valueCol):null;
|
|
68
|
+
const style=valueCol&&formatting&&typeof formatting.styleFor==='function'
|
|
69
|
+
?formatting.styleFor(valueCol,value)
|
|
70
|
+
:null;
|
|
71
|
+
points.push({
|
|
72
|
+
rowKey:row.key,
|
|
73
|
+
lon,
|
|
74
|
+
lat,
|
|
75
|
+
value:typeof value==='number'&&Number.isFinite(value)?value:null,
|
|
76
|
+
text:valueCol?grid.rows.text(row.key,valueCol):'',
|
|
77
|
+
label:spec.label?grid.rows.text(row.key,spec.label):'',
|
|
78
|
+
fill:fillOf(style),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return{points,unplaced,empty:points.length===0};
|
|
82
|
+
}
|
|
83
|
+
function markerLegend(grid,valueCol,points){
|
|
84
|
+
const formatting=grid&&grid.formatting;
|
|
85
|
+
if(!valueCol||!formatting||typeof formatting.list!=='function')return[];
|
|
86
|
+
const worn=new Set();
|
|
87
|
+
for(const point of points)if(point.fill)worn.add(point.fill);
|
|
88
|
+
if(!worn.size)return[];
|
|
89
|
+
const rules=[...formatting.list('*'),...formatting.list(valueCol)];
|
|
90
|
+
const out=[];
|
|
91
|
+
const taken=new Set();
|
|
92
|
+
for(const rule of rules){
|
|
93
|
+
if(!rule||rule.enabled===false)continue;
|
|
94
|
+
const colour=fillOf(typeof rule.style==='function'?null:rule.style);
|
|
95
|
+
if(!colour||!worn.has(colour)||taken.has(colour))continue;
|
|
96
|
+
taken.add(colour);
|
|
97
|
+
out.push({
|
|
98
|
+
key:rule.id||colour,
|
|
99
|
+
label:rule.label||thresholdText(rule),
|
|
100
|
+
colour,
|
|
101
|
+
index:out.length,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
function thresholdText(rule){
|
|
107
|
+
const when=(rule&&rule.when)||null;
|
|
108
|
+
if(!when||when.value===undefined||when.value===null)return'';
|
|
109
|
+
const symbols={
|
|
110
|
+
gt:'>',gte:'≥',lt:'<',lte:'≤',eq:'=',ne:'≠',
|
|
111
|
+
};
|
|
112
|
+
if(when.op==='between'&&when.value2!==undefined)return`${when.value} – ${when.value2}`;
|
|
113
|
+
const symbol=symbols[when.op];
|
|
114
|
+
return symbol?`${symbol} ${when.value}`:String(when.value);
|
|
115
|
+
}
|
|
116
|
+
function placement(ctx,points){
|
|
117
|
+
const{
|
|
118
|
+
spec,plot,helpers,geoView,
|
|
119
|
+
}=ctx;
|
|
120
|
+
const{
|
|
121
|
+
resolvePack,packRegions,fitted,resolveProjection,extent,linearScale,
|
|
122
|
+
}=helpers;
|
|
123
|
+
const resolved=spec&&spec.shapes?resolvePack(spec.shapes,spec.layer):null;
|
|
124
|
+
if(resolved){
|
|
125
|
+
const all=packRegions(resolved.topology);
|
|
126
|
+
const antarctic=points.some((point)=>point.lat<-60);
|
|
127
|
+
const regions=antarctic
|
|
128
|
+
?all
|
|
129
|
+
:all.filter((region)=>region.code!=='AQ'&®ion.code!=='AN');
|
|
130
|
+
const project=resolveProjection(
|
|
131
|
+
spec.projection||resolved.pack.projection,
|
|
132
|
+
{...(resolved.pack.projectionOptions||{}),...(spec.projectionOptions||{})},
|
|
133
|
+
);
|
|
134
|
+
const fit=fitted({
|
|
135
|
+
project,
|
|
136
|
+
rings:regions.flatMap((region)=>region.rings),
|
|
137
|
+
plot,
|
|
138
|
+
zoom:geoView&&geoView.zoom,
|
|
139
|
+
centreOffset:geoView&&geoView.offset,
|
|
140
|
+
});
|
|
141
|
+
return{
|
|
142
|
+
to:fit.to,
|
|
143
|
+
regions,
|
|
144
|
+
scale:fit.scale,
|
|
145
|
+
aspect:fit.aspect,
|
|
146
|
+
attribution:resolved.pack.attribution||'',
|
|
147
|
+
packed:true,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
const lonD=extent(points.map((p)=>p.lon))||{min:0,max:1};
|
|
151
|
+
const latD=extent(points.map((p)=>p.lat))||{min:0,max:1};
|
|
152
|
+
const pad=RADIUS*3;
|
|
153
|
+
const xScale=linearScale(lonD,[plot.left+pad,plot.right-pad]);
|
|
154
|
+
const yScale=linearScale(latD,[plot.bottom-pad,plot.top+pad]);
|
|
155
|
+
return{
|
|
156
|
+
to:(lon,lat)=>[xScale.of(lon),yScale.of(lat)],
|
|
157
|
+
regions:null,
|
|
158
|
+
scale:null,
|
|
159
|
+
aspect:null,
|
|
160
|
+
attribution:'',
|
|
161
|
+
packed:false,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function placeLabel(opts){
|
|
165
|
+
const width=opts.textWidth(opts.text,opts.size);
|
|
166
|
+
const height=opts.size;
|
|
167
|
+
const near=RADIUS+LABEL_GAP;
|
|
168
|
+
const candidates=[
|
|
169
|
+
{x:opts.x+near,y:opts.y,anchor:'start'},
|
|
170
|
+
{x:opts.x-near,y:opts.y,anchor:'end'},
|
|
171
|
+
{x:opts.x,y:opts.y-near-height/2,anchor:'middle'},
|
|
172
|
+
{x:opts.x,y:opts.y+near+height/2,anchor:'middle'},
|
|
173
|
+
];
|
|
174
|
+
for(const candidate of candidates){
|
|
175
|
+
const left=candidate.anchor==='start'?candidate.x
|
|
176
|
+
:(candidate.anchor==='end'?candidate.x-width:candidate.x-width/2);
|
|
177
|
+
const box={
|
|
178
|
+
x:left,y:candidate.y-height/2,width,height,
|
|
179
|
+
};
|
|
180
|
+
if(box.x<opts.plot.left||box.x+box.width>opts.plot.right)continue;
|
|
181
|
+
if(box.y<opts.plot.top||box.y+box.height>opts.plot.bottom)continue;
|
|
182
|
+
if(opts.collides(box,opts.placed,2))continue;
|
|
183
|
+
return{...candidate,box};
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
function drawMarkerMap(ctx){
|
|
188
|
+
const{
|
|
189
|
+
plot,bound,scheme,groups,spec,helpers,grid,fontSize,
|
|
190
|
+
}=ctx;
|
|
191
|
+
const{
|
|
192
|
+
Pool,attrs,round,resolveScheme,NS,projectedPath,setText,applySize,
|
|
193
|
+
textWidth,collides,
|
|
194
|
+
}=helpers;
|
|
195
|
+
const sch=scheme||resolveScheme();
|
|
196
|
+
const fallback=sch.series(0);
|
|
197
|
+
const{points}=bound;
|
|
198
|
+
new Pool(groups.axis).finish();
|
|
199
|
+
new Pool(groups.rules).finish();
|
|
200
|
+
const fit=placement(ctx,points);
|
|
201
|
+
const base=new Pool(groups.grid);
|
|
202
|
+
if(fit.regions){
|
|
203
|
+
for(const region of fit.regions){
|
|
204
|
+
const d=region.rings.map((ring)=>projectedPath(ring,fit.to)).filter(Boolean).join(' ');
|
|
205
|
+
if(!d)continue;
|
|
206
|
+
attrs(base.next('path',`${NS}__region`),{
|
|
207
|
+
d,
|
|
208
|
+
fill:'var(--lattice-chart-empty, #eceff1)',
|
|
209
|
+
'data-code':region.code,
|
|
210
|
+
class:`${NS}__region`,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
base.finish();
|
|
215
|
+
const marks=new Pool(groups.marks);
|
|
216
|
+
const ordered=[...points].sort((a,b)=>(b.value||0)-(a.value||0)
|
|
217
|
+
||String(a.rowKey).localeCompare(String(b.rowKey)));
|
|
218
|
+
const legend=markerLegend(grid,spec.value||spec.y||null,points);
|
|
219
|
+
const hiddenFills=new Set();
|
|
220
|
+
for(const entry of legend)if(ctx.hidden&&ctx.hidden.has(entry.key))hiddenFills.add(entry.colour);
|
|
221
|
+
const markers=[];
|
|
222
|
+
for(const point of ordered){
|
|
223
|
+
if(point.fill&&hiddenFills.has(point.fill))continue;
|
|
224
|
+
const[x,y]=fit.to(point.lon,point.lat);
|
|
225
|
+
if(!Number.isFinite(x)||!Number.isFinite(y))continue;
|
|
226
|
+
const fill=point.fill||fallback;
|
|
227
|
+
const element=marks.next('circle',`${NS}__markermap-dot ${NS}__mark`);
|
|
228
|
+
attrs(element,{
|
|
229
|
+
cx:round(x),
|
|
230
|
+
cy:round(y),
|
|
231
|
+
r:RADIUS,
|
|
232
|
+
fill,
|
|
233
|
+
stroke:'var(--lattice-background, #fff)',
|
|
234
|
+
'stroke-width':1.5,
|
|
235
|
+
'data-row':point.rowKey,
|
|
236
|
+
class:`${NS}__markermap-dot ${NS}__mark`,
|
|
237
|
+
});
|
|
238
|
+
markers.push({
|
|
239
|
+
rowKey:point.rowKey,
|
|
240
|
+
label:point.label,
|
|
241
|
+
value:point.value,
|
|
242
|
+
text:point.text,
|
|
243
|
+
lon:point.lon,
|
|
244
|
+
lat:point.lat,
|
|
245
|
+
fill,
|
|
246
|
+
x,
|
|
247
|
+
y,
|
|
248
|
+
r:RADIUS,
|
|
249
|
+
element,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
marks.finish();
|
|
253
|
+
const wantLabels=ctx.labels?ctx.labels.names!==false:true;
|
|
254
|
+
const labels=new Pool(groups.labels);
|
|
255
|
+
let labelsDrawn=0;
|
|
256
|
+
if(wantLabels){
|
|
257
|
+
const placed=[];
|
|
258
|
+
for(const marker of markers){
|
|
259
|
+
const text=[marker.label,marker.text].filter(Boolean).join(' ');
|
|
260
|
+
if(!text)continue;
|
|
261
|
+
const at=placeLabel({
|
|
262
|
+
x:marker.x,
|
|
263
|
+
y:marker.y,
|
|
264
|
+
text,
|
|
265
|
+
size:fontSize,
|
|
266
|
+
placed,
|
|
267
|
+
plot,
|
|
268
|
+
textWidth,
|
|
269
|
+
collides,
|
|
270
|
+
});
|
|
271
|
+
if(!at)continue;
|
|
272
|
+
placed.push(at.box);
|
|
273
|
+
const node=labels.next('text',`${NS}__data-label`);
|
|
274
|
+
applySize(node,fontSize);
|
|
275
|
+
attrs(node,{
|
|
276
|
+
x:round(at.x),
|
|
277
|
+
y:round(at.y),
|
|
278
|
+
'text-anchor':at.anchor,
|
|
279
|
+
'dominant-baseline':'middle',
|
|
280
|
+
class:`${NS}__data-label`,
|
|
281
|
+
});
|
|
282
|
+
setText(node,text);
|
|
283
|
+
labelsDrawn++;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
labels.finish();
|
|
287
|
+
const overlay=new Pool(groups.overlay);
|
|
288
|
+
if(bound.unplaced){
|
|
289
|
+
const note=overlay.next('text',`${NS}__geo-note`);
|
|
290
|
+
attrs(note,{x:round(plot.left),y:round(plot.bottom),'text-anchor':'start'});
|
|
291
|
+
setText(note,grid.messages.t('chart.geoUnmatched',{count:bound.unplaced}));
|
|
292
|
+
}
|
|
293
|
+
overlay.finish();
|
|
294
|
+
return{
|
|
295
|
+
markers,
|
|
296
|
+
unplaced:bound.unplaced,
|
|
297
|
+
legend,
|
|
298
|
+
packed:fit.packed,
|
|
299
|
+
scale:fit.scale,
|
|
300
|
+
aspect:fit.aspect,
|
|
301
|
+
attribution:fit.attribution,
|
|
302
|
+
labelsDrawn,
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
registerChartType('markermap',{
|
|
306
|
+
draw:drawMarkerMap,bind:bindMarkerMap,freeform:true,labelled:true,
|
|
307
|
+
});
|
|
308
|
+
const __default=drawMarkerMap;
|
|
309
|
+
});
|
|
310
|
+
var __entry=__req("packages/modules/chart-markermap/index.js");
|
|
311
|
+
if(typeof module==='object'&&module.exports){module.exports=__entry;}
|
|
312
|
+
else if(typeof define==='function'&&define.amd){define(function(){return __entry;});}
|
|
313
|
+
else{
|
|
314
|
+
var __t=root["LatticeGrid"]||(root["LatticeGrid"]={});
|
|
315
|
+
for(var __k in __entry){if(__k!=='default')__t[__k]=__entry[__k];}
|
|
316
|
+
}
|
|
317
|
+
})(typeof globalThis!=='undefined'?globalThis:this);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, chart-parallel module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
} from '../lattice-grid.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* The parallel-coordinates extension type
|
|
11
|
+
* The parallel-coordinates extension type. Importing this
|
|
12
12
|
* module registers `parallel`. One polyline per row across the numeric
|
|
13
13
|
* `columns`, each a vertical axis with its own scale; `spec.colourBy` colours
|
|
14
14
|
* by a category.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, chart-ridgeline module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* The ridgeline (joy plot) extension chart type
|
|
7
|
+
* The ridgeline (joy plot) extension chart type. Importing
|
|
8
8
|
* this module registers `ridgeline` with the base charts module; the base
|
|
9
9
|
* bundle does not include it unless a caller imports it. Draws one
|
|
10
10
|
* kernel-density ridge per category (`x`), stacked and overlapping, over the
|
package/modules/chart-roc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, chart-roc module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
} from '../lattice-grid.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* The ROC / PR / calibration extension chart type
|
|
11
|
+
* The ROC / PR / calibration extension chart type. Importing
|
|
12
12
|
* this module registers `roc`. `spec.curve` chooses `'roc'` (default, with the
|
|
13
13
|
* chance diagonal and AUC), `'pr'`, or `'calibration'`; `label` is the outcome
|
|
14
14
|
* column (positive when truthy or equal to `spec.positive`), `score` the model
|
package/modules/chart-roc.min.js
CHANGED
package/modules/chart-slope.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, chart-slope module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* The slope-chart extension type
|
|
7
|
+
* The slope-chart extension type. Importing this module
|
|
8
8
|
* registers `slope`. One line per `series` connecting its `y` across the `x`
|
|
9
9
|
* periods — before/after comparison read from the slopes.
|
|
10
10
|
*/
|
package/modules/chart-splom.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, chart-splom module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
} from '../lattice-grid.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* The scatter-plot-matrix (SPLOM) extension chart type
|
|
11
|
+
* The scatter-plot-matrix (SPLOM) extension chart type.
|
|
12
12
|
* Importing this module registers `splom`. Crosses every pair of the numeric
|
|
13
13
|
* `columns` (2–6) as a matrix of scatters, naming each variable on the
|
|
14
14
|
* diagonal.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, chart-waffle module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* The waffle / dot-matrix extension type
|
|
7
|
+
* The waffle / dot-matrix extension type. Importing this
|
|
8
8
|
* module registers `waffle`. Proportion as counted squares (default 100), one
|
|
9
9
|
* colour per `x` category sized by `y`.
|
|
10
10
|
*/
|
package/modules/charts.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Lattice Grid 1.
|
|
2
|
+
* Lattice Grid 1.65.0, charts module type declarations
|
|
3
3
|
* Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
|
|
4
4
|
* https://latticegrid.dev
|
|
5
5
|
*/
|
|
@@ -55,7 +55,7 @@ export function deriveRangeSpec(
|
|
|
55
55
|
};
|
|
56
56
|
/**
|
|
57
57
|
* Turn a fitted regression model into diagnostic chart specs ready for
|
|
58
|
-
* `createChart
|
|
58
|
+
* `createChart`. Pass a precomputed `model`, or a `spec` to
|
|
59
59
|
* fit one over the grid, and the `fitted` and `residual` fit-shadow column ids
|
|
60
60
|
* the residual and QQ plots draw over.
|
|
61
61
|
*
|
|
@@ -95,7 +95,7 @@ export function resolveScheme(spec?: object): object;
|
|
|
95
95
|
export function schemeNames(): string[];
|
|
96
96
|
export function setDefaultScheme(name: string): void;
|
|
97
97
|
/**
|
|
98
|
-
* The definition an extension chart type registers
|
|
98
|
+
* The definition an extension chart type registers. `draw`
|
|
99
99
|
* receives the base drawing context — `plot`, `bound`, `groups`, `scheme`,
|
|
100
100
|
* `typography`, `fontSize`, `labels`, `grid`, `spec`, `doc` — plus
|
|
101
101
|
* `ctx.helpers`, the base's own toolkit of primitives (element factory, scales,
|
|
@@ -111,8 +111,7 @@ interface ChartTypeDefinition {
|
|
|
111
111
|
labelled?: boolean;
|
|
112
112
|
}
|
|
113
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
|
|
114
|
+
* Register an extension chart type so `createChart({ type })` can draw it. Extension types ship as their own opt-in modules, so the
|
|
116
115
|
* base charts bundle does not grow for a type a caller never imports — you pay
|
|
117
116
|
* only for the charts you use.
|
|
118
117
|
*/
|